public class EclipseJdt extends Object
plugins {
id 'java'
id 'eclipse'
}
eclipse {
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
javaRuntimeName = "J2SE-1.5"
file {
//whenMerged closure is the highest voodoo
//and probably should be used only to solve tricky edge cases.
//the type passed to the closure is Jdt
//closure executed after jdt file content is loaded from existing file
//and after gradle build information is merged
whenMerged { jdt
//you can tinker with the Jdt here
}
//withProperties allows addition of properties not currently
//modeled by Gradle
withProperties { properties ->
//you can tinker with the Properties here
}
}
}
}
| Constructor | Description |
|---|---|
EclipseJdt(PropertiesFileContentMerger file) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
file(Closure closure) |
Enables advanced configuration like affecting the way existing jdt file content
is merged with gradle build information
|
void |
file(Action<? super PropertiesFileContentMerger> action) |
Enables advanced configuration like affecting the way existing jdt file content
is merged with gradle build information
|
PropertiesFileContentMerger |
getFile() |
See
file(Action) |
String |
getJavaRuntimeName() |
The name of the Java Runtime to use.
|
JavaVersion |
getSourceCompatibility() |
The source Java language level.
|
JavaVersion |
getTargetCompatibility() |
The target JVM to generate
.class files for. |
void |
setJavaRuntimeName(String javaRuntimeName) |
|
void |
setSourceCompatibility(Object sourceCompatibility) |
|
void |
setSourceCompatibility(JavaVersion sourceCompatibility) |
Sets source compatibility.
|
void |
setTargetCompatibility(Object targetCompatibility) |
|
void |
setTargetCompatibility(JavaVersion targetCompatibility) |
Sets target compatibility.
|
@Inject public EclipseJdt(PropertiesFileContentMerger file)
public JavaVersion getSourceCompatibility()
For example see docs for EclipseJdt
public void setSourceCompatibility(JavaVersion sourceCompatibility)
public void setSourceCompatibility(Object sourceCompatibility)
public JavaVersion getTargetCompatibility()
.class files for.
For example see docs for EclipseJdt
public void setTargetCompatibility(JavaVersion targetCompatibility)
public void setTargetCompatibility(Object targetCompatibility)
public String getJavaRuntimeName()
For example see docs for EclipseJdt
public void setJavaRuntimeName(String javaRuntimeName)
public PropertiesFileContentMerger getFile()
file(Action)public void file(Closure closure)
The object passed to whenMerged{} and beforeMerged{} closures is of type Jdt
The object passed to withProperties{} closures is of type Properties
For example see docs for EclipseJdt
public void file(Action<? super PropertiesFileContentMerger> action)
The object passed to whenMerged{} and beforeMerged{} actions is of type Jdt
The object passed to withProperties{} actions is of type Properties
For example see docs for EclipseJdt