plugins { // Support convention plugins written in Groovy. Convention plugins // are build scripts in 'src/main' that automatically become available // as plugins in the main build. id 'groovy-gradle-plugin' // Apply eclipse plugin id 'eclipse' } sourceSets { main { groovy { srcDirs = ['src'] } resources { srcDirs = ['resources'] } } } eclipse { jdt { file { withProperties { properties -> def formatterPrefs = new Properties() rootProject.file("../gradle/org.eclipse.jdt.core.formatter.prefs") .withInputStream { formatterPrefs.load(it) } properties.putAll(formatterPrefs) } } } }