Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD

## org.gradle.plugins.ide.eclipse.model
[Groovy] Class EclipseJdt

    java.lang.Object
      org.gradle.plugins.ide.eclipse.model.EclipseJdt

    class EclipseJdt
    extends java.lang.Object

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

         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
           }
         }
       }
     }

@author: Szczepan Faber, created at: 4/20/11

Property Summary
`FileContentMerger` | `file` See file(Closure)
`JavaVersion` | `sourceCompatibility` The source Java language level.
`JavaVersion` | `targetCompatibility` The target JVM to generate `.class` files for.

Method Summary
`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
`void` | `setSourceCompatibility(java.lang.Object sourceCompatibility)`
`void` | `setTargetCompatibility(java.lang.Object targetCompatibility)`

Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Property Detail

### file

    FileContentMerger file

  See file(Closure)

### sourceCompatibility

    JavaVersion sourceCompatibility

  The source Java language level.

  For example see docs for EclipseJdt

### targetCompatibility

    JavaVersion targetCompatibility

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

  For example see docs for EclipseJdt

Method Detail

### file

    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

  For example see docs for EclipseJdt

### setSourceCompatibility

    void setSourceCompatibility(java.lang.Object sourceCompatibility)

### setTargetCompatibility

    void setTargetCompatibility(java.lang.Object targetCompatibility)

Groovy Documentation