api / org.gradle.platform.base / BinarySpec

BinarySpec

@Incubating interface BinarySpec : BuildableComponentSpec, CheckableComponentSpec, Binary

Represents a binary that is the result of building a component.

Functions

getInputs

abstract fun getInputs(): DomainObjectSet<LanguageSourceSet>

Returns all inputs of the binary. This includes source sets owned by the binary, and other source sets created elsewhere (e.g. inherited from the binary's component).

getSources

abstract fun getSources(): ModelMap<LanguageSourceSet>

The sources owned by this binary.

getTasks

abstract fun getTasks(): BinaryTasksCollection

The set of tasks associated with this binary.

isBuildable

abstract fun isBuildable(): Boolean

Can this binary be built in the current environment?

Inherited Functions

builtBy

abstract fun builtBy(vararg tasks: Any): Unit

Adds tasks required to build this component. Tasks added this way are subsequently added as dependencies of this component's build task.

checkedBy

abstract fun checkedBy(vararg tasks: Any): Unit

Adds tasks required to check this component. Tasks added this way are subsequently added as dependencies of this component's check task.

getBuildTask

abstract fun getBuildTask(): Task

Returns the task responsible for building this component.

getCheckTask

abstract fun getCheckTask(): Task

Returns the task responsible for checking this component.

hasBuildDependencies

abstract fun hasBuildDependencies(): Boolean

setBuildTask

abstract fun setBuildTask(buildTask: Task): Unit

Specifies the task responsible for building this component.

setCheckTask

abstract fun setCheckTask(checkTask: Task): Unit

Specifies the task responsible for checking this component.

Inheritors

ApplicationBinarySpec

interface ApplicationBinarySpec : BinarySpec

A binary produced from a `org.gradle.platform.base.ApplicationSpec`.

JvmBinarySpec

interface JvmBinarySpec : BinarySpec

Represents a binary artifact that is the result of building a jvm component.

LibraryBinarySpec

interface LibraryBinarySpec : BinarySpec

A binary produced from a `org.gradle.platform.base.LibrarySpec`.

NativeBinarySpec

interface NativeBinarySpec : BinarySpec

Represents a binary artifact that is the result of building a native component.

TestSuiteBinarySpec

interface TestSuiteBinarySpec : BinarySpec

A binary which runs a suite of tests.