gradle
8.2

# EclipseJdt

abstract class EclipseJdt

Enables fine-tuning jdt details of the Eclipse plugin

    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 java.util.Properties here
          }
        }
      }
    }

Content copied to clipboard

## Constructors

EclipseJdt
Link copied to clipboard
@Inject
constructor(file: PropertiesFileContentMerger)

## Functions

file
Link copied to clipboard
open fun file(@DelegatesTo(value = PropertiesFileContentMerger::class) 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 java.util.Properties For example see docs for EclipseJdt
open fun file(action: Action<out Any>)
Enables advanced configuration like affecting the way existing jdt file content is merged with gradle build information The object passed to whenMerged{} and beforeMerged{} actions is of type Jdt The object passed to withProperties{} actions is of type java.util.Properties For example see docs for EclipseJdt
setSourceCompatibility
Link copied to clipboard
open fun setSourceCompatibility(sourceCompatibility: Any)
setTargetCompatibility
Link copied to clipboard
open fun setTargetCompatibility(targetCompatibility: Any)

## Properties

file
Link copied to clipboard
val file: PropertiesFileContentMerger
javaRuntimeName
Link copied to clipboard
open var javaRuntimeName: String
sourceCompatibility
Link copied to clipboard
open var sourceCompatibility: JavaVersion
targetCompatibility
Link copied to clipboard
open var targetCompatibility: JavaVersion