api / org.gradle.jvm / JvmBinarySpec

JvmBinarySpec

@Incubating interface JvmBinarySpec : BinarySpec

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

Functions

getClassesDir

abstract fun getClassesDir(): File

The classes directory for this binary.

getResourcesDir

abstract fun getResourcesDir(): File

The resources directory for this binary.

getTargetPlatform

abstract fun getTargetPlatform(): JavaPlatform

The target platform for this binary.

getToolChain

abstract fun getToolChain(): JavaToolChain

Returns the org.gradle.jvm.toolchain.JavaToolChain that will be used to build this binary.

setClassesDir

abstract fun setClassesDir(classesDir: File): Unit

Sets the classes directory for this binary.

setResourcesDir

abstract fun setResourcesDir(dir: File): Unit

Sets the resources directory for this binary.

setTargetPlatform

abstract fun setTargetPlatform(platform: JavaPlatform): Unit

Sets the target platform for this binary.

setToolChain

abstract fun setToolChain(toolChain: JavaToolChain): Unit

Sets the org.gradle.jvm.toolchain.JavaToolChain that will be used to build this binary.

Inherited 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?

Inheritors

ClassDirectoryBinarySpec

interface ClassDirectoryBinarySpec : JvmBinarySpec

An exploded binary containing resources and compiled class files.

JarBinarySpec

interface JarBinarySpec : LibraryBinarySpec, JvmBinarySpec

Definition of a Jar file binary that is to be built by Gradle.

JvmTestSuiteBinarySpec

interface JvmTestSuiteBinarySpec : TestSuiteBinarySpec, JvmBinarySpec, WithDependencies

Base type of JVM test suite binaries.