EclipseJdt (Gradle API 2.14.1)

Package: org.gradle.plugins.ide.eclipse.model

## [Java] Class EclipseJdt

- org.gradle.plugins.ide.eclipse.model.EclipseJdt

- Enables fine-tuning jdt details of the Eclipse plugin

       apply plugin: 'java'
       apply plugin: '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 Summary

    Constructors
    Constructor and description
    `EclipseJdt (PropertiesFileContentMerger file)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `void` | `file(groovy.lang.Closure closure)` Enables advanced configuration like affecting the way existing jdt file content is merged with gradle build information
    `PropertiesFileContentMerger` | `getFile()` See file(Closure)
    `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` | `setTargetCompatibility(Object targetCompatibility)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class groovy.lang.GroovyObjectSupport` | `groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#wait(long, int), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(), groovy.lang.GroovyObjectSupport#equals(java.lang.Object), groovy.lang.GroovyObjectSupport#toString(), groovy.lang.GroovyObjectSupport#hashCode(), groovy.lang.GroovyObjectSupport#getClass(), groovy.lang.GroovyObjectSupport#notify(), groovy.lang.GroovyObjectSupport#notifyAll()`
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Constructor Detail

    - #### public EclipseJdt(PropertiesFileContentMerger file)

  - ### Method Detail

    - #### public void file(groovy.lang.Closure closure)

      Enables advanced configuration like affecting the way existing jdt file content is merged with gradle build information

      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 PropertiesFileContentMerger getFile()

      See file(Closure)

    - #### @Incubating public String getJavaRuntimeName()

      The name of the Java Runtime to use.

      For example see docs for EclipseJdt

    - #### public JavaVersion getSourceCompatibility()

      The source Java language level.

      For example see docs for EclipseJdt

    - #### public JavaVersion getTargetCompatibility()

      The target JVM to generate `.class` files for.

      For example see docs for EclipseJdt

    - #### @Incubating public void setJavaRuntimeName(String javaRuntimeName)

    - #### public void setSourceCompatibility(Object sourceCompatibility)

    - #### public void setTargetCompatibility(Object targetCompatibility)