Class GradleLaunchConfig.Builder
- Enclosing class:
- GradleLaunchConfig
GradleLaunchConfig.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds one or more program argument to the launch config.build()Builds aGradleLaunchConfig.gradleDist(String gradleDist) Sets the Gradle Distribution to use.gradleUserHome(@Nullable String gradleUserHome) Sets the Gradle user home.Sets the java home used by Gradle.Adds one or more JVM argument to the launch config.offlineMode(boolean offlineMode) Sets the offline mode flag.overrideWorkspaceSettings(boolean override) Sets the "Override Workspace Settings" flag.Changes the target Eclipse project.Adds a Project Property to the launch args.showConsole(boolean showConsole) Sets the console view flag.showExecutions(boolean showExecutions) Sets the executions view flag.Adds one or more gradle tasks to the end of the execution queue.workingDirectory(String workingDirectory) Sets the working directory.
-
Constructor Details
-
Builder
Creates a new builder for a specific Eclipse project.- Parameters:
project- The name of the Eclipse project the launch config is for.
-
-
Method Details
-
project
Changes the target Eclipse project.For
GradleLaunchConfig, the project is only used to infer the defaultworkingDirectory.- Parameters:
project- The name of the Eclipse project the launch config is for.- Returns:
- this
-
tasks
Adds one or more gradle tasks to the end of the execution queue.- Parameters:
tasks- The new tasks, in execution order.- Returns:
- this
-
workingDirectory
Sets the working directory.Can use eclipse variables for path resolution.
- Parameters:
workingDirectory- The working directory.- Returns:
- this
-
gradleDist
Sets the Gradle Distribution to use. Specify the gradle wrapper via"GRADLE_DISTRIBUTION(WRAPPER)".- Parameters:
gradleDist- The new gradle distribution.- Returns:
- this
-
offlineMode
Sets the offline mode flag. If enabled,--offlinewill be passed to gradle at execution time.- Parameters:
offlineMode- If offline mode is enabled.- Returns:
- this
-
showConsole
Sets the console view flag. If enabled, the Eclipse console will be shown when running the config.- Parameters:
showConsole- If show console view is enabled.- Returns:
- this
-
showExecutions
Sets the executions view flag. If enabled, the Eclipse "Gradle Executions" pane will be shown when running the config.- Parameters:
showExecutions- If show execution view is enabled.- Returns:
- this
-
gradleUserHome
Sets the Gradle user home.- Parameters:
gradleUserHome- The new gradle user home.- Returns:
- this
-
javaHome
Sets the java home used by Gradle.- Parameters:
javaHome- The new Java home.- Returns:
- this
-
args
Adds one or more program argument to the launch config.Supplying an incorrect or invalid argument will cause the launch config to emit nothing and silently fail.
Supplying
--no-daemonis not supported and causes the launch to fail similarly.eclipse variables will be resolved in arguments.
- Parameters:
args- The argument(s) to add.- Returns:
- this
-
property
Adds a Project Property to the launch args.This is syntax sugar around
args(String...).eclipse variables will be resolved in arguments.
- Parameters:
key- The property key.value- The property value. It will be stringized viaObject.toString()- Returns:
- this
-
jvmArgs
Adds one or more JVM argument to the launch config.eclipse variables will be resolved in arguments.
- Parameters:
args- The argument(s) to add.- Returns:
- this
-
overrideWorkspaceSettings
Sets the "Override Workspace Settings" flag. If disabled, onlytasksandworkingDirectorywill be used during execution.Since this field defaults to
false, it will be automatically enabled if any of the dependent settings are modified, and must be manually disabled at the end of the builder.- Parameters:
override- If workspace settings will be overridden.- Returns:
- this
- See Also:
-
build
Builds aGradleLaunchConfig.All containers (lists, maps) are copied, so further modification to this builder will not modify the built object.
- Returns:
- A newly-constructed
GradleLaunchConfig.
-