From e75bac8442b1861390de9dad6ae3d83612025500 Mon Sep 17 00:00:00 2001 From: Frank Vennemeyer Date: Tue, 28 Jan 2020 20:47:52 +0100 Subject: [PATCH 1/7] First draft for _ext using gradle 6 based on Spotless root project. --- _ext/BUILD_INSTRUCTIONS.md | 10 ++--- _ext/eclipse-base/build.gradle | 4 +- _ext/eclipse-base/gradle.properties | 15 ++----- _ext/eclipse-cdt/build.gradle | 6 +-- _ext/eclipse-cdt/gradle.properties | 14 ++---- _ext/eclipse-groovy/build.gradle | 4 +- _ext/eclipse-groovy/gradle.properties | 15 ++----- _ext/eclipse-jdt/build.gradle | 4 +- _ext/eclipse-jdt/gradle.properties | 12 ++--- _ext/eclipse-wtp/build.gradle | 14 +----- _ext/eclipse-wtp/gradle.properties | 15 ++----- _ext/gradle/java-publish.gradle | 37 ++++++---------- _ext/gradle/java-setup.gradle | 63 +++++---------------------- _ext/gradle/p2-fat-jar-setup.gradle | 2 +- gradle.properties | 3 ++ settings.gradle | 8 ++++ 16 files changed, 65 insertions(+), 161 deletions(-) diff --git a/_ext/BUILD_INSTRUCTIONS.md b/_ext/BUILD_INSTRUCTIONS.md index 377daf9ade..2a65c2865c 100644 --- a/_ext/BUILD_INSTRUCTIONS.md +++ b/_ext/BUILD_INSTRUCTIONS.md @@ -1,9 +1,5 @@ -The `_ext` builds are currently tested only with gradle `4.4.1`. They are known not to work for the current wrapper version. +The `_ext` builds are per default disabled. They can be enabled by setting the environment +variable `SPOTLESS_EXT` to `true`. -To install the correct version using [sdkman](https://sdkman.io/install): - -- `sdk install gradle 4.4.1` -- `sdk default gradle 4.4.1` - -Then you can do `gradle -b _ext/{DIR}/build.gradle publish`. `gradlew` will not work. +Trigger `./gradlew -DSPOTLESS_EXT='true' publishToMavenLocal` in your local checkout. diff --git a/_ext/eclipse-base/build.gradle b/_ext/eclipse-base/build.gradle index 6d98470d71..15de1b1e9c 100644 --- a/_ext/eclipse-base/build.gradle +++ b/_ext/eclipse-base/build.gradle @@ -1,5 +1,5 @@ -apply from: rootProject.file('../gradle/java-setup.gradle') -apply from: rootProject.file('../gradle/java-publish.gradle') +apply from: rootProject.file('gradle/java-setup.gradle') +apply from: rootProject.file('gradle/java-publish.gradle') ext { developers = [ diff --git a/_ext/eclipse-base/gradle.properties b/_ext/eclipse-base/gradle.properties index aebbc9672a..2e43614b3a 100644 --- a/_ext/eclipse-base/gradle.properties +++ b/_ext/eclipse-base/gradle.properties @@ -1,18 +1,9 @@ # Mayor versions correspond to the supported Eclipse core version. # Minor version is incremented for features or incompatible changes (including changes to supported dependency versions). # Patch version is incremented for backward compatible patches of this library. -ext_version=3.2.1 -ext_artifactId=spotless-eclipse-base -ext_description=Eclipse bundle controller and services for Spotless - -ext_org=diffplug -ext_group=com.diffplug.spotless - -# Build requirements -ext_VER_JAVA=1.8 +version=3.2.1 +artifactId=spotless-eclipse-base +description=Eclipse bundle controller and services for Spotless # Compile dependencies VER_ECLIPSE_CORE_RESOURCES=[3.13.400,4.0.0[ - -# Provided dependencies -VER_SLF4J=[1.6,2.0[ \ No newline at end of file diff --git a/_ext/eclipse-cdt/build.gradle b/_ext/eclipse-cdt/build.gradle index 278cf039c3..668bbcb070 100644 --- a/_ext/eclipse-cdt/build.gradle +++ b/_ext/eclipse-cdt/build.gradle @@ -4,15 +4,15 @@ ext { ] p2Repository = "https://download.eclipse.org/tools/cdt/releases/${VER_ECLIPSE_CDT}" - + p2Dependencies = [ 'org.eclipse.cdt.core':'+', // CodeFormatter and related ] } -apply from: rootProject.file('../gradle/p2-fat-jar-setup.gradle') -apply from: rootProject.file('../gradle/java-publish.gradle') +apply from: rootProject.file('_ext/gradle/p2-fat-jar-setup.gradle') +apply from: rootProject.file('_ext/gradle/java-publish.gradle') dependencies { diff --git a/_ext/eclipse-cdt/gradle.properties b/_ext/eclipse-cdt/gradle.properties index a5109e3128..5a1923fe55 100644 --- a/_ext/eclipse-cdt/gradle.properties +++ b/_ext/eclipse-cdt/gradle.properties @@ -1,14 +1,9 @@ # Versions correspond to the Eclipse-CDT version used for the fat-JAR. # See https://www.eclipse.org/cdt/ for further information about Eclipse-CDT versions. # Patch version can be incremented independently for backward compatible patches of this library. -ext_version=9.9.0 -ext_artifactId=spotless-eclipse-cdt -ext_description=Eclipse's CDT C/C++ formatter bundled for Spotless -ext_org=diffplug -ext_group=com.diffplug.spotless - -# Build requirements -ext_VER_JAVA=1.8 +version=9.9.0 +artifactId=spotless-eclipse-cdt +description=Eclipse's CDT C/C++ formatter bundled for Spotless # Compile dependencies VER_ECLIPSE_CDT=9.9 @@ -16,6 +11,3 @@ VER_SPOTLESS_ECLISPE_BASE=[3.2.0,4.0.0[ VER_ECLISPE_JFACE=[3.15.300,4.0.0[ VER_ECLISPE_PLATFORM=[3.6.700,4.0.0[ VER_IBM_ICU=[61,62[ - -# Provided dependencies -VER_SLF4J=[1.6,2.0[ \ No newline at end of file diff --git a/_ext/eclipse-groovy/build.gradle b/_ext/eclipse-groovy/build.gradle index 53dc0895f3..62c162869c 100644 --- a/_ext/eclipse-groovy/build.gradle +++ b/_ext/eclipse-groovy/build.gradle @@ -28,8 +28,8 @@ ext { } -apply from: rootProject.file('../gradle/p2-fat-jar-setup.gradle') -apply from: rootProject.file('../gradle/java-publish.gradle') +apply from: rootProject.file('_ext/gradle/p2-fat-jar-setup.gradle') +apply from: rootProject.file('_ext/gradle/java-publish.gradle') dependencies { compile "com.diffplug.spotless:spotless-eclipse-base:${VER_SPOTLESS_ECLISPE_BASE}" diff --git a/_ext/eclipse-groovy/gradle.properties b/_ext/eclipse-groovy/gradle.properties index c0eff9e8d8..1410bdb150 100644 --- a/_ext/eclipse-groovy/gradle.properties +++ b/_ext/eclipse-groovy/gradle.properties @@ -1,15 +1,9 @@ # Versions correspond to the Groovy-Eclipse version used for the fat-JAR. # See https://github.com/groovy/groovy-eclipse/releases for further information about Groovy-Eclipse versions. # Patch version can be incremented independently for backward compatible patches of this library. -ext_version=3.5.0 -ext_artifactId=spotless-eclipse-groovy -ext_description=Groovy Eclipse's formatter bundled for Spotless - -ext_org=diffplug -ext_group=com.diffplug.spotless - -# Build requirements -ext_VER_JAVA=1.8 +version=3.5.0 +artifactId=spotless-eclipse-groovy +description=Groovy Eclipse's formatter bundled for Spotless # Compile VER_ECLIPSE=4.13 @@ -17,6 +11,3 @@ VER_SPOTLESS_ECLISPE_BASE=[3.2.0,4.0.0[ VER_ECLISPE_JFACE=[3.15.300,4.0.0[ VER_GRECLIPSE=3.5.0 VER_GROOVY=3.0.0 - -# Provided dependencies -VER_SLF4J=[1.6,2.0[ \ No newline at end of file diff --git a/_ext/eclipse-jdt/build.gradle b/_ext/eclipse-jdt/build.gradle index e079a42c41..20c11a2b7b 100644 --- a/_ext/eclipse-jdt/build.gradle +++ b/_ext/eclipse-jdt/build.gradle @@ -1,5 +1,5 @@ -apply from: rootProject.file('../gradle/java-setup.gradle') -apply from: rootProject.file('../gradle/java-publish.gradle') +apply from: rootProject.file('_ext/gradle/java-setup.gradle') +apply from: rootProject.file('_ext/gradle/java-publish.gradle') ext { developers = [ diff --git a/_ext/eclipse-jdt/gradle.properties b/_ext/eclipse-jdt/gradle.properties index 48116f43ec..497d352750 100644 --- a/_ext/eclipse-jdt/gradle.properties +++ b/_ext/eclipse-jdt/gradle.properties @@ -1,14 +1,8 @@ # Mayor/Minor versions correspond to the minimum Eclipse version supported/tested. # Patch version is incremented for backward compatible patches of this library. -ext_version=4.12.0 -ext_artifactId=spotless-eclipse-jdt -ext_description=Eclipse's JDT formatter bundled for Spotless - -ext_org=diffplug -ext_group=com.diffplug.spotless - -# Build requirements -ext_VER_JAVA=1.8 +version=4.12.0 +artifactId=spotless-eclipse-jdt +description=Eclipse's JDT formatter bundled for Spotless # Compile VER_ECLIPSE_JDT_CORE=[3.12.0,4.0.0[ diff --git a/_ext/eclipse-wtp/build.gradle b/_ext/eclipse-wtp/build.gradle index 3d79503157..ddc92603aa 100644 --- a/_ext/eclipse-wtp/build.gradle +++ b/_ext/eclipse-wtp/build.gradle @@ -1,6 +1,3 @@ -plugins { - id 'com.diffplug.gradle.spotless' version '3.27.0' -} ext { developers = [ fvgh: [ name: 'Frank Vennemeyer', email: 'frankgh@zoho.com' ], @@ -53,8 +50,8 @@ ext { ] } -apply from: rootProject.file('../gradle/p2-fat-jar-setup.gradle') -apply from: rootProject.file('../gradle/java-publish.gradle') +apply from: rootProject.file('_ext/gradle/p2-fat-jar-setup.gradle') +apply from: rootProject.file('_ext/gradle/java-publish.gradle') dependencies { compile "com.diffplug.spotless:spotless-eclipse-base:${VER_SPOTLESS_ECLISPE_BASE}" @@ -121,10 +118,3 @@ fileTree(dir: testLocation).include('**/*Test.java').each { file -> } test.dependsOn "${testFile}" } - -spotless { - format 'xml', { - target 'src/main/resources/**/*.xml' - eclipseWtp('xml').configFile 'spotless.xmlformat.prefs' - } -} diff --git a/_ext/eclipse-wtp/gradle.properties b/_ext/eclipse-wtp/gradle.properties index 142768223f..fa00ba5fe1 100644 --- a/_ext/eclipse-wtp/gradle.properties +++ b/_ext/eclipse-wtp/gradle.properties @@ -1,15 +1,9 @@ # Versions correspond to the Eclipse-WTP version used for the fat-JAR. # See https://www.eclipse.org/webtools/ for further information about Eclipse-WTP versions. # Patch version can be incremented independently for backward compatible patches of this library. -ext_version=3.15.1 -ext_artifactId=spotless-eclipse-wtp -ext_description=Eclipse's WTP formatters bundled for Spotless - -ext_org=diffplug -ext_group=com.diffplug.spotless - -# Build requirements -ext_VER_JAVA=1.8 +version=3.15.1 +artifactId=spotless-eclipse-wtp +description=Eclipse's WTP formatters bundled for Spotless # Compile VER_ECLIPSE_WTP=2019-09 @@ -21,6 +15,3 @@ VER_ECLIPSE_FILE_BUFFERS=[3.6.700,4.0.0[ VER_ECLISPE_JFACE=[3.15.300,4.0.0[ VER_ECLISPE_EFS=[1.7.500,2.0.0[ VER_ECLISPE_XSD=[2.12.0,3.0.0[ - -# Provided dependencies -VER_SLF4J=[1.6,2.0[ \ No newline at end of file diff --git a/_ext/gradle/java-publish.gradle b/_ext/gradle/java-publish.gradle index 0cae2aaae7..b620fc3858 100644 --- a/_ext/gradle/java-publish.gradle +++ b/_ext/gradle/java-publish.gradle @@ -1,14 +1,5 @@ -buildscript { - repositories { - jcenter() - } - dependencies { - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3' - } -} - -apply plugin: com.jfrog.bintray.gradle.BintrayPlugin apply plugin: 'maven-publish' +apply plugin: 'com.jfrog.bintray' task sourcesJar(type: Jar) { classifier = 'sources' @@ -20,7 +11,7 @@ task javadocJar(type: Jar, dependsOn: javadoc) { from javadoc.destinationDir } -def isSnapshot = ext_version.endsWith('-SNAPSHOT') +def isSnapshot = version.endsWith('-SNAPSHOT') // pulls the credentials from either the environment variable or gradle.properties def lookup = { key, defaultVal -> if (System.env[key] != null) { @@ -36,9 +27,9 @@ publishing { publications { mavenJava(MavenPublication) { - groupId project.ext_group - artifactId project.ext_artifactId - version project.ext_version + groupId project.group + artifactId project.artifactId + version project.version from components.java artifact sourcesJar artifact javadocJar @@ -48,13 +39,13 @@ publishing { // add MavenCentral requirements to the POM asNode().children().last() + { resolveStrategy = Closure.DELEGATE_FIRST - name project.ext_artifactId - description project.ext_description - url "/${project.ext_org}/${rootProject.name}" + name project.artifactId + description project.description + url "/${project.org}/${rootProject.name}" scm { - url "/${project.ext_org}/${rootProject.name}" - connection "scm:git:https://github.com/${project.ext_org}/${rootProject.name}.git" - developerConnection "scm:git:ssh:git@github.com/${project.ext_org}/${rootProject.name}.git" + url "/${project.org}/${rootProject.name}" + connection "scm:git:https://github.com/${project.org}/${rootProject.name}.git" + developerConnection "scm:git:ssh:git@github.com/${project.org}/${rootProject.name}.git" } licenses { license { @@ -101,10 +92,10 @@ if (!isSnapshot) { publish = true pkg { repo = 'opensource' - name = project.ext_artifactId - userOrg = project.ext_org + name = project.artifactId + userOrg = project.org version { - name = project.ext_version + name = project.version mavenCentralSync { user = lookup('nexus_user', 'unknown_nexus_user') password = lookup('nexus_pass', 'unknown_nexus_user') diff --git a/_ext/gradle/java-setup.gradle b/_ext/gradle/java-setup.gradle index 6d8bd31873..f86a2336d0 100644 --- a/_ext/gradle/java-setup.gradle +++ b/_ext/gradle/java-setup.gradle @@ -1,6 +1,8 @@ ////////// // JAVA // ////////// +apply from: rootProject.file('gradle/java-setup.gradle') + repositories { mavenCentral() jcenter() @@ -12,67 +14,22 @@ repositories { // setup java apply plugin: 'java' -sourceCompatibility = ext_VER_JAVA -targetCompatibility = ext_VER_JAVA +// Not all external code is not under control of Spotless developers. +// Don't warn about things that cannot be changed. tasks.withType(JavaCompile) { - options.encoding = 'UTF-8' options.compilerArgs << "-Xlint:unchecked" options.compilerArgs << "-Xlint:deprecation" } // Use file locking -configurations { - compileClasspath { - def gradleVersion = GradleVersion.current() - def requiredVersion = GradleVersion.version('4.8') - if (gradleVersion >= requiredVersion) { - resolutionStrategy.activateDependencyLocking() - } - } -} - - -///////////// -// ECLIPSE // -///////////// -apply plugin: 'eclipse' -eclipse { - classpath { - downloadSources true - downloadJavadoc true +configurations.all { + resolutionStrategy { + activateDependencyLocking() } } -// always create fresh projects -tasks.eclipse.dependsOn(cleanEclipse) -////////////// -// FINDBUGS // -////////////// -apply plugin: 'findbugs' -findbugs { - toolVersion = '3.0.1' - sourceSets = [ - // don't check the test code - sourceSets.main - ] - ignoreFailures = false // bug free or it doesn't ship! - reportsDir = file('build/findbugs') - effort = 'max' // min|default|max - reportLevel = 'medium' // low|medium|high (low = sensitive to even minor mistakes) - omitVisitors = [] // bugs that we want to ignore -} -// HTML instead of XML -tasks.withType(FindBugs) { - reports { - xml.enabled = false - html.enabled = true - } -} -// we'll want the findbugs annotations (they don't have a 3.0.1 version) +//Currently testlib is not used by _ext. Hence the external dependencies are added here. dependencies { - compileOnly 'com.google.code.findbugs:annotations:3.0.0' - compileOnly 'com.google.code.findbugs:jsr305:3.0.0' - - testImplementation 'junit:junit:4.12' - testImplementation 'org.assertj:assertj-core:3.5.2' + testImplementation "junit:junit:${VER_JUNIT}" + testImplementation 'org.assertj:assertj-core:${VER_ASSERTJ}' } diff --git a/_ext/gradle/p2-fat-jar-setup.gradle b/_ext/gradle/p2-fat-jar-setup.gradle index dd404e1a31..ff15bc4dc7 100644 --- a/_ext/gradle/p2-fat-jar-setup.gradle +++ b/_ext/gradle/p2-fat-jar-setup.gradle @@ -1,4 +1,4 @@ -apply from: rootProject.file('../gradle/java-setup.gradle') +apply from: rootProject.file('_ext/gradle/java-setup.gradle') buildscript { repositories { diff --git a/gradle.properties b/gradle.properties index 025c89fbf9..ea5d528a40 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,6 +17,9 @@ artifactIdGradle=spotless-plugin-gradle VER_JAVA=1.8 VER_SPOTBUGS=3.1.6 +# Dependencies provided by Spotless plugin +VER_SLF4J=[1.6,2.0[ + # Used in multiple places VER_DURIAN=1.2.0 VER_JUNIT=4.12 diff --git a/settings.gradle b/settings.gradle index d610f5b89e..4791c0bae0 100644 --- a/settings.gradle +++ b/settings.gradle @@ -46,3 +46,11 @@ include 'plugin-gradle' // gradle-specific glue code if (System.getenv('SPOTLESS_EXCLUDE_MAVEN') != 'true' && System.getenv('JITPACK') != 'true') { include 'plugin-maven' // maven-specific glue code } + +// excludes external (_ext) projects from development builds, +if (System.getenv('SPOTLESS_EXT') != 'true') { + file('_ext').eachDirMatch(~/^(?!(\.|gradle)).*/) { dir -> + include dir.name + project(":${dir.name}").projectDir = dir + } +} From a71fdf10261009e8ec7aea8b634e0baa2b0a5415 Mon Sep 17 00:00:00 2001 From: Frank Vennemeyer Date: Fri, 31 Jan 2020 16:26:42 +0100 Subject: [PATCH 2/7] Final proposal for _ext build using Gradle 6. --- CONTRIBUTING.md | 20 ++++++++++++ _ext/BUILD_INSTRUCTIONS.md | 5 --- _ext/eclipse-base/README.md | 3 +- _ext/eclipse-base/build.gradle | 4 +-- _ext/eclipse-cdt/README.md | 3 +- _ext/eclipse-cdt/build.gradle | 5 +-- _ext/eclipse-groovy/README.md | 3 +- _ext/eclipse-groovy/build.gradle | 22 ++++++++----- _ext/eclipse-jdt/README.md | 3 +- _ext/eclipse-jdt/build.gradle | 1 + _ext/eclipse-wtp/README.md | 3 +- _ext/eclipse-wtp/build.gradle | 50 ++++++++++++++++------------- _ext/gradle/java-setup.gradle | 20 ++---------- _ext/gradle/p2-fat-jar-setup.gradle | 27 +++------------- _ext/gradle/update-lockfile.gradle | 6 ++++ build.gradle | 2 ++ settings.gradle | 18 +++++++++-- 17 files changed, 108 insertions(+), 87 deletions(-) delete mode 100644 _ext/BUILD_INSTRUCTIONS.md create mode 100644 _ext/gradle/update-lockfile.gradle diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 36a989760b..4d186267b3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -101,6 +101,26 @@ Here's a checklist for creating a new step for Spotless: - [ ] Test class has test methods to verify behavior. - [ ] Test class has a test method `equality()` which tests equality using `StepEqualityTester` (see existing methods for examples). +## How to enable the _ext projects + +The `_ext` projects are disabled per default, since: + +* some of the projects perform vasts downloads at configuration time + +* the downloaded content may change on server side and break CI builds + + +The `_ext` can be activated via the root project property `com.diffplug.spotless.include_ext`. + +Activate the the property via command line, like for example: + +``` +gradlew -Pcom.diffplug.spotless.include.ext=true build + +``` + +Or set the property in your user `gradle.properties` file, which is especially recommended if you like to work with the `_ext` projects using IDEs. + ## How to add a new plugin for a build system The gist of it is that you will have to: diff --git a/_ext/BUILD_INSTRUCTIONS.md b/_ext/BUILD_INSTRUCTIONS.md deleted file mode 100644 index 2a65c2865c..0000000000 --- a/_ext/BUILD_INSTRUCTIONS.md +++ /dev/null @@ -1,5 +0,0 @@ - -The `_ext` builds are per default disabled. They can be enabled by setting the environment -variable `SPOTLESS_EXT` to `true`. - -Trigger `./gradlew -DSPOTLESS_EXT='true' publishToMavenLocal` in your local checkout. diff --git a/_ext/eclipse-base/README.md b/_ext/eclipse-base/README.md index 6b8ac83728..debe3be28b 100644 --- a/_ext/eclipse-base/README.md +++ b/_ext/eclipse-base/README.md @@ -55,7 +55,8 @@ is included in your formatter fat JAR, the directory structure should be: ## Build -To publish a new version, update the `_ext/eclipse-base/gradle.properties` appropriately and see [BUILD_INSTRUCTIONS.md](../BUILD_INSTRUCTIONS). +To publish a new version, update the `_ext/eclipse-base/gradle.properties` appropriately and see [CONTRIBUTING.md](../../CONTRIBUTING.md) how to enable +`_ext` projects. ## License diff --git a/_ext/eclipse-base/build.gradle b/_ext/eclipse-base/build.gradle index 15de1b1e9c..f517920132 100644 --- a/_ext/eclipse-base/build.gradle +++ b/_ext/eclipse-base/build.gradle @@ -1,5 +1,5 @@ -apply from: rootProject.file('gradle/java-setup.gradle') -apply from: rootProject.file('gradle/java-publish.gradle') +apply from: rootProject.file('_ext/gradle/java-setup.gradle') +apply from: rootProject.file('_ext/gradle/java-publish.gradle') ext { developers = [ diff --git a/_ext/eclipse-cdt/README.md b/_ext/eclipse-cdt/README.md index 1719323872..842fbad606 100644 --- a/_ext/eclipse-cdt/README.md +++ b/_ext/eclipse-cdt/README.md @@ -2,7 +2,8 @@ Eclipse CDT is not available in a form which can be easily consumed by maven or gradle. To fix this, we publish Eclipse's formatter and all its dependencies, along with a small amount of glue code, into the `com.diffplug.gradle.spotless:spotless-eclipse-cdt` artifact. -To publish a new version, update the `_ext/eclipse-cdt/gradle.properties` appropriately and see [BUILD_INSTRUCTIONS.md](../BUILD_INSTRUCTIONS). +To publish a new version, update the `_ext/eclipse-cdt/gradle.properties` appropriately and see [CONTRIBUTING.md](../../CONTRIBUTING.md) how to enable +`_ext` projects. ## License diff --git a/_ext/eclipse-cdt/build.gradle b/_ext/eclipse-cdt/build.gradle index 668bbcb070..dc0da823a9 100644 --- a/_ext/eclipse-cdt/build.gradle +++ b/_ext/eclipse-cdt/build.gradle @@ -7,10 +7,11 @@ ext { p2Dependencies = [ 'org.eclipse.cdt.core':'+', // CodeFormatter and related - ] + ] } +apply from: rootProject.file('_ext/gradle/update-lockfile.gradle') apply from: rootProject.file('_ext/gradle/p2-fat-jar-setup.gradle') apply from: rootProject.file('_ext/gradle/java-publish.gradle') @@ -25,7 +26,7 @@ dependencies { compile "com.ibm.icu:icu4j:${VER_IBM_ICU}" // Required to by CCorePlugin calling PositionTrackerManager compile "org.eclipse.platform:org.eclipse.core.filebuffers:${VER_ECLISPE_PLATFORM}" - + testImplementation("org.slf4j:slf4j-simple:${VER_SLF4J}") } diff --git a/_ext/eclipse-groovy/README.md b/_ext/eclipse-groovy/README.md index 58e6a01342..c565d04cf2 100644 --- a/_ext/eclipse-groovy/README.md +++ b/_ext/eclipse-groovy/README.md @@ -5,7 +5,8 @@ To fix this, we publish Groovy-Eclipse's formatter and all its dependencies, alo ## Build -To publish a new version, update the `_ext/eclipse-groovy/gradle.properties` appropriately and and see [BUILD_INSTRUCTIONS.md](../BUILD_INSTRUCTIONS). +To publish a new version, update the `_ext/eclipse-groovy/gradle.properties` appropriately and and see [CONTRIBUTING.md](../../CONTRIBUTING.md) how to enable +`_ext` projects. ## License diff --git a/_ext/eclipse-groovy/build.gradle b/_ext/eclipse-groovy/build.gradle index 62c162869c..99e09443b3 100644 --- a/_ext/eclipse-groovy/build.gradle +++ b/_ext/eclipse-groovy/build.gradle @@ -2,12 +2,12 @@ ext { developers = [ fvgh: [ name: 'Frank Vennemeyer', email: 'frankgh@zoho.com' ], ] - + p2Repository = "https://dist.springsource.org/release/GRECLIPSE/${VER_GRECLIPSE}/e${VER_ECLIPSE}" - p2Dependencies = [ + p2Dependencies = [ 'org.codehaus.groovy.eclipse.refactoring':'+', // GroovyFormatter and related - + // The following lists does not reflect the complete transitive required packages, but // the once used during code formatting 'org.codehaus.groovy':'+', // Groovy compiler patches supporting use within GrEclipse and Groovy itself @@ -18,16 +18,22 @@ ext { internalJars = [ //Jars included by org.codehaus.groovy - "**/groovy-${VER_GROOVY}-indy", // Use Groovy compiler compatible with GrEclipse instead of localGroovy - '**/groovy-eclipse', // Patches/Overrides some of the Groovy compiler classes - '**/eclipse-trace', // Provides logging capabilities for groovy-eclipse - + ////////////////////////////////////////////////////////////////////////// + // Use Groovy compiler compatible with GrEclipse instead of localGroovy + "**/groovy-${VER_GROOVY}-indy", + // Patches/Overrides some of the Groovy compiler classes + '**/groovy-eclipse', + // Provides logging capabilities for groovy-eclipse + '**/eclipse-trace', //Jars included by org.eclipse.jdt.groovy.core - '**/nlcl' //Non locking class loader used by groovy compiler + ////////////////////////////////////////////////////////////////////////// + //Non locking class loader used by groovy compiler + '**/nlcl' ] } +apply from: rootProject.file('_ext/gradle/update-lockfile.gradle') apply from: rootProject.file('_ext/gradle/p2-fat-jar-setup.gradle') apply from: rootProject.file('_ext/gradle/java-publish.gradle') diff --git a/_ext/eclipse-jdt/README.md b/_ext/eclipse-jdt/README.md index 0544fdf90e..014b58e732 100644 --- a/_ext/eclipse-jdt/README.md +++ b/_ext/eclipse-jdt/README.md @@ -4,7 +4,8 @@ Eclipse JDT and its dependencies require a large amount of byte code. Hence they should not be directly be required by the Spotless, but only be requested in case they are configured by the Spotless configuration. Hence we publish Eclipse's formatter and all its dependencies, along with a small amount of glue code, into the `com.diffplug.gradle.spotless:spotless-eclipse-jdt` artifact. -To publish a new version, update the `_ext/eclipse-jdt/gradle.properties` appropriately and and see [BUILD_INSTRUCTIONS.md](../BUILD_INSTRUCTIONS). +To publish a new version, update the `_ext/eclipse-jdt/gradle.properties` appropriately and and see [CONTRIBUTING.md](../../CONTRIBUTING.md) how to enable +`_ext` projects. ## License diff --git a/_ext/eclipse-jdt/build.gradle b/_ext/eclipse-jdt/build.gradle index 20c11a2b7b..6d3d5e4ec4 100644 --- a/_ext/eclipse-jdt/build.gradle +++ b/_ext/eclipse-jdt/build.gradle @@ -1,3 +1,4 @@ +apply from: rootProject.file('_ext/gradle/update-lockfile.gradle') apply from: rootProject.file('_ext/gradle/java-setup.gradle') apply from: rootProject.file('_ext/gradle/java-publish.gradle') diff --git a/_ext/eclipse-wtp/README.md b/_ext/eclipse-wtp/README.md index 98279651bd..879f299377 100644 --- a/_ext/eclipse-wtp/README.md +++ b/_ext/eclipse-wtp/README.md @@ -2,7 +2,8 @@ Eclipse WTP is not available in a form which can be easily consumed by maven or gradle. To fix this, we publish Eclipse's WTP formatters, along with a small amount of glue code, into the `com.diffplug.spotless.extra:spotless-eclipse-wtp` artifact. -To publish a new version, update the `_ext/eclipse-wtp/gradle.properties` appropriately and and see [BUILD_INSTRUCTIONS.md](../BUILD_INSTRUCTIONS). +To publish a new version, update the `_ext/eclipse-wtp/gradle.properties` appropriately and and see [CONTRIBUTING.md](../../CONTRIBUTING.md) how to enable +`_ext` projects. ## License diff --git a/_ext/eclipse-wtp/build.gradle b/_ext/eclipse-wtp/build.gradle index ddc92603aa..df58bffb84 100644 --- a/_ext/eclipse-wtp/build.gradle +++ b/_ext/eclipse-wtp/build.gradle @@ -2,7 +2,7 @@ ext { developers = [ fvgh: [ name: 'Frank Vennemeyer', email: 'frankgh@zoho.com' ], ] - + p2Repository = "https://download.eclipse.org/webtools/repository/${VER_ECLIPSE_WTP}" p2Dependencies = [ @@ -11,10 +11,10 @@ ext { 'org.eclipse.wst.sse.core':'+', // Structure models 'org.eclipse.wst.common.uriresolver':'+', // URI resolver for model queries 'org.eclipse.wst.dtd.core':'+', // Support DTD extensions - + // XML Formatter - Dependencies 'org.eclipse.wst.xsd.core':'+', // Support XSD extensions - + // JS Formatter - Dependencies 'org.eclipse.wst.jsdt.core':'+', // DefaultCodeFormatter and related 'org.eclipse.wst.jsdt.ui':'+', // Functionality to format comments @@ -22,23 +22,28 @@ ext { // JSON Formatter - Dependencies 'org.eclipse.wst.json.core':'+', // FormatProcessorJSON and related 'org.eclipse.json':'+', // Provides JSON node interfaces - + // CSS Formatter - Dependencies 'org.eclipse.wst.css.core':'+', // FormatProcessorCSS and related - + // HTML Formatter - Dependencies 'org.eclipse.wst.html.core':'+', // HTMLFormatProcessorImpl and related ] - + jarInclude = [ - '**/*.class', // Take all classes - '**/*.properties', // Text resources (for messages, etc) - '**/*.rsc', // JSDT requires gramar files - '**/*.xml', // Plugin XML and other resources - '*.html', // License information about the included JARs, + '**/*.class', + // Take all classes + '**/*.properties', + // Text resources (for messages, etc) + '**/*.rsc', + // JSDT requires gramar files + '**/*.xml', + // Plugin XML and other resources + '*.html', + // License information about the included JARs, 'META-INF/**' // Plugin manifest and addtional information ] - + fatJarResourcesMap = [ 'org.eclipse.wst.common.uriresolver': 'org.eclipse.wst.common.uriresolver.internal.provisional', 'org.eclipse.wst.css.core': 'org.eclipse.wst.css.core.internal', @@ -50,6 +55,7 @@ ext { ] } +apply from: rootProject.file('_ext/gradle/update-lockfile.gradle') apply from: rootProject.file('_ext/gradle/p2-fat-jar-setup.gradle') apply from: rootProject.file('_ext/gradle/java-publish.gradle') @@ -57,7 +63,7 @@ dependencies { compile "com.diffplug.spotless:spotless-eclipse-base:${VER_SPOTLESS_ECLISPE_BASE}" // Required by most WPT formatters compile "com.ibm.icu:icu4j:${VER_IBM_ICU}" - // The XSD/DTD and other models are defined with EMF. + // The XSD/DTD and other models are defined with EMF. compile "org.eclipse.emf:org.eclipse.emf.common:${VER_ECLISPE_EMF}" compile "org.eclipse.emf:org.eclipse.emf.ecore:${VER_ECLISPE_EMF}" // Some WPT plugins requires OSGI bundle interfaces (but not effectively used) @@ -68,7 +74,7 @@ dependencies { compile ("org.eclipse.platform:org.eclipse.jface.text:${VER_ECLISPE_JFACE}") { exclude group: 'org.eclipse.platform', module: 'org.eclipse.swt' } - // Some WPT plugins use the EFS for storing temporary worspace data + // Some WPT plugins use the EFS for storing temporary worspace data compile "org.eclipse.platform:org.eclipse.core.filesystem:${VER_ECLISPE_EFS}" // Required by org.eclipse.wst.xsd.core compile "org.eclipse.xsd:org.eclipse.xsd:${VER_ECLISPE_XSD}" @@ -95,25 +101,25 @@ sourceSets { * Eclipse framework. */ test { - //Skip default tests, which would run every test case. - exclude '**' + //Skip default tests, which would run every test case. + exclude '**' } //Instead make a separate test task per case def testLocation = 'src/test/java' fileTree(dir: testLocation).include('**/*Test.java').each { file -> def testFile = file.getName().replace(".java", "") - def filePath = file.getAbsolutePath().replace(".java", "**") //Don't ask me why the task is not happy when it gets no asterisk + def filePath = file.getAbsolutePath().replace(".java", "**") //Don't ask me why the task is not happy when it gets no asterisk filePath = filePath.substring(filePath.lastIndexOf(testLocation) + testLocation.length() + 1) task "${testFile}"(type: Test) { group = LifecycleBasePlugin.VERIFICATION_GROUP description = "Runs ${testFile} integration test." include "${filePath}" - reports { - html.destination = new File("$buildDir/reports/${testFile}") - junitXml.destination = new File("$buildDir/${testFile}") - } - //classpath = jar.outputs.files + sourceSets.test.output + sourceSets.test.compileClasspath + reports { + html.destination = new File("$buildDir/reports/${testFile}") + junitXml.destination = new File("$buildDir/${testFile}") + } + //classpath = jar.outputs.files + sourceSets.test.output + sourceSets.test.compileClasspath mustRunAfter tasks.jar } test.dependsOn "${testFile}" diff --git a/_ext/gradle/java-setup.gradle b/_ext/gradle/java-setup.gradle index f86a2336d0..0ce5af5cb9 100644 --- a/_ext/gradle/java-setup.gradle +++ b/_ext/gradle/java-setup.gradle @@ -3,33 +3,17 @@ ////////// apply from: rootProject.file('gradle/java-setup.gradle') -repositories { - mavenCentral() - jcenter() - /* Allow access of local SNAPSHOT builds. Sanity of dependencies - is guranteed by the lib-extra build. */ - mavenLocal() -} - // setup java apply plugin: 'java' -// Not all external code is not under control of Spotless developers. -// Don't warn about things that cannot be changed. +// Show warning locations tasks.withType(JavaCompile) { options.compilerArgs << "-Xlint:unchecked" options.compilerArgs << "-Xlint:deprecation" } -// Use file locking -configurations.all { - resolutionStrategy { - activateDependencyLocking() - } -} - //Currently testlib is not used by _ext. Hence the external dependencies are added here. dependencies { testImplementation "junit:junit:${VER_JUNIT}" - testImplementation 'org.assertj:assertj-core:${VER_ASSERTJ}' + testImplementation "org.assertj:assertj-core:${VER_ASSERTJ}" } diff --git a/_ext/gradle/p2-fat-jar-setup.gradle b/_ext/gradle/p2-fat-jar-setup.gradle index ff15bc4dc7..1fe8fdfe2f 100644 --- a/_ext/gradle/p2-fat-jar-setup.gradle +++ b/_ext/gradle/p2-fat-jar-setup.gradle @@ -1,16 +1,6 @@ apply from: rootProject.file('_ext/gradle/java-setup.gradle') -buildscript { - repositories { - maven { - url "https://plugins.gradle.org/m2/" - } - } - dependencies { - classpath "com.diffplug.gradle:goomph:3.17.4" - } -} -apply plugin: com.diffplug.gradle.p2.AsMavenPlugin +apply plugin: 'com.diffplug.gradle.p2.asmaven' ext { // P2 Repository URL @@ -27,7 +17,7 @@ ext { internalJars = [] } - // Include form the JARs, which goes into a fat-jar with the spottless formatter interface. + // Include form the JARs, which goes into a fat-jar with the spottless formatter interface. if (!project.hasProperty('jarInclude')) { jarInclude = [ '**/*.class', // Take all classes @@ -38,15 +28,7 @@ ext { ] } - // Exclude form the JARs, which goes into a fat-jar with the spottless formatter interface. - if (!project.hasProperty('jarExclude')) { - jarExclude = [ - 'META-INF/*.RSA', // The eclipse jars are signed, and our fat-jar breaks the signatures - 'META-INF/*.SF', // ... so all signatures are filtered - ] - } - - // Exclude form the JARs, which goes into a fat-jar with the spottless formatter interface. + // Exclude form the JARs, which goes into a fat-jar with the spottless formatter interface. if (!project.hasProperty('jarExclude')) { jarExclude = [ 'META-INF/*.RSA', // The eclipse jars are signed, and our fat-jar breaks the signatures @@ -103,7 +85,6 @@ jar { // Unpack External Deps // ////////////////////////// import java.io.File -import org.apache.commons.io.filefilter.DirectoryFileFilter task unjarEmbeddedClasses { description = "Copies filtered set of embedded classes from the Eclise/GrEclipse dependencies to '${project.relativePath(embeddedClassesDir)}'." @@ -112,7 +93,7 @@ task unjarEmbeddedClasses { inputs.property('jarInclude', jarInclude) inputs.property('jarExclude', jarExclude) inputs.property('fatJarResourcesMap', fatJarResourcesMap) - outputs.file(embeddedClassesDir) + outputs.dir(embeddedClassesDir) doLast { embeddedClassesDir.deleteDir() diff --git a/_ext/gradle/update-lockfile.gradle b/_ext/gradle/update-lockfile.gradle new file mode 100644 index 0000000000..098d960eff --- /dev/null +++ b/_ext/gradle/update-lockfile.gradle @@ -0,0 +1,6 @@ +// Use file locking +configurations.all { + resolutionStrategy { + activateDependencyLocking() + } +} \ No newline at end of file diff --git a/build.gradle b/build.gradle index f32ecac3ff..f9103b37b0 100644 --- a/build.gradle +++ b/build.gradle @@ -11,6 +11,8 @@ plugins { id 'org.jdrupes.mdoclet' version '1.0.5' apply false // https://github.com/spotbugs/spotbugs/releases id "com.github.spotbugs" version "2.0.0" apply false + //https://github.com/diffplug/goomph + id "com.diffplug.gradle.p2.asmaven" version "3.21.0" apply false // https://github.com/diffplug/spotless-changelog id "com.diffplug.spotless-changelog" version "1.1.0" apply false } diff --git a/settings.gradle b/settings.gradle index 4791c0bae0..72f62e0ad6 100644 --- a/settings.gradle +++ b/settings.gradle @@ -47,8 +47,22 @@ if (System.getenv('SPOTLESS_EXCLUDE_MAVEN') != 'true' && System.getenv('JITPACK' include 'plugin-maven' // maven-specific glue code } -// excludes external (_ext) projects from development builds, -if (System.getenv('SPOTLESS_EXT') != 'true') { +def getStartProperty(java.lang.String name) { + def value = startParameter.getProjectProperties().get('com.diffplug.spotless.include.ext') + if(null != value) { + return value + } + // user properties are not available in the startParameter + def userPropertiesFile = new java.io.File(startParameter.getGradleUserHomeDir(), 'gradle.properties') + def userProperties = new java.util.Properties() + if (userPropertiesFile.exists()) { + userProperties.load(userPropertiesFile.newReader()) + } + return userProperties.get(name) +} + +// include external (_ext) projects from development builds +if (getStartProperty('com.diffplug.spotless.include_ext') == 'true') { file('_ext').eachDirMatch(~/^(?!(\.|gradle)).*/) { dir -> include dir.name project(":${dir.name}").projectDir = dir From 67609c339fb0bf3b3eb4a9f394fefd1ad2d85c5a Mon Sep 17 00:00:00 2001 From: Frank Vennemeyer Date: Fri, 31 Jan 2020 18:08:06 +0100 Subject: [PATCH 3/7] Restrict dependency range for WTP, since latest EFS is not compatible. To be solved with next WTP upgrade. --- _ext/eclipse-wtp/gradle.properties | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_ext/eclipse-wtp/gradle.properties b/_ext/eclipse-wtp/gradle.properties index fa00ba5fe1..70533e6862 100644 --- a/_ext/eclipse-wtp/gradle.properties +++ b/_ext/eclipse-wtp/gradle.properties @@ -13,5 +13,7 @@ VER_ECLISPE_EMF=[2.16.0,3.0.0[ VER_ECLIPSE_OSGI_SERVICES=[3.8.0,4.0.0[ VER_ECLIPSE_FILE_BUFFERS=[3.6.700,4.0.0[ VER_ECLISPE_JFACE=[3.15.300,4.0.0[ -VER_ECLISPE_EFS=[1.7.500,2.0.0[ +#VER_ECLISPE_EFS=[1.7.500,2.0.0[ +#TODO: 1.7.600 changed bundle activation. Code adaptation required. +VER_ECLISPE_EFS=1.7.500 VER_ECLISPE_XSD=[2.12.0,3.0.0[ From cd9b77ef1149a14ea3efe8dc79d5219cc071aba3 Mon Sep 17 00:00:00 2001 From: Frank Vennemeyer Date: Fri, 31 Jan 2020 18:17:03 +0100 Subject: [PATCH 4/7] Fixing JDT tests. Tests not passing since #480. --- .../eclipse/java/EclipseJdtFormatterStepImplTest.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/_ext/eclipse-jdt/src/test/java/com/diffplug/spotless/extra/eclipse/java/EclipseJdtFormatterStepImplTest.java b/_ext/eclipse-jdt/src/test/java/com/diffplug/spotless/extra/eclipse/java/EclipseJdtFormatterStepImplTest.java index e45d9a0013..18a0ca69b2 100644 --- a/_ext/eclipse-jdt/src/test/java/com/diffplug/spotless/extra/eclipse/java/EclipseJdtFormatterStepImplTest.java +++ b/_ext/eclipse-jdt/src/test/java/com/diffplug/spotless/extra/eclipse/java/EclipseJdtFormatterStepImplTest.java @@ -61,9 +61,16 @@ public void defaultFormat() throws Throwable { * Spotless anyhow provides possibilities to change exception behavior. * Furthermore it is assumed that Spotless runs on compile-able code. */ - @Test(expected = IndexOutOfBoundsException.class) public void invalidFormat() throws Throwable { - format(FORMATTED.replace("void hello() {", "void hello() "), config -> {}); + try { + String output = format(FORMATTED.replace("void hello() {", "void hello() "), config -> {}); + assertTrue("Incomplete Java not formatted on best effort basis.", output.contains("void hello() " + LINE_DELIMITER)); + } catch (IndexOutOfBoundsException e) { + /* + * Some JDT versions throw exception, but this changed again in later versions. + * Anyhow, exceptions are acceptable, since Spotless should fromat valid Java code. + */ + } } @Test From 8825894b4d9172cc45e5bd7b12401c0ccb550174 Mon Sep 17 00:00:00 2001 From: Frank Vennemeyer Date: Sat, 1 Feb 2020 16:14:46 +0100 Subject: [PATCH 5/7] All lock files are ignored by GIT checkout when using --write-locks --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index e820110b1b..8b95e1b44f 100644 --- a/.gitignore +++ b/.gitignore @@ -20,7 +20,7 @@ gradle-app.setting !gradle-wrapper.jar #Gradle-Lock files in _ext just serving as an input for lib-extra -_ext/*/gradle/dependency-locks/compileClasspath.lockfile +_ext/*/gradle/dependency-locks/*.lockfile ### Eclipse ### *.pydevproject From d2429b3e0251c692e6ab4ba57c56a2d1242b10c0 Mon Sep 17 00:00:00 2001 From: Frank Vennemeyer Date: Sat, 1 Feb 2020 16:16:17 +0100 Subject: [PATCH 6/7] Updated diffplug / goomph related versions to 3.21. --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index f9103b37b0..9139835878 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ plugins { // dependencyUpdates https://github.com/ben-manes/gradle-versions-plugin/releases id 'com.github.ben-manes.versions' version '0.22.0' // https://github.com/diffplug/goomph/blob/master/CHANGES.md - id 'com.diffplug.gradle.eclipse.resourcefilters' version '3.18.1' + id 'com.diffplug.gradle.eclipse.resourcefilters' version '3.21.0' // https://plugins.gradle.org/plugin/com.gradle.plugin-publish id 'com.gradle.plugin-publish' version '0.10.1' apply false // https://github.com/bintray/gradle-bintray-plugin/releases From ec20b2674c4a05459690f2b79a3e7d96868d75f4 Mon Sep 17 00:00:00 2001 From: Frank Vennemeyer Date: Sat, 1 Feb 2020 16:25:18 +0100 Subject: [PATCH 7/7] Changed GOOMPH related plugin IDs from com.diffplug.gradle.blah to com.diffplug.blah --- _ext/gradle/p2-fat-jar-setup.gradle | 2 +- build.gradle | 6 +++--- gradle/java-setup.gradle | 2 +- ide/build.gradle | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/_ext/gradle/p2-fat-jar-setup.gradle b/_ext/gradle/p2-fat-jar-setup.gradle index 1fe8fdfe2f..25cb9ddcc5 100644 --- a/_ext/gradle/p2-fat-jar-setup.gradle +++ b/_ext/gradle/p2-fat-jar-setup.gradle @@ -1,6 +1,6 @@ apply from: rootProject.file('_ext/gradle/java-setup.gradle') -apply plugin: 'com.diffplug.gradle.p2.asmaven' +apply plugin: 'com.diffplug.p2.asmaven' ext { // P2 Repository URL diff --git a/build.gradle b/build.gradle index 9139835878..1bc5607087 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ plugins { // dependencyUpdates https://github.com/ben-manes/gradle-versions-plugin/releases id 'com.github.ben-manes.versions' version '0.22.0' // https://github.com/diffplug/goomph/blob/master/CHANGES.md - id 'com.diffplug.gradle.eclipse.resourcefilters' version '3.21.0' + id 'com.diffplug.eclipse.resourcefilters' version '3.21.0' // https://plugins.gradle.org/plugin/com.gradle.plugin-publish id 'com.gradle.plugin-publish' version '0.10.1' apply false // https://github.com/bintray/gradle-bintray-plugin/releases @@ -12,7 +12,7 @@ plugins { // https://github.com/spotbugs/spotbugs/releases id "com.github.spotbugs" version "2.0.0" apply false //https://github.com/diffplug/goomph - id "com.diffplug.gradle.p2.asmaven" version "3.21.0" apply false + id "com.diffplug.p2.asmaven" version "3.21.0" apply false // https://github.com/diffplug/spotless-changelog id "com.diffplug.spotless-changelog" version "1.1.0" apply false } @@ -36,7 +36,7 @@ spotless { } // root eclipse project -apply plugin: 'com.diffplug.gradle.eclipse.resourcefilters' +apply plugin: 'com.diffplug.eclipse.resourcefilters' eclipseResourceFilters { exclude().folders().name('.git') exclude().folders().name('build').recursive() diff --git a/gradle/java-setup.gradle b/gradle/java-setup.gradle index 0d55295a9e..f0488ec346 100644 --- a/gradle/java-setup.gradle +++ b/gradle/java-setup.gradle @@ -23,7 +23,7 @@ eclipse { // always create fresh projects tasks.eclipse.dependsOn(cleanEclipse) -apply plugin: 'com.diffplug.gradle.eclipse.resourcefilters' +apply plugin: 'com.diffplug.eclipse.resourcefilters' eclipseResourceFilters { exclude().folders().name('build') } diff --git a/ide/build.gradle b/ide/build.gradle index 0a7877a231..0a5d2c560c 100644 --- a/ide/build.gradle +++ b/ide/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'com.diffplug.gradle.oomph.ide' +apply plugin: 'com.diffplug.oomph.ide' oomphIde { repoEclipseLatest() jdt {}