api / org.gradle.api.plugins.buildcomparison.gradle / GradleBuildInvocationSpec

GradleBuildInvocationSpec

@Incubating interface GradleBuildInvocationSpec

A specification for launching a Gradle build with a specified Gradle version.

Functions

getArguments

abstract fun getArguments(): MutableList<String>

The command line arguments (excluding tasks) to invoke the build with.

getGradleVersion

abstract fun getGradleVersion(): String

The Gradle version to run the build with. Defaults to the current Gradle version of the running build.

getProjectDir

abstract fun getProjectDir(): File

The “root” directory of the build. Defaults to the current build's root directory.

getTasks

abstract fun getTasks(): MutableList<String>

The tasks to execute. Defaults to an empty list.

setArguments

abstract fun setArguments(arguments: MutableIterable<String>): Unit

Sets the command line arguments (excluding tasks) to invoke the build with.

setGradleVersion

abstract fun setGradleVersion(gradleVersion: String): Unit

Sets the Gradle version to run the build with. The value must be a valid, published, Gradle version number. Examples are:

  • "1.1"
  • "1.0-rc-1"

setProjectDir

abstract fun setProjectDir(projectDir: Any): Unit

Sets the “root” directory of the build. This should not be the project directory of child project in a multi project build. It should always be the root of the multiproject build. The value is interpreted as a file as per org.gradle.api.Project#file(Object).

setTasks

abstract fun setTasks(tasks: MutableIterable<String>): Unit

Sets the tasks to execute.