Package org.gradle.api.tasks
Class GradleBuild
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
org.gradle.api.internal.ConventionTask
org.gradle.api.tasks.GradleBuild
- All Implemented Interfaces:
- Comparable<Task>,- org.gradle.api.internal.DynamicObjectAware,- org.gradle.api.internal.IConventionAware,- org.gradle.api.internal.TaskInternal,- Named,- ExtensionAware,- Task,- Configurable<Task>
@DisableCachingByDefault(because="Child Gradle build will do its own caching")
public abstract class GradleBuild
extends org.gradle.api.internal.ConventionTask
Executes a Gradle build.
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.gradle.api.TaskTask.Namer
- 
Field SummaryFields inherited from interface org.gradle.api.TaskTASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionDeprecated.The build name to use for the nested build.getDir()Returns the project directory for the build.Returns the full set of parameters that will be used to execute the build.getTasks()Returns the tasks that should be executed for this build.voidsetBuildFile(File file) Deprecated.UsesetDir(File)instead to set the root of the nested build.voidsetBuildFile(Object file) Deprecated.UsesetDir(Object)instead to set the root of the nested build.voidsetBuildName(String buildName) Sets build name to use for the nested build.voidSets the project directory for the build.voidSets the project directory for the build.voidsetStartParameter(StartParameter startParameter) Sets the full set of parameters that will be used to execute the build.voidsetTasks(Collection<String> tasks) Sets the tasks that should be executed for this build.voidSets the tasks that should be executed for this build.Methods inherited from class org.gradle.api.internal.ConventionTaskconventionMapping, conventionMapping, getConventionMappingMethods inherited from class org.gradle.api.DefaultTaskcompareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesServiceMethods inherited from class org.gradle.api.internal.AbstractTaskacceptServiceReferences, appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, setImpliesSubProjectsMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gradle.api.TaskdoNotTrackState, getConvention, notCompatibleWithConfigurationCache
- 
Constructor Details- 
GradleBuildpublic GradleBuild()
 
- 
- 
Method Details- 
getStartParameterReturns the full set of parameters that will be used to execute the build.- Returns:
- the parameters. Never returns null.
 
- 
setStartParameterSets the full set of parameters that will be used to execute the build.- Parameters:
- startParameter- the parameters. Should not be null.
 
- 
getDirReturns the project directory for the build. Defaults to the project directory.- Returns:
- The project directory. Never returns null.
 
- 
setDirSets the project directory for the build.- Parameters:
- dir- The project directory. Should not be null.
- Since:
- 4.0
 
- 
setDirSets the project directory for the build.- Parameters:
- dir- The project directory. Should not be null.
 
- 
getBuildFileDeprecated.UsegetDir()instead to get the root of the nested build. This method will be removed in Gradle 9.0.Returns the build file that should be used for this build. Defaults to "build.gradle" in the project directory.- Returns:
- The build file. May be null.
 
- 
setBuildFileDeprecated.UsesetDir(File)instead to set the root of the nested build. This method will be removed in Gradle 9.0.Sets the build file that should be used for this build.- Parameters:
- file- The build file. May be null to use the default build file for the build.
- Since:
- 4.0
 
- 
setBuildFileDeprecated.UsesetDir(Object)instead to set the root of the nested build. This method will be removed in Gradle 9.0.Sets the build file that should be used for this build.- Parameters:
- file- The build file. May be null to use the default build file for the build.
 
- 
getTasksReturns the tasks that should be executed for this build.- Returns:
- The sequence. May be empty. Never returns null.
 
- 
setTasksSets the tasks that should be executed for this build.- Parameters:
- tasks- The task names. May be empty or null to use the default tasks for the build.
- Since:
- 4.0
 
- 
setTasksSets the tasks that should be executed for this build.- Parameters:
- tasks- The task names. May be empty or null to use the default tasks for the build.
 
- 
getBuildNameThe build name to use for the nested build.If no value is specified, the name of the directory of the build will be used. - Returns:
- the build name to use for the nested build (or null if the default is to be used)
- Since:
- 6.0
 
- 
setBuildNameSets build name to use for the nested build.- Parameters:
- buildName- the build name to use for the nested build
- Since:
- 6.0
 
 
- 
getDir()instead to get the root of the nested build.