Class EclipseJdt
- java.lang.Object
-
- org.gradle.plugins.ide.eclipse.model.EclipseJdt
-
public abstract class EclipseJdt extends java.lang.ObjectEnables fine-tuning jdt details of the Eclipse pluginplugins { 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 isJdt//closure executed after jdt file content is loaded from existing file //and after gradle build information is merged whenMerged { jdt //you can tinker with theJdthere } //withProperties allows addition of properties not currently //modeled by Gradle withProperties { properties -> //you can tinker with thePropertieshere } } } }
-
-
Constructor Summary
Constructors Constructor Description EclipseJdt(PropertiesFileContentMerger file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfile(Closure closure)Enables advanced configuration like affecting the way existing jdt file content is merged with gradle build informationvoidfile(Action<? super PropertiesFileContentMerger> action)Enables advanced configuration like affecting the way existing jdt file content is merged with gradle build informationPropertiesFileContentMergergetFile()Seefile(Action)java.lang.StringgetJavaRuntimeName()The name of the Java Runtime to use.JavaVersiongetSourceCompatibility()The source Java language level.JavaVersiongetTargetCompatibility()The target JVM to generate.classfiles for.voidsetJavaRuntimeName(java.lang.String javaRuntimeName)voidsetSourceCompatibility(java.lang.Object sourceCompatibility)voidsetSourceCompatibility(JavaVersion sourceCompatibility)Sets source compatibility.voidsetTargetCompatibility(java.lang.Object targetCompatibility)voidsetTargetCompatibility(JavaVersion targetCompatibility)Sets target compatibility.
-
-
-
Constructor Detail
-
EclipseJdt
@Inject public EclipseJdt(PropertiesFileContentMerger file)
-
-
Method Detail
-
getSourceCompatibility
public JavaVersion getSourceCompatibility()
The source Java language level.For example see docs for
EclipseJdt
-
setSourceCompatibility
public void setSourceCompatibility(JavaVersion sourceCompatibility)
Sets source compatibility.- Since:
- 4.0
-
setSourceCompatibility
public void setSourceCompatibility(java.lang.Object sourceCompatibility)
-
getTargetCompatibility
public JavaVersion getTargetCompatibility()
The target JVM to generate.classfiles for.For example see docs for
EclipseJdt
-
setTargetCompatibility
public void setTargetCompatibility(JavaVersion targetCompatibility)
Sets target compatibility.- Since:
- 4.0
-
setTargetCompatibility
public void setTargetCompatibility(java.lang.Object targetCompatibility)
-
getJavaRuntimeName
public java.lang.String getJavaRuntimeName()
The name of the Java Runtime to use.For example see docs for
EclipseJdt
-
setJavaRuntimeName
public void setJavaRuntimeName(java.lang.String javaRuntimeName)
-
getFile
public PropertiesFileContentMerger getFile()
Seefile(Action)
-
file
public void file(@DelegatesTo(PropertiesFileContentMerger.class) Closure closure)
Enables advanced configuration like affecting the way existing jdt file content is merged with gradle build informationThe object passed to whenMerged{} and beforeMerged{} closures is of type
JdtThe object passed to withProperties{} closures is of type
PropertiesFor example see docs for
EclipseJdt
-
file
public void file(Action<? super PropertiesFileContentMerger> action)
Enables advanced configuration like affecting the way existing jdt file content is merged with gradle build informationThe object passed to whenMerged{} and beforeMerged{} actions is of type
JdtThe object passed to withProperties{} actions is of type
PropertiesFor example see docs for
EclipseJdt- Since:
- 3.5
-
-