public abstract class JavaPluginConvention extends Object
JavaBasePlugin
or the
JavaPlugin
.Constructor | Description |
---|---|
JavaPluginConvention() |
Modifier and Type | Method | Description |
---|---|---|
abstract void |
disableAutoTargetJvm() |
If this method is called, Gradle will not automatically try to fetch
dependencies which have a JVM version compatible with this module.
|
abstract boolean |
getAutoTargetJvmDisabled() |
Tells if automatic JVM targetting is enabled.
|
abstract File |
getDocsDir() |
Returns a file pointing to the root directory supposed to be used for all docs.
|
abstract String |
getDocsDirName() |
The name of the docs directory.
|
abstract org.gradle.api.internal.project.ProjectInternal |
getProject() |
|
abstract JavaVersion |
getSourceCompatibility() |
Returns the source compatibility used for compiling Java sources.
|
abstract SourceSetContainer |
getSourceSets() |
The source sets container.
|
abstract JavaVersion |
getTargetCompatibility() |
Returns the target compatibility used for compiling Java sources.
|
abstract File |
getTestReportDir() |
Returns a file pointing to the root directory to be used for reports.
|
abstract String |
getTestReportDirName() |
The name of the test reports directory.
|
abstract File |
getTestResultsDir() |
Returns a file pointing to the root directory of the test results.
|
abstract String |
getTestResultsDirName() |
The name of the test results directory.
|
abstract Manifest |
manifest() |
Creates a new instance of a
Manifest . |
abstract Manifest |
manifest(Closure closure) |
Creates and configures a new instance of a
Manifest . |
abstract Manifest |
manifest(Action<? super Manifest> action) |
Creates and configures a new instance of a
Manifest . |
abstract void |
setDocsDirName(String docsDirName) |
|
abstract void |
setSourceCompatibility(Object value) |
Sets the source compatibility used for compiling Java sources.
|
abstract void |
setSourceCompatibility(JavaVersion value) |
Sets the source compatibility used for compiling Java sources.
|
abstract void |
setTargetCompatibility(Object value) |
Sets the target compatibility used for compiling Java sources.
|
abstract void |
setTargetCompatibility(JavaVersion value) |
Sets the target compatibility used for compiling Java sources.
|
abstract void |
setTestReportDirName(String testReportDirName) |
|
abstract void |
setTestResultsDirName(String testResultsDirName) |
|
abstract Object |
sourceSets(Closure closure) |
Configures the source sets of this project.
|
public abstract Object sourceSets(Closure closure)
The given closure is executed to configure the SourceSetContainer
. The SourceSetContainer
is passed to the closure as its delegate.
See the example below how SourceSet
'main' is accessed and how the SourceDirectorySet
'java'
is configured to exclude some package from compilation.
apply plugin: 'java' sourceSets { main { java { exclude 'some/unwanted/package/**' } } }
closure
- The closure to execute.public abstract File getDocsDir()
public abstract File getTestResultsDir()
public abstract File getTestReportDir()
public abstract JavaVersion getSourceCompatibility()
public abstract void setSourceCompatibility(Object value)
value
- The value for the source compatibility as defined by JavaVersion.toVersion(Object)
public abstract void setSourceCompatibility(JavaVersion value)
value
- The value for the source compatibilitypublic abstract JavaVersion getTargetCompatibility()
public abstract void setTargetCompatibility(Object value)
value
- The value for the target compatibility as defined by JavaVersion.toVersion(Object)
public abstract void setTargetCompatibility(JavaVersion value)
value
- The value for the target compatibilitypublic abstract Manifest manifest(Closure closure)
Manifest
. The given closure configures
the new manifest instance before it is returned.closure
- The closure to use to configure the manifest.public abstract Manifest manifest(Action<? super Manifest> action)
Manifest
.action
- The action to use to configure the manifest.public abstract String getDocsDirName()
public abstract void setDocsDirName(String docsDirName)
public abstract String getTestResultsDirName()
public abstract void setTestResultsDirName(String testResultsDirName)
public abstract String getTestReportDirName()
ReportingExtension.getBaseDir()
.public abstract void setTestReportDirName(String testReportDirName)
public abstract SourceSetContainer getSourceSets()
public abstract org.gradle.api.internal.project.ProjectInternal getProject()
@Incubating public abstract void disableAutoTargetJvm()
@Incubating public abstract boolean getAutoTargetJvmDisabled()