Is mixed in into the project when applying the JavaBasePlugin or the JavaPlugin.
Type | Name and description |
---|---|
String |
dependencyCacheDirName |
String |
docsDirName The name of the docs directory. |
ProjectInternal |
project |
SourceSetContainer |
sourceSets The source sets container. |
String |
testReportDirName The name of the test reports directory. |
String |
testResultsDirName The name of the test results directory. |
Constructor and description |
---|
JavaPluginConvention
(ProjectInternal project, Instantiator instantiator) |
Type | Name and description |
---|---|
File |
getDependencyCacheDir() |
File |
getDocsDir() Returns a file pointing to the root directory supposed to be used for all docs. |
JavaVersion |
getSourceCompatibility() Returns the source compatibility used for compiling Java sources. |
JavaVersion |
getTargetCompatibility() Returns the target compatibility used for compiling Java sources. |
File |
getTestReportDir() Returns a file pointing to the root directory to be used for reports. |
File |
getTestResultsDir() Returns a file pointing to the root directory of the test results. |
Manifest |
manifest() Creates a new instance of a Manifest. |
Manifest |
manifest(Closure closure) Creates and configures a new instance of a Manifest. |
void |
setSourceCompatibility(def value) Sets the source compatibility used for compiling Java sources. |
void |
setTargetCompatibility(def value) Sets the target compatibility used for compiling Java sources. |
def |
sourceSets(Closure closure) Configures the source sets of this project. |
The name of the docs directory. Can be a name or a path relative to the build dir.
The source sets container.
The name of the test reports directory. Can be a name or a path relative to the build dir.
The name of the test results directory. Can be a name or a path relative to the build dir.
Returns a file pointing to the root directory supposed to be used for all docs.
Returns the source compatibility used for compiling Java sources.
Returns the target compatibility used for compiling Java sources.
Returns a file pointing to the root directory to be used for reports.
Returns a file pointing to the root directory of the test results.
Creates a new instance of a Manifest.
Creates and configures a new instance of a Manifest. The given closure configures the new manifest instance before it is returned.
closure
- The closure to use to configure the manifest.Sets the source compatibility used for compiling Java sources.
Sets the target compatibility used for compiling Java sources.
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/**' } } }
closure
- The closure to execute.Gradle API 2.2-20140924021627+0000