From 1adc60dd1460aafd4707a9418769ed771c130ea1 Mon Sep 17 00:00:00 2001 From: Andrew Oberstar Date: Thu, 4 Oct 2018 20:43:31 -0500 Subject: [PATCH] Improve config of Groovy formatting --- .../org/ajoberstar/gradle/defaults/DefaultsPlugin.groovy | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/groovy/org/ajoberstar/gradle/defaults/DefaultsPlugin.groovy b/src/main/groovy/org/ajoberstar/gradle/defaults/DefaultsPlugin.groovy index 8cb7aed..53d438e 100644 --- a/src/main/groovy/org/ajoberstar/gradle/defaults/DefaultsPlugin.groovy +++ b/src/main/groovy/org/ajoberstar/gradle/defaults/DefaultsPlugin.groovy @@ -98,16 +98,14 @@ class DefaultsPlugin implements Plugin { } project.plugins.withId('groovy') { groovy { + excludeJava() importOrder 'java', 'javax', 'groovy', '' - removeUnusedImports() greclipse().configFile(project.rootProject.file('gradle/eclipse-java-formatter.xml')) } } - format 'gradle', { + groovyGradle { target '**/*.gradle' - trimTrailingWhitespace() - indentWithSpaces(2) - endWithNewline() + greclipse().configFile(project.rootProject.file('gradle/eclipse-java-formatter.xml')) } } }