Class EclipseModel
- java.lang.Object
-
- org.gradle.plugins.ide.eclipse.model.EclipseModel
-
public class EclipseModel extends Object
DSL-friendly model of the Eclipse project information. First point of entry for customizing Eclipse project generation.apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'eclipse-wtp' //for web projects only eclipse { pathVariables 'GRADLE_HOME': file('/best/software/gradle'), 'TOMCAT_HOME': file('../tomcat') project { //see docs forMore examples in docs forEclipseProject} classpath { //see docs forEclipseClasspath} wtp { //see docs forEclipseWtp} }EclipseProject,EclipseClasspath,EclipseWtp
-
-
Constructor Summary
Constructors Constructor Description EclipseModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclasspath(Closure closure)Configures eclipse classpath informationvoidclasspath(Action<? super EclipseClasspath> action)Configures eclipse classpath informationEclipseClasspathgetClasspath()Configures eclipse classpath informationEclipseJdtgetJdt()Configures eclipse java compatibility information (jdt)protected ObjectFactorygetObjectFactory()Injects and returns an instance ofObjectFactory.EclipseProjectgetProject()Configures eclipse project informationEclipseWtpgetWtp()Configures eclipse wtp informationvoidjdt(Closure closure)Configures eclipse java compatibility information (jdt)voidjdt(Action<? super EclipseJdt> action)Configures eclipse java compatibility information (jdt)voidpathVariables(Map<String,File> pathVariables)Adds path variables to be used for replacing absolute paths in classpath entries.voidproject(Closure closure)Configures eclipse project informationvoidproject(Action<? super EclipseProject> action)Configures eclipse project informationvoidsetClasspath(EclipseClasspath classpath)voidsetJdt(EclipseJdt jdt)voidsetProject(EclipseProject project)voidsetWtp(EclipseWtp wtp)voidwtp(Closure closure)Configures eclipse wtp informationvoidwtp(Action<? super EclipseWtp> action)Configures eclipse wtp information
-
-
-
Method Detail
-
getObjectFactory
@Inject protected ObjectFactory getObjectFactory()
Injects and returns an instance ofObjectFactory.- Since:
- 4.9
-
getProject
public EclipseProject getProject()
Configures eclipse project informationFor examples see docs for
EclipseProject
-
setProject
public void setProject(EclipseProject project)
-
getClasspath
public EclipseClasspath getClasspath()
Configures eclipse classpath informationFor examples see docs for
EclipseClasspath
-
setClasspath
public void setClasspath(EclipseClasspath classpath)
-
getJdt
public EclipseJdt getJdt()
Configures eclipse java compatibility information (jdt)For examples see docs for
EclipseProject
-
setJdt
public void setJdt(EclipseJdt jdt)
-
getWtp
public EclipseWtp getWtp()
Configures eclipse wtp informationFor examples see docs for
EclipseWtp
-
setWtp
public void setWtp(EclipseWtp wtp)
-
project
public void project(Closure closure)
Configures eclipse project informationFor examples see docs for
EclipseProject
-
project
public void project(Action<? super EclipseProject> action)
Configures eclipse project informationFor examples see docs for
EclipseProject- Since:
- 3.5
-
classpath
public void classpath(Closure closure)
Configures eclipse classpath informationFor examples see docs for
EclipseClasspath
-
classpath
public void classpath(Action<? super EclipseClasspath> action)
Configures eclipse classpath informationFor examples see docs for
EclipseClasspath- Since:
- 3.5
-
wtp
public void wtp(Closure closure)
Configures eclipse wtp informationFor examples see docs for
EclipseWtp
-
wtp
public void wtp(Action<? super EclipseWtp> action)
Configures eclipse wtp informationFor examples see docs for
EclipseWtp- Since:
- 3.5
-
jdt
public void jdt(Closure closure)
Configures eclipse java compatibility information (jdt)For examples see docs for
EclipseProject
-
jdt
public void jdt(Action<? super EclipseJdt> action)
Configures eclipse java compatibility information (jdt)For examples see docs for
EclipseProject- Since:
- 3.5
-
pathVariables
public void pathVariables(Map<String,File> pathVariables)
Adds path variables to be used for replacing absolute paths in classpath entries.If the beginning of the absolute path of a library or other path-related element matches a value of a variable, a variable entry is used. The matching part of the library path is replaced with the variable name.
For example see docs for
EclipseModel- Parameters:
pathVariables- A map with String->File pairs.
-
-