Class AppNameResolver
- java.lang.Object
-
- com.heroku.sdk.deploy.lib.resolver.AppNameResolver
-
public class AppNameResolver extends Object
-
-
Constructor Summary
Constructors Constructor Description AppNameResolver()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Optional<String>resolve(Path projectDirectory, Supplier<Optional<String>> customResolver)Resolves the Heroku app name based on the given project directory.
-
-
-
Method Detail
-
resolve
public static Optional<String> resolve(Path projectDirectory, Supplier<Optional<String>> customResolver) throws IOException
Resolves the Heroku app name based on the given project directory. This uses the already established resolution order from 2.x to ensure backwards compatibility: 1. The heroku.properties file 2. The heroku.appName system property 3. Custom resolution 4. Git remote pointing to an Heroku app- Parameters:
projectDirectory- The projects root directory.customResolver- A custom resolver for the app name. Most likely a setting from a build tool like Maven or sbt.- Returns:
- If possible, the resolved app name.
- Throws:
IOException- Resolving requires IO operations which might fail.
-
-