Class CompareGradleBuilds
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
org.gradle.api.plugins.buildcomparison.gradle.CompareGradleBuilds
- All Implemented Interfaces:
Comparable<Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.TaskInternal, ExtensionAware, Task, VerificationTask, org.gradle.util.Configurable<Task>
Executes two Gradle builds (that can be the same build) with specified versions and compares the outcomes.
Please see the “Comparing Builds” chapter of the Gradle User Guide for more information.
-
Nested Class Summary
Nested classes/interfaces inherited from interface Task
Task.Namer -
Field Summary
FieldsFields inherited from interface Task
TASK_ACTION, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.gradle.internal.file.PathToFileResolverbooleanWhether a comparison between non identical builds will fail the task execution.protected ObjectFactoryInjects and returns an instance ofObjectFactory.protected org.gradle.internal.logging.progress.ProgressLoggerFactoryThe directory that will contain the HTML comparison report and any other report files.The specification of how to invoke the source build.The specification of how to invoke the target build.voidsetIgnoreFailures(boolean ignoreFailures) Sets whether a comparison between non identical builds will fail the task execution.voidsetReportDir(File reportDir) Sets the directory that will contain the HTML comparison report and any other report files.voidsetReportDir(Object reportDir) Sets the directory that will contain the HTML comparison report and any other report files.voidsourceBuild(Action<GradleBuildInvocationSpec> config) Configures the source build.voidtargetBuild(Action<GradleBuildInvocationSpec> config) Configures the target build.Methods inherited from class DefaultTask
newInputDirectory, newInputFile, newOutputDirectory, newOutputFileMethods inherited from class org.gradle.api.internal.AbstractTask
addValidator, appendParallelSafeAction, compareTo, configure, deleteAllActions, dependsOn, dependsOnTaskDidWork, doFirst, doFirst, doFirst, doLast, doLast, doLast, execute, finalizedBy, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExecuter, getExtensions, getFinalizedBy, getGroup, getIdentityPath, getImpliesSubProjects, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getShouldRunAfter, getStandardOutputCapture, getState, getTaskActions, getTaskDependencies, getTemporaryDir, getTemporaryDirFactory, getValidators, hasProperty, injectIntoNewInstance, isEnabled, isHasCustomActions, leftShift, mustRunAfter, onlyIf, onlyIf, prependParallelSafeAction, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setExecuter, setFinalizedBy, setGroup, setImpliesSubProjects, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, toString
-
Field Details
-
DEFAULT_TASKS
-
-
Constructor Details
-
CompareGradleBuilds
public CompareGradleBuilds()
-
-
Method Details
-
getFileResolver
@Inject protected org.gradle.internal.file.PathToFileResolver getFileResolver() -
getProgressLoggerFactory
@Inject protected org.gradle.internal.logging.progress.ProgressLoggerFactory getProgressLoggerFactory() -
getObjectFactory
Injects and returns an instance ofObjectFactory.- Since:
- 4.2
-
getSourceBuild
The specification of how to invoke the source build. Defaults toproject.rootDirwith the current Gradle version and the tasks “clean assemble”. TheprojectDirmust be the project directory of the root project if this is a multi project build.- Returns:
- The specification of how to invoke the source build.
-
sourceBuild
Configures the source build. A Groovy closure can be used as the action.sourceBuild { gradleVersion = "1.1" }- Parameters:
config- The configuration action.
-
getTargetBuild
The specification of how to invoke the target build. Defaults toproject.rootDirwith the current Gradle version and the tasks “clean assemble”. TheprojectDirmust be the project directory of the root project if this is a multi project build.- Returns:
- The specification of how to invoke the target build.
-
targetBuild
Configures the target build. A Groovy closure can be used as the action.targetBuild { gradleVersion = "1.1" }- Parameters:
config- The configuration action.
-
getIgnoreFailures
public boolean getIgnoreFailures()Whether a comparison between non identical builds will fail the task execution.- Specified by:
getIgnoreFailuresin interfaceVerificationTask- Returns:
- True if a comparison between non identical builds will fail the task execution, otherwise false.
-
setIgnoreFailures
public void setIgnoreFailures(boolean ignoreFailures) Sets whether a comparison between non identical builds will fail the task execution.- Specified by:
setIgnoreFailuresin interfaceVerificationTask- Parameters:
ignoreFailures- false to fail the task on non identical builds, true to not fail the task. The default is false.
-
getReportDir
The directory that will contain the HTML comparison report and any other report files.- Returns:
- The directory that will contain the HTML comparison report and any other report files.
-
setReportDir
Sets the directory that will contain the HTML comparison report and any other report files.- Parameters:
reportDir- The directory that will contain the HTML comparison report and any other report files.- Since:
- 4.0
-
setReportDir
Sets the directory that will contain the HTML comparison report and any other report files. The value will be evaluated byproject.file().- Parameters:
reportDir- The directory that will contain the HTML comparison report and any other report files.
-