CompareGradleBuilds

API Documentation:CompareGradleBuilds

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 Manual for more information.

Properties

PropertyDescription
ignoreFailures

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

reportDir

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

sourceBuild

The specification of how to invoke the source build. Defaults to Project.getRootDir() 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.

targetBuild

The specification of how to invoke the target build. Defaults to Project.getRootDir() 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.

Methods

MethodDescription
sourceBuild(config)

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

targetBuild(config)

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

Script blocks

No script blocks

Property details

boolean ignoreFailures

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

Default with compare-gradle-builds plugin:
false

File reportDir

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

Default with compare-gradle-builds plugin:
${project.reporting.file(this.name)}

GradleBuildInvocationSpec sourceBuild (read-only)

The specification of how to invoke the source build. Defaults to Project.getRootDir() 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.

GradleBuildInvocationSpec targetBuild (read-only)

The specification of how to invoke the target build. Defaults to Project.getRootDir() 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.

Method details

void sourceBuild(Action<GradleBuildInvocationSpec> config)

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

sourceBuild {
  gradleVersion = "1.1"
}

void targetBuild(Action<GradleBuildInvocationSpec> config)

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

targetBuild {
  gradleVersion = "1.1"
}