|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Objectorg.gradle.plugins.ide.eclipse.model.EclipseClasspath
class EclipseClasspath extends java.lang.Object
DSL-friendly model of the eclipse classpath needed for .classpath generation
Example of use with a blend of all possible properties. Bear in mind that usually you don't have configure eclipse classpath directly because Gradle configures it for free!
apply plugin: 'java' apply plugin: 'eclipse' configurations { provided someBoringConfig } eclipse { //if you want parts of paths in resulting file to be replaced by variables (files): pathVariables 'GRADLE_HOME': file('/best/software/gradle'), 'TOMCAT_HOME': file('../tomcat') classpath { //you can configure the sourceSets however Gradle simply uses current sourceSets //so it's probably best not to change it. //sourceSets = //you can tweak the classpath of the eclipse project by adding extra configurations: plusConfigurations += configurations.provided //you can also remove configurations from the classpath: minusConfigurations += configurations.someBoringConfig //if you want to append extra containers: containers 'someFriendlyContainer', 'andYetAnotherContainer' //customizing the classes output directory: classesOutputDir = file('build-eclipse') //default settings for dependencies sources/javadoc download: downloadSources = true downloadJavadoc = false } }Author: Szczepan Faber, created at: 4/16/11
Property Summary | |
---|---|
java.io.File |
classesOutputDir
The default output directory for eclipse generated files, eg classes. |
java.util.Set |
containers
Containers to be added to the classpath For example see docs for EclipseClasspath |
boolean |
downloadJavadoc
Whether to download and add javadocs associated with the dependency jars. |
boolean |
downloadSources
Whether to download and add sources associated with the dependency jars. |
java.util.Collection |
minusConfigurations
The configurations which files are to be excluded from the classpath entries. |
java.util.Map |
pathVariables
The path variables to be used for replacing absolute paths in classpath entries. |
java.util.Collection |
plusConfigurations
The configurations which files are to be transformed into classpath entries. |
java.lang.Object |
project
* |
java.lang.Iterable |
sourceSets
The source sets to be added to the classpath. |
Method Summary | |
---|---|
void
|
containers(java.lang.String containers)
Adds containers to the .classpath. |
void
|
mergeXmlClasspath(Classpath xmlClasspath)
|
java.util.List
|
resolveDependencies()
Calculates, resolves & returns dependency entries of this classpath |
void
|
setProjectDependenciesOnly(boolean projectDependenciesOnly)
Modifies the content of plusConfigurations and minusConfigurations by filtering dependencies |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Property Detail |
---|
java.io.File classesOutputDir
For example see docs for EclipseClasspath
java.util.Set containers
For example see docs for EclipseClasspath
boolean downloadJavadoc
For example see docs for EclipseClasspath
boolean downloadSources
For example see docs for EclipseClasspath
java.util.Collection minusConfigurations
For example see docs for EclipseClasspath
java.util.Map pathVariables
For example see docs for EclipseModel
java.util.Collection plusConfigurations
For example see docs for EclipseClasspath
java.lang.Object project
java.lang.Iterable sourceSets
For example see docs for EclipseClasspath
Method Detail |
---|
void containers(java.lang.String containers)
For example see docs for EclipseClasspath
containers
- the container names to be added to the .classpath.
void mergeXmlClasspath(Classpath xmlClasspath)
java.util.List resolveDependencies()
void setProjectDependenciesOnly(boolean projectDependenciesOnly)
projectDependenciesOnly
- true - only project dependencies, false - no filter
Groovy Documentation