public class JavaPluginConvention extends Object
JavaBasePlugin
or the
JavaPlugin
.Constructor and Description |
---|
JavaPluginConvention(org.gradle.api.internal.project.ProjectInternal project,
org.gradle.internal.reflect.Instantiator instantiator) |
Modifier and Type | Method and Description |
---|---|
File |
getDependencyCacheDir() |
String |
getDependencyCacheDirName()
The name of the dependency cache dir.
|
File |
getDocsDir()
Returns a file pointing to the root directory supposed to be used for all docs.
|
String |
getDocsDirName()
The name of the docs directory.
|
org.gradle.api.internal.project.ProjectInternal |
getProject() |
JavaVersion |
getSourceCompatibility()
Returns the source compatibility used for compiling Java sources.
|
SourceSetContainer |
getSourceSets()
The source sets container.
|
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.
|
String |
getTestReportDirName()
The name of the test reports directory.
|
File |
getTestResultsDir()
Returns a file pointing to the root directory of the test results.
|
String |
getTestResultsDirName()
The name of the test results directory.
|
Manifest |
manifest()
Creates a new instance of a
Manifest . |
Manifest |
manifest(Closure closure)
Creates and configures a new instance of a
Manifest . |
void |
setDependencyCacheDirName(String dependencyCacheDirName) |
void |
setDocsDirName(String docsDirName) |
void |
setProject(org.gradle.api.internal.project.ProjectInternal project)
Deprecated.
Project should be considered final.
|
void |
setSourceCompatibility(Object value)
Sets the source compatibility used for compiling Java sources.
|
void |
setTargetCompatibility(Object value)
Sets the target compatibility used for compiling Java sources.
|
void |
setTestReportDirName(String testReportDirName) |
void |
setTestResultsDirName(String testResultsDirName) |
Object |
sourceSets(Closure closure)
Configures the source sets of this project.
|
public JavaPluginConvention(org.gradle.api.internal.project.ProjectInternal project, org.gradle.internal.reflect.Instantiator instantiator)
public 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 File getDependencyCacheDir()
public File getDocsDir()
public File getTestResultsDir()
public File getTestReportDir()
public JavaVersion getSourceCompatibility()
public void setSourceCompatibility(Object value)
public JavaVersion getTargetCompatibility()
public void setTargetCompatibility(Object value)
public 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 String getDependencyCacheDirName()
public void setDependencyCacheDirName(String dependencyCacheDirName)
public String getDocsDirName()
public void setDocsDirName(String docsDirName)
public String getTestResultsDirName()
public void setTestResultsDirName(String testResultsDirName)
public String getTestReportDirName()
ReportingExtension.getBaseDir()
.public void setTestReportDirName(String testReportDirName)
public SourceSetContainer getSourceSets()
public org.gradle.api.internal.project.ProjectInternal getProject()
@Deprecated public void setProject(org.gradle.api.internal.project.ProjectInternal project)