GenerateEclipseProject

API Documentation:GenerateEclipseProject

Generates an Eclipse .project file. If you want to fine tune the eclipse configuration

At this moment nearly all configuration is done via EclipseProject.

Properties

PropertyDescription
buildCommands

Deprecated. Please use #eclipse.project.buildCommands. See examples in EclipseProject.

comment

Deprecated. Please use #eclipse.project.comment. See examples in EclipseProject.

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.

links

Deprecated. Please use #eclipse.project.linkedResources. See examples in EclipseProject.

natures

Deprecated. Please use #eclipse.project.natures. See examples in EclipseProject.

outputFile

The output file to write the final configuration to.

projectName

Deprecated. Please use #eclipse.project.name. See examples in EclipseProject.

referencedProjects

Deprecated. Please use #eclipse.project.referencedProjects. See examples in EclipseProject.

Property details

List<BuildCommand> buildCommands

Deprecated. Please use #eclipse.project.buildCommands. See examples in EclipseProject.

The build commands to be added to this Eclipse project.

Default with eclipse and java plugins:
Java builder, plus Scala and Web builders as appropriate.

String comment

Deprecated. Please use #eclipse.project.comment. See examples in EclipseProject.

A comment used for the eclipse project

Default with eclipse and java plugins:
project.description

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<Link> links

Deprecated. Please use #eclipse.project.linkedResources. See examples in EclipseProject.

The linked resources to be added to this Eclipse project.

Default with eclipse and java plugins:
[]

List<String> natures

Deprecated. Please use #eclipse.project.natures. See examples in EclipseProject.

The natures to be added to this Eclipse project.

Default with eclipse and java plugins:
Java nature, plus Groovy, Scala and Web natures as appropriate.

File outputFile

The output file to write the final configuration to.

Default with eclipse and java plugins:
${project.projectDir}/.project

String projectName

Deprecated. Please use #eclipse.project.name. See examples in EclipseProject.

Configures eclipse project name. It is optional because the task should configure it correctly for you. By default it will try to use the project.name or prefix it with a part of a project.path to make sure the moduleName is unique in the scope of a multi-module build. The 'uniqeness' of a module name is required for correct import into Eclipse and the task will make sure the name is unique.

The logic that makes sure project names are uniqe is available since 1.0-milestone-2

In case you need to override the default projectName this is the way to go:

apply plugin: 'eclipse'

eclipseProject {
  projectName = 'some-important-project'
}
Default with eclipse and java plugins:
project.name

Set<String> referencedProjects

Deprecated. Please use #eclipse.project.referencedProjects. See examples in EclipseProject.

The referenced projects of this Eclipse project.

Default with eclipse and java plugins:
[]

Script blocks

No script blocks

Methods

MethodDescription
beforeConfigured(closure)

Deprecated. Moved to the relevant type. Where? For starters, see examples in IdeaProject or EclipseProject.

beforeConfigured(action)

Deprecated. Moved to the relevant type. Where? For starters, see examples in IdeaProject or EclipseProject.

buildCommand(buildCommand)

Deprecated. Please use #eclipse.project.buildCommand. See examples in EclipseProject.

buildCommand(args, buildCommand)

Deprecated. Please use #eclipse.project.buildCommand. See examples in EclipseProject.

link(args)

Deprecated. Please use #eclipse.project.linkedResource. See examples in EclipseProject.

natures(natures)

Deprecated. Please use #eclipse.project.natures. See examples in EclipseProject.

referencedProjects(referencedProjects)

Deprecated. Please use #eclipse.project.referencedProjects. See examples in EclipseProject.

whenConfigured(closure)

Deprecated. Moved to the relevant type. Where? For starters, see examples in IdeaProject or EclipseProject.

whenConfigured(action)

Deprecated. Moved to the relevant type. Where? For starters, see examples in IdeaProject or EclipseProject.

withXml(closure)

Deprecated. Moved to the relevant type. Where? For starters, see examples in IdeaProject or EclipseProject.

withXml(action)

Deprecated. Moved to the relevant type. Where? For starters, see examples in IdeaProject or EclipseProject.

Method details

void beforeConfigured(Closure closure)

Deprecated. Moved to the relevant type. Where? For starters, see examples in IdeaProject or EclipseProject.

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)

Deprecated. Moved to the relevant type. Where? For starters, see examples in IdeaProject or EclipseProject.

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 buildCommand(String buildCommand)

Deprecated. Please use #eclipse.project.buildCommand. See examples in EclipseProject.

Adds a build command to the eclipse project.

void buildCommand(Map args, String buildCommand)

Deprecated. Please use #eclipse.project.buildCommand. See examples in EclipseProject.

Adds a build command with arguments to the eclipse project.

void link(Map<String, String> args)

Deprecated. Please use #eclipse.project.linkedResource. See examples in EclipseProject.

Adds a link to the eclipse project.

void natures(String... natures)

Deprecated. Please use #eclipse.project.natures. See examples in EclipseProject.

Adds natures entries to the eclipse project.

void referencedProjects(String... referencedProjects)

Deprecated. Please use #eclipse.project.referencedProjects. See examples in EclipseProject.

Adds project references to the eclipse project.

void whenConfigured(Closure closure)

Deprecated. Moved to the relevant type. Where? For starters, see examples in IdeaProject or EclipseProject.

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)

Deprecated. Moved to the relevant type. Where? For starters, see examples in IdeaProject or EclipseProject.

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)

Deprecated. Moved to the relevant type. Where? For starters, see examples in IdeaProject or EclipseProject.

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)

Deprecated. Moved to the relevant type. Where? For starters, see examples in IdeaProject or EclipseProject.

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.