|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Object org.gradle.api.plugins.JavaPluginConvention
class JavaPluginConvention
Is mixed in into the project when applying the JavaBasePlugin or the JavaPlugin.
Property Summary | |
---|---|
String |
dependencyCacheDirName
|
String |
docsDirName
The name of the docs directory. |
DefaultManifest |
manifest
|
List |
metaInf
Deprecated. |
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 Summary | |
JavaPluginConvention(ProjectInternal project, Instantiator instantiator)
|
Method Summary | |
---|---|
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. |
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Property Detail |
---|
String dependencyCacheDirName
String docsDirName
@Deprecated DefaultManifest manifest
@Deprecated List metaInf
The lines of metaInf file that will be configured by default to every jar task.
ProjectInternal project
final SourceSetContainer sourceSets
String testReportDirName
String testResultsDirName
Constructor Detail |
---|
JavaPluginConvention(ProjectInternal project, Instantiator instantiator)
Method Detail |
---|
File getDependencyCacheDir()
File getDocsDir()
JavaVersion getSourceCompatibility()
JavaVersion getTargetCompatibility()
File getTestReportDir()
File getTestResultsDir()
Manifest manifest()
Manifest manifest(Closure closure)
closure
- The closure to use to configure the manifest.
void setSourceCompatibility(def value)
void setTargetCompatibility(def value)
def 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.
Gradle API 1.12