JavaPluginExtension

Common configuration for JVM (Java) based projects. This extension is added by the JavaBasePlugin and would be more appropriately named the JvmPluginExtension extension. It is used to configure many of the project's JVM-related settings and behavior.

Since

4.10

Functions

Link copied to clipboard
Configure the dependency resolution consistency for this Java project.
Link copied to clipboard
abstract fun disableAutoTargetJvm()
If this method is called, Gradle will not automatically try to fetch dependencies which have a JVM version compatible with the target compatibility of this module.
Link copied to clipboard
Tells if automatic JVM targeting is enabled.
Link copied to clipboard
Returns a file pointing to the root directory supposed to be used for all docs.
Link copied to clipboard
Configure the module path handling for tasks that have a 'classpath' as input.
Link copied to clipboard
Returns the source compatibility used for compiling Java sources.
Link copied to clipboard
The source sets container.
Link copied to clipboard
Returns the target compatibility used for compiling Java sources.
Link copied to clipboard
Returns a file pointing to the root directory to be used for reports.
Link copied to clipboard
Returns a file pointing to the root directory of the test results.
Link copied to clipboard
Gets the project wide toolchain requirements that will be used for tasks requiring a tool from the toolchain (e.g.
Link copied to clipboard
abstract fun manifest(): Manifest
Creates a new instance of a Manifest.
abstract fun manifest(@DelegatesTo(value = Manifest::class) closure: Closure): Manifest
abstract fun manifest(action: Action<in Manifest>): Manifest
Creates and configures a new instance of a Manifest.
Link copied to clipboard
abstract fun registerFeature(name: String, configureAction: Action<in FeatureSpec>)
Registers a feature.
Link copied to clipboard
abstract fun setSourceCompatibility(value: Any)
abstract fun setSourceCompatibility(value: JavaVersion)
Sets the source compatibility used for compiling Java sources.
Link copied to clipboard
abstract fun setTargetCompatibility(value: Any)
abstract fun setTargetCompatibility(value: JavaVersion)
Sets the target compatibility used for compiling Java sources.
Link copied to clipboard
abstract fun sourceSets(closure: Closure): Any
Configures the source sets of this project.
Link copied to clipboard
Configures the project wide toolchain requirements for tasks that require a tool from the toolchain (e.g.
Link copied to clipboard
abstract fun withJavadocJar()
Adds a task javadocJar that will package the output of the javadoc task in a JAR with classifier javadoc.
Link copied to clipboard
abstract fun withSourcesJar()
Adds a task sourcesJar that will package the Java sources of the main SourceSet in a JAR with classifier sources.