API Documentation: | EclipseClasspath |
---|
Generates an Eclipse .classpath
file.
Property | Description |
containers | Containers to be added to the classpath |
defaultOutputDir | The default output directory for eclipse generated files, eg classes. |
downloadJavadoc | Whether to download and add javadocs associated with the dependency jars. Defaults to false. |
downloadSources | Whether to download and add sources associated with the dependency jars. Defaults to true. |
inputFile | The input file to load the initial configuration from. Defaults to the output file. If the specified input file does not exist, this task uses some default initial configuration. |
minusConfigurations | The configurations which files are to be excluded from the classpath entries. |
outputFile | The output file to write the final configuration to. |
plusConfigurations | The configurations which files are to be transformed into classpath entries. |
sourceSets | The source sets to be added to the classpath. |
variables | The variables to be used for replacing absolute paths in classpath entries. |
Containers to be added to the classpath
- Default with
eclipse
andjava
plugins: - [JRE container]
File
defaultOutputDir
The default output directory for eclipse generated files, eg classes.
- Default with
eclipse
andjava
plugins: ${project.projectDir}
/bin
Whether to download and add javadocs associated with the dependency jars. Defaults to false.
- Default with
eclipse
andjava
plugins: false
Whether to download and add sources associated with the dependency jars. Defaults to true.
- Default with
eclipse
andjava
plugins: true
File
inputFile
The input file to load the initial configuration from. Defaults to the output file. If the specified input file does not exist, this task uses some default initial configuration.
Set
<Configuration
>
minusConfigurations
Set
<Configuration
>The configurations which files are to be excluded from the classpath entries.
- Default with
eclipse
andjava
plugins: []
File
outputFile
The output file to write the final configuration to.
- Default with
eclipse
andjava
plugins: ${project.projectDir}
/.classpath
Set
<Configuration
>
plusConfigurations
Set
<Configuration
>The configurations which files are to be transformed into classpath entries.
- Default with
eclipse
andjava
plugins: project.configurations.testRuntime
The source sets to be added to the classpath.
- Default with
eclipse
andjava
plugins: project.sourceSets
Method | Description |
beforeConfigured(closure) | Adds a closure to be called before the domain object is configured by this task. The domain object is passed as a parameter to the closure. |
beforeConfigured(action) | Adds an action to be called before the domain object is configured by this task. The domain object is passed as a parameter to the action. |
containers(containers) | Adds containers to the .classpath. |
variables(variables) | Adds variables to be used for replacing absolute paths in classpath entries. |
whenConfigured(closure) | Adds a closure to be called after the domain object has been configured by this task. The domain object is passed as a parameter to the closure. |
whenConfigured(action) | Adds an action to be called after the domain object has been configured by this task. The domain object is passed as a parameter to the action. |
withXml(closure) | Adds a closure to be called when the XML document has been created. The XML is passed to the closure as a
parameter in form of a |
withXml(action) | Adds an action to be called when the XML document has been created. The XML is passed to the action as a
parameter in form of a |
void
beforeConfigured
(Closure
closure)
Adds a closure to be called before the domain object is configured by this task. The domain object is passed as a parameter to the closure.
The closure is executed after the domain object has been loaded from the input file. Using this method allows you to change the domain object in some way before the task configures it.
void
beforeConfigured
(Action
<? super T
>
action)
Action
<? super T
>Adds an action to be called before the domain object is configured by this task. The domain object is passed as a parameter to the action.
The action is executed after the domain object has been loaded from the input file. Using this method allows you to change the domain object in some way before the task configures it.
void
containers
(String
...
containers)
String
...Adds containers to the .classpath.
Adds variables to be used for replacing absolute paths in classpath entries.
void
whenConfigured
(Closure
closure)
Adds a closure to be called after the domain object has been configured by this task. The domain object is passed as a parameter to the closure.
The closure is executed just before the domain object is written to the output file. Using this method allows you to override the configuration applied by this task.
void
whenConfigured
(Action
<? super T
>
action)
Action
<? super T
>Adds an action to be called after the domain object has been configured by this task. The domain object is passed as a parameter to the action.
The action is executed just before the domain object is written to the output file. Using this method allows you to override the configuration applied by this task.
void
withXml
(Closure
closure)
Adds a closure to be called when the XML document has been created. The XML is passed to the closure as a
parameter in form of a XmlProvider
. The closure can modify the XML before
it is written to the output file.
void
withXml
(Action
<? super XmlProvider
>
action)
Action
<? super XmlProvider
>Adds an action to be called when the XML document has been created. The XML is passed to the action as a
parameter in form of a XmlProvider
. The action can modify the XML before
it is written to the output file.