api / org.gradle.api.plugins.buildcomparison.gradle / CompareGradleBuilds

CompareGradleBuilds

@Incubating open class CompareGradleBuilds : DefaultTask, VerificationTask

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.

Constructors

<init>

CompareGradleBuilds()

Properties

DEFAULT_TASKS

static val DEFAULT_TASKS: MutableList<String>

Functions

getIgnoreFailures

open fun getIgnoreFailures(): Boolean

Whether a comparison between non identical builds will fail the task execution.

getReportDir

open fun getReportDir(): File

The directory that will contain the HTML comparison report and any other report files.

getSourceBuild

open fun getSourceBuild(): GradleBuildInvocationSpec

The specification of how to invoke the source build. Defaults to project.rootDir with the current Gradle version and the tasks “clean assemble”. The projectDir must be the project directory of the root project if this is a multi project build.

getTargetBuild

open fun getTargetBuild(): GradleBuildInvocationSpec

The specification of how to invoke the target build. Defaults to project.rootDir with the current Gradle version and the tasks “clean assemble”. The projectDir must be the project directory of the root project if this is a multi project build.

setIgnoreFailures

open fun setIgnoreFailures(ignoreFailures: Boolean): Unit

Sets whether a comparison between non identical builds will fail the task execution.

setReportDir

open fun setReportDir(reportDir: File): Unit

Sets the directory that will contain the HTML comparison report and any other report files.

open fun setReportDir(reportDir: Any): Unit

Sets the directory that will contain the HTML comparison report and any other report files. The value will be evaluated by project.file().

sourceBuild

open fun sourceBuild(config: Action<GradleBuildInvocationSpec>): Unit

Configures the source build. A Groovy closure can be used as the action.

 sourceBuild { gradleVersion = "1.1" } 

targetBuild

open fun targetBuild(config: Action<GradleBuildInvocationSpec>): Unit

Configures the target build. A Groovy closure can be used as the action.

 targetBuild { gradleVersion = "1.1" }