API Documentation: | JavaPluginConvention |
---|
Is mixed into the project when applying the JavaBasePlugin
or the
JavaPlugin
.
Property | Description |
docsDir | Returns a file pointing to the root directory supposed to be used for all docs. |
docsDirName | The name of the docs directory. Can be a name or a path relative to the build dir. |
sourceCompatibility | The source compatibility used for compiling Java sources. |
sourceSets | The source sets container. |
targetCompatibility | The target compatibility used for compiling Java sources. |
testReportDir | Returns a file pointing to the root directory to be used for reports. |
testReportDirName | The name of the test reports directory. Can be a name or a path relative to |
testResultsDir | Returns a file pointing to the root directory of the test results. |
testResultsDirName | The name of the test results directory. Can be a name or a path relative to the build dir. |
Block | Description |
sourceSets | Configures the source sets of this project. |
Returns a file pointing to the root directory supposed to be used for all docs.
- Default with
java
plugin: ${project.buildDir}
/${project.docsDirName}
The name of the docs directory. Can be a name or a path relative to the build dir.
- Default with
java
plugin: 'docs'
The source compatibility used for compiling Java sources.
- Default with
java
plugin: - Value of the current used JVM (e.g.
JavaVersion.JAVA_1_6
on a 1.6 JVM).
The source sets container.
The target compatibility used for compiling Java sources.
- Default with
java
plugin: project.sourceCompatibility
Returns a file pointing to the root directory to be used for reports.
- Default with
java
plugin: ${project.reporting.baseDir}
/${project.testReportDirName}
The name of the test reports directory. Can be a name or a path relative to ReportingExtension.getBaseDir()
.
- Default with
java
plugin: 'tests'
Returns a file pointing to the root directory of the test results.
- Default with
java
plugin: ${project.buildDir}
/${project.testResultsDirName}
The name of the test results directory. Can be a name or a path relative to the build dir.
- Default with
java
plugin: 'test-results'
Creates and configures a new instance of a Manifest
. The given closure configures
the new manifest instance before it is returned.
Configures the source sets of this project.
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/**' } } }
- Delegates to:
SourceSetContainer
fromsourceSets