|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Object org.gradle.plugins.ide.eclipse.model.EclipseProject
class EclipseProject extends java.lang.Object
DSL-friendly model of the eclipse project needed for .project generation
Example of use with a blend of all possible properties. Bear in mind that usually you don't have configure eclipse project directly because Gradle configures it for free!
apply plugin: 'java' apply plugin: 'eclipse' eclipse { project { //if you don't like the name Gradle has chosen name = 'someBetterName' //if you want to specify the Eclipse project's comment comment = 'Very interesting top secret project' //if you want to append some extra referenced projects in a declarative fashion: referencedProjects 'someProject', 'someOtherProject' //if you want to assign referenced projects referencedProjects = ['someProject'] as Set //if you want to append some extra natures in a declarative fashion: natures 'some.extra.eclipse.nature', 'some.another.interesting.nature' //if you want to assign natures in a groovy fashion: natures = ['some.extra.eclipse.nature', 'some.another.interesting.nature'] //if you want to append some extra build command: buildCommand 'buildThisLovelyProject' //if you want to append a build command with parameters: buildCommand argumentOne: "I'm first", argumentTwo: "I'm second", 'buildItWithTheArguments' //if you want to create an extra link in the eclipse project, //by location uri: linkedResource name: 'someLinkByLocationUri', type: 'someLinkType', locationUri: 'file://someUri' //by location: linkedResource name: 'someLinkByLocation', type: 'someLinkType', location: '/some/location' } jdt { //if you want to alter the java versions (by default they are configured with gradle java plugin settings): sourceCompatibility = 1.6 targetCompatibility = 1.5 } }Author: Szczepan Faber, created at: 4/13/11
Property Summary | |
---|---|
java.util.List |
buildCommands
The build commands to be added to this Eclipse project. |
java.lang.String |
comment
A comment used for the eclipse project. |
java.util.Set |
linkedResources
The linked resources to be added to this Eclipse project. |
java.lang.String |
name
Configures eclipse project name. |
java.util.List |
natures
The natures to be added to this Eclipse project. |
java.util.Set |
referencedProjects
The referenced projects of this Eclipse project. |
Method Summary | |
---|---|
void
|
buildCommand(java.util.Map args, java.lang.String buildCommand)
Adds a build command with arguments to the eclipse project. |
void
|
buildCommand(java.lang.String buildCommand)
Adds a build command to the eclipse project. |
void
|
linkedResource(java.util.Map args)
Adds a resource link (aka 'source link') to the eclipse project. |
void
|
mergeXmlProject(Project xmlProject)
|
void
|
natures(java.lang.String natures)
Appends natures entries to the eclipse project. |
void
|
referencedProjects(java.lang.String referencedProjects)
Adds project references to the eclipse project. |
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.util.List buildCommands
For example see docs for EclipseProject
java.lang.String comment
For example see docs for EclipseProject
java.util.Set linkedResources
For example see docs for EclipseProject
java.lang.String name
The logic that makes sure project names are uniqe is available since 1.0-milestone-2
For example see docs for EclipseProject
java.util.List natures
For example see docs for EclipseProject
java.util.Set referencedProjects
For example see docs for EclipseProject
Method Detail |
---|
void buildCommand(java.util.Map args, java.lang.String buildCommand)
For example see docs for EclipseProject
args
- A map with arguments, where the key is the name of the argument and the value the value.buildCommand
- The name of the build command.
void buildCommand(java.lang.String buildCommand)
For example see docs for EclipseProject
buildCommand
- The name of the build command
void linkedResource(java.util.Map args)
For example see docs for EclipseProject
args
- A maps with the args for the link. Legal keys for the map are name, type, location and locationUri.
void mergeXmlProject(Project xmlProject)
void natures(java.lang.String natures)
For example see docs for EclipseProject
natures
- the nature names
void referencedProjects(java.lang.String referencedProjects)
referencedProjects
- The name of the project references.
Groovy Documentation