From 147be086600b22159465df758d23db8d507d2dda Mon Sep 17 00:00:00 2001 From: Frank Vennemeyer Date: Sat, 28 Apr 2018 09:54:16 +0200 Subject: [PATCH 1/6] Refactored directory structure as discussed in #234 --- .../extra/eclipse/cdt}/EclipseCdtFormatterStepImpl.java | 0 .../extra/eclipse/cdt}/EclipseCdtFormatterStepImplTest.java | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename _ext/eclipse-cdt/src/main/java/com/diffplug/{gradle/spotless/cdt/eclipse => spotless/extra/eclipse/cdt}/EclipseCdtFormatterStepImpl.java (100%) rename _ext/eclipse-cdt/src/test/java/com/diffplug/{gradle/spotless/cdt/eclipse => spotless/extra/eclipse/cdt}/EclipseCdtFormatterStepImplTest.java (100%) diff --git a/_ext/eclipse-cdt/src/main/java/com/diffplug/gradle/spotless/cdt/eclipse/EclipseCdtFormatterStepImpl.java b/_ext/eclipse-cdt/src/main/java/com/diffplug/spotless/extra/eclipse/cdt/EclipseCdtFormatterStepImpl.java similarity index 100% rename from _ext/eclipse-cdt/src/main/java/com/diffplug/gradle/spotless/cdt/eclipse/EclipseCdtFormatterStepImpl.java rename to _ext/eclipse-cdt/src/main/java/com/diffplug/spotless/extra/eclipse/cdt/EclipseCdtFormatterStepImpl.java diff --git a/_ext/eclipse-cdt/src/test/java/com/diffplug/gradle/spotless/cdt/eclipse/EclipseCdtFormatterStepImplTest.java b/_ext/eclipse-cdt/src/test/java/com/diffplug/spotless/extra/eclipse/cdt/EclipseCdtFormatterStepImplTest.java similarity index 100% rename from _ext/eclipse-cdt/src/test/java/com/diffplug/gradle/spotless/cdt/eclipse/EclipseCdtFormatterStepImplTest.java rename to _ext/eclipse-cdt/src/test/java/com/diffplug/spotless/extra/eclipse/cdt/EclipseCdtFormatterStepImplTest.java From 42e754b851a8d380cd8a7140fbd217da39f1efd3 Mon Sep 17 00:00:00 2001 From: Frank Vennemeyer Date: Sat, 28 Apr 2018 13:13:52 +0200 Subject: [PATCH 2/6] Refactored CDT to use the eclipse-base and updated its artifact name as discussed in #226 --- _ext/eclipse-cdt/README.md | 2 +- _ext/eclipse-cdt/build.gradle | 176 ++---------------- _ext/eclipse-cdt/gradle.properties | 26 +-- .../cdt/EclipseCdtFormatterStepImpl.java | 13 +- .../cdt/EclipseCdtFormatterStepImplTest.java | 6 +- 5 files changed, 42 insertions(+), 181 deletions(-) diff --git a/_ext/eclipse-cdt/README.md b/_ext/eclipse-cdt/README.md index 248969b753..28f26e732b 100644 --- a/_ext/eclipse-cdt/README.md +++ b/_ext/eclipse-cdt/README.md @@ -1,6 +1,6 @@ # spotless-cdt-eclipse -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-ext-eclipse-cdt` artifact. +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 run this from the root directory: diff --git a/_ext/eclipse-cdt/build.gradle b/_ext/eclipse-cdt/build.gradle index 9a206e473a..e1d691b2c9 100644 --- a/_ext/eclipse-cdt/build.gradle +++ b/_ext/eclipse-cdt/build.gradle @@ -5,42 +5,24 @@ plugins { id 'com.diffplug.gradle.p2.asmaven' version '3.9.0' } -repositories { - mavenCentral() - maven { url 'https://plugins.gradle.org/m2/' } -} - -apply plugin: 'java' -sourceCompatibility = VER_JAVA -targetCompatibility = VER_JAVA +apply from: rootProject.file('../gradle/java-setup.gradle') +apply from: rootProject.file('../gradle/java-publish.gradle') -import java.io.File +ext { + developers = [ + fvgh: [ name: 'Frank Vennemeyer', email: 'frankgh@zoho.com' ], + ] +} // The dependencies to pull from CDT's p2 repositories def eclipseCdtDeps = [ 'org.eclipse.cdt.core':'+', // CodeFormatter and related ] -// The dependencies to pull from Eclipse's p2 repositories -def eclipseDeps = [ - 'org.eclipse.core.jobs':'+', // Required by CDT ParserUtil - 'org.eclipse.core.resources':'+', - 'org.eclipse.core.runtime':'+', // Provides central logging and plugin interface - 'org.eclipse.equinox.common':'+', // Provides runtime status used during exception reporting - 'org.eclipse.jface':'+', // PreferenceStore for creating preferences from properties - 'org.eclipse.text':'+', // Provides Document data structure for formatter - 'org.eclipse.osgi':'+', // CCorePlugin requires OSGI bundle interfaces (but not effectively used) - 'org.eclipse.osgi.services':'+', -] - - // build a maven repo in our build folder containing these artifacts p2AsMaven { group 'p2', { - repoEclipse cdt_VER_ECLIPSE - eclipseDeps.keySet.each { p2.addIU(it) } - eclipseDeps.keySet.each { p2.addIU(it + '.source') } - repo "http://download.eclipse.org/tools/cdt/releases/${cdt_VER_ECLIPSE_CDT}" + repo "http://download.eclipse.org/tools/cdt/releases/${VER_ECLIPSE_CDT}" eclipseCdtDeps.keySet.each { p2.addIU(it) } eclipseCdtDeps.keySet.each { p2.addIU(it + '.source') } } @@ -54,17 +36,17 @@ configurations } dependencies { - // Add the Eclipse and Eclipse-WTP jars to the embedded configuration. - eclipseDeps.each { groupArtifact, version -> - embeddedJars "p2:${groupArtifact}:${version}" - embeddedSource "p2:${groupArtifact}:${version}:sources" + compile "com.diffplug.spotless:spotless-eclipse-base:${VER_SPOTLESS_ECLISPE_BASE}" + // Provides text partitioners for formatters + compile ("org.eclipse.platform:org.eclipse.jface.text:${VER_ECLISPE_JFACE}") { + exclude group: 'org.eclipse.platform', module: 'org.eclipse.swt' } + + // Add the Eclipse and Eclipse-WTP jars to the embedded configuration. eclipseCdtDeps.each { groupArtifact, version -> embeddedJars "p2:${groupArtifact}:${version}" embeddedSource "p2:${groupArtifact}:${version}:sources" } - - testCompile "junit:junit:${cdt_VER_JUNIT}" } jar { @@ -85,133 +67,3 @@ sourceSets { // Use JAR file with all resources for Eclipse-XML integration-tests test.runtimeClasspath = jar.outputs.files + sourceSets.test.output + sourceSets.test.compileClasspath } - -///////// -// IDE // -///////// - -apply plugin: 'eclipse' - -eclipse { - classpath { - downloadSources true - downloadJavadoc true - } -} - -// always create fresh projects -tasks.eclipse.dependsOn(cleanEclipse) - -//////////////// -// Publishing // -//////////////// -apply plugin: 'maven-publish' - -task sourcesJar(type: Jar) { - classifier = 'sources' - from sourceSets.main.allJava -} - -task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = 'javadoc' - from javadoc.destinationDir -} - -def isSnapshot = cdt_version.endsWith('-SNAPSHOT') -// pulls the credentials from either the environment variable or gradle.properties -def cred = { - if (System.env[it] != null) { - return System.env[it] - } else if (project.hasProperty(it)) { - return project[it] - } else { - return 'unknown_' + it - } -} - -model { - publishing { - publications { - mavenJava(MavenPublication) { - - groupId project.cdt_group - artifactId project.cdt_artifactId - version project.cdt_version - from components.java - - pom.withXml { - - // add MavenCentral requirements to the POM - asNode().children().last() + { - resolveStrategy = Closure.DELEGATE_FIRST - name project.cdt_artifactId - description project.cdt_description - url "https://github.com/${project.cdt_org}/${project.name}" - scm { - url "https://github.com/${project.cdt_org}/${project.name}" - connection "scm:git:git://github.com/${project.cdt_org}/${project.name}" - developerConnection "scm:git:ssh:git@github.com/${project.cdt_org}/${project.name}" - } - licenses { - license { - name 'Eclipse Public License - v 1.0' - url 'https://www.eclipse.org/legal/epl-v10.html' - distribution 'repo' - } - } - developers { - developer { - id 'fvgh' - name 'Frank Vennemeyer' - email 'frankgh@zoho.com' - } - } - } - } - } - } - if (isSnapshot) { - // upload snapshots to oss.sonatype.org - repositories { - maven { - url = 'https://oss.sonatype.org/content/repositories/snapshots' - credentials { - username = cred('nexus_user') - password = cred('nexus_pass') - } - } } - } - } -} - -if (!isSnapshot) { - // upload releases to bintray and then mavenCentral - bintray { - user = cred('bintray_user') - key = cred('bintray_pass') - publications = [ - 'mavenJava' - ] - publish = true - pkg { - repo = 'opensource' - name = project.cdt_artifactId - userOrg = project.cdt_org - version { - name = project.cdt_version - mavenCentralSync { - user = cred('nexus_user') - password = cred('nexus_pass') - } - } - } - } - - publish.dependsOn(bintrayUpload) - bintrayUpload.dependsOn([ - 'generatePomFileForMavenJavaPublication', - jar, - sourcesJar, - javadocJar - ]) -} diff --git a/_ext/eclipse-cdt/gradle.properties b/_ext/eclipse-cdt/gradle.properties index ee861fe967..8da38b9c7b 100644 --- a/_ext/eclipse-cdt/gradle.properties +++ b/_ext/eclipse-cdt/gradle.properties @@ -1,16 +1,16 @@ -# Mayor/Minor versions are in line with the one of the Eclipse C/C++ IDE version. -# Patch version is an incremental counter for the Spotless plugin. -cdt_version=9.4.0-SNAPSHOT -cdt_artifactId=spotless-ext-eclipse-cdt -cdt_description=Eclipse's CDT C/C++ formatter bundled for Spotless -VER_JAVA=1.8 +# Mayor version correspond to the Eclipse C/C++ IDE version. +# Minor version changes in case the minimum Eclipse dependencies are raised due to incompatibilities of their internal interfaces. +# Patch version is incremented in case of bug-fixes and evolutions. +ext_version=9.0.0-SNAPSHOT +ext_artifactId=spotless-eclipse-cdt +ext_description=Eclipse's CDT C/C++ formatter bundled for Spotless +ext_org=diffplug +ext_group=com.diffplug.spotless -cdt_org=diffplug -cdt_group=com.diffplug.spotless +# Build requirements +ext_VER_JAVA=1.8 # Compile dependencies -cdt_VER_ECLIPSE=4.7.2 -cdt_VER_ECLIPSE_CDT=9.4 - -# Test -cdt_VER_JUNIT=4.12 +VER_ECLIPSE_CDT=9.4 +VER_SPOTLESS_ECLISPE_BASE=3.+ +VER_ECLISPE_JFACE=3.12.+ diff --git a/_ext/eclipse-cdt/src/main/java/com/diffplug/spotless/extra/eclipse/cdt/EclipseCdtFormatterStepImpl.java b/_ext/eclipse-cdt/src/main/java/com/diffplug/spotless/extra/eclipse/cdt/EclipseCdtFormatterStepImpl.java index fcd138391f..163fa91862 100644 --- a/_ext/eclipse-cdt/src/main/java/com/diffplug/spotless/extra/eclipse/cdt/EclipseCdtFormatterStepImpl.java +++ b/_ext/eclipse-cdt/src/main/java/com/diffplug/spotless/extra/eclipse/cdt/EclipseCdtFormatterStepImpl.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.diffplug.gradle.spotless.cdt.eclipse; +package com.diffplug.spotless.extra.eclipse.cdt; import java.util.Map; import java.util.Map.Entry; @@ -26,6 +26,8 @@ import org.eclipse.jface.text.IDocument; import org.eclipse.text.edits.TextEdit; +import com.diffplug.spotless.extra.eclipse.base.SpotlessEclipseFramework; + /** Formatter step which calls out to the Eclipse formatter. */ public class EclipseCdtFormatterStepImpl { /** Spotless always uses \n internally as line delimiter */ @@ -33,7 +35,14 @@ public class EclipseCdtFormatterStepImpl { private final CodeFormatter codeFormatter; - public EclipseCdtFormatterStepImpl(Properties settings) { + public EclipseCdtFormatterStepImpl(Properties settings) throws Exception { + SpotlessEclipseFramework.setup( + bundles -> {}, //CDT does not use the internal Eclipse feature + config -> { + config.changeSystemLineSeparator(); + }, + plugins -> {} //CDT does not use other Eclipse plugins); + ); Stream> stream = settings.entrySet().stream(); Map settingsMap = stream.collect(Collectors.toMap( e -> String.valueOf(e.getKey()), diff --git a/_ext/eclipse-cdt/src/test/java/com/diffplug/spotless/extra/eclipse/cdt/EclipseCdtFormatterStepImplTest.java b/_ext/eclipse-cdt/src/test/java/com/diffplug/spotless/extra/eclipse/cdt/EclipseCdtFormatterStepImplTest.java index 8c7aa85d60..e43ab4e9e6 100644 --- a/_ext/eclipse-cdt/src/test/java/com/diffplug/spotless/extra/eclipse/cdt/EclipseCdtFormatterStepImplTest.java +++ b/_ext/eclipse-cdt/src/test/java/com/diffplug/spotless/extra/eclipse/cdt/EclipseCdtFormatterStepImplTest.java @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.diffplug.gradle.spotless.cdt.eclipse; +package com.diffplug.spotless.extra.eclipse.cdt; -import static com.diffplug.gradle.spotless.cdt.eclipse.EclipseCdtFormatterStepImpl.LINE_DELIMITER; +import static com.diffplug.spotless.extra.eclipse.cdt.EclipseCdtFormatterStepImpl.LINE_DELIMITER; import static org.junit.Assert.*; import java.util.Properties; @@ -41,7 +41,7 @@ public class EclipseCdtFormatterStepImplTest { "\treturn 0;\n" + "}\n".replaceAll("\n", LINE_DELIMITER); - private final static String DOXYGEN_HTML = "/**
  • Hello
*/" + LINE_DELIMITER; + private final static String DOXYGEN_HTML = "/**\n *
void f() {int a =1;} 
\n */\n".replaceAll("\n", LINE_DELIMITER); private final static String ILLEGAL_CHAR = Character.toString((char) 254); From 0d5d6d27818374296814bf752220e69e296c078c Mon Sep 17 00:00:00 2001 From: Frank Vennemeyer Date: Sun, 29 Apr 2018 13:41:22 +0200 Subject: [PATCH 3/6] Aligned artifact name in README. --- _ext/eclipse-cdt/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_ext/eclipse-cdt/README.md b/_ext/eclipse-cdt/README.md index 28f26e732b..a2f93486ce 100644 --- a/_ext/eclipse-cdt/README.md +++ b/_ext/eclipse-cdt/README.md @@ -1,4 +1,4 @@ -# spotless-cdt-eclipse +# spotless-eclipse-cdt 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. From 31fec343598b6b42406f78b528bd1db92983cb3a Mon Sep 17 00:00:00 2001 From: Frank Vennemeyer Date: Sat, 5 May 2018 20:57:00 +0200 Subject: [PATCH 4/6] Aligned dependency version. Fixed comments. Added missing package-info. --- _ext/eclipse-cdt/gradle.properties | 2 +- .../cdt/EclipseCdtFormatterStepImpl.java | 10 ++++------ .../extra/eclipse/cdt/package-info.java | 20 +++++++++++++++++++ .../cdt/EclipseCdtFormatterStepImplTest.java | 2 +- 4 files changed, 26 insertions(+), 8 deletions(-) create mode 100644 _ext/eclipse-cdt/src/main/java/com/diffplug/spotless/extra/eclipse/cdt/package-info.java diff --git a/_ext/eclipse-cdt/gradle.properties b/_ext/eclipse-cdt/gradle.properties index 8da38b9c7b..c1df05924b 100644 --- a/_ext/eclipse-cdt/gradle.properties +++ b/_ext/eclipse-cdt/gradle.properties @@ -13,4 +13,4 @@ ext_VER_JAVA=1.8 # Compile dependencies VER_ECLIPSE_CDT=9.4 VER_SPOTLESS_ECLISPE_BASE=3.+ -VER_ECLISPE_JFACE=3.12.+ +VER_ECLISPE_JFACE=[3.12.0,4.0.0[ diff --git a/_ext/eclipse-cdt/src/main/java/com/diffplug/spotless/extra/eclipse/cdt/EclipseCdtFormatterStepImpl.java b/_ext/eclipse-cdt/src/main/java/com/diffplug/spotless/extra/eclipse/cdt/EclipseCdtFormatterStepImpl.java index 163fa91862..e173e88a4b 100644 --- a/_ext/eclipse-cdt/src/main/java/com/diffplug/spotless/extra/eclipse/cdt/EclipseCdtFormatterStepImpl.java +++ b/_ext/eclipse-cdt/src/main/java/com/diffplug/spotless/extra/eclipse/cdt/EclipseCdtFormatterStepImpl.java @@ -28,11 +28,8 @@ import com.diffplug.spotless.extra.eclipse.base.SpotlessEclipseFramework; -/** Formatter step which calls out to the Eclipse formatter. */ +/** Formatter step which calls out to the Eclipse CDT formatter. */ public class EclipseCdtFormatterStepImpl { - /** Spotless always uses \n internally as line delimiter */ - public static final String LINE_DELIMITER = "\n"; - private final CodeFormatter codeFormatter; public EclipseCdtFormatterStepImpl(Properties settings) throws Exception { @@ -41,7 +38,7 @@ public EclipseCdtFormatterStepImpl(Properties settings) throws Exception { config -> { config.changeSystemLineSeparator(); }, - plugins -> {} //CDT does not use other Eclipse plugins); + plugins -> {} //CDT does not use other Eclipse plugins ); Stream> stream = settings.entrySet().stream(); Map settingsMap = stream.collect(Collectors.toMap( @@ -50,9 +47,10 @@ public EclipseCdtFormatterStepImpl(Properties settings) throws Exception { codeFormatter = org.eclipse.cdt.core.ToolFactory.createDefaultCodeFormatter(settingsMap); } + /** Formatting C/C++ string */ public String format(String raw) throws Exception { //The 'kind' can be set to CodeFormatter.K_UNKNOWN, since it is anyway ignored by the internal formatter - TextEdit edit = codeFormatter.format(CodeFormatter.K_UNKNOWN, raw, 0, raw.length(), 0, LINE_DELIMITER); + TextEdit edit = codeFormatter.format(CodeFormatter.K_UNKNOWN, raw, 0, raw.length(), 0, SpotlessEclipseFramework.LINE_DELIMITER); if (edit == null) { throw new IllegalArgumentException("Invalid C/C++ syntax for formatting."); } else { diff --git a/_ext/eclipse-cdt/src/main/java/com/diffplug/spotless/extra/eclipse/cdt/package-info.java b/_ext/eclipse-cdt/src/main/java/com/diffplug/spotless/extra/eclipse/cdt/package-info.java new file mode 100644 index 0000000000..831ab2b427 --- /dev/null +++ b/_ext/eclipse-cdt/src/main/java/com/diffplug/spotless/extra/eclipse/cdt/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2016 DiffPlug + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** Eclipse CDT based Spotless formatter */ +@ParametersAreNonnullByDefault +package com.diffplug.spotless.extra.eclipse.cdt; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/_ext/eclipse-cdt/src/test/java/com/diffplug/spotless/extra/eclipse/cdt/EclipseCdtFormatterStepImplTest.java b/_ext/eclipse-cdt/src/test/java/com/diffplug/spotless/extra/eclipse/cdt/EclipseCdtFormatterStepImplTest.java index e43ab4e9e6..ba8f4cb511 100644 --- a/_ext/eclipse-cdt/src/test/java/com/diffplug/spotless/extra/eclipse/cdt/EclipseCdtFormatterStepImplTest.java +++ b/_ext/eclipse-cdt/src/test/java/com/diffplug/spotless/extra/eclipse/cdt/EclipseCdtFormatterStepImplTest.java @@ -15,7 +15,7 @@ */ package com.diffplug.spotless.extra.eclipse.cdt; -import static com.diffplug.spotless.extra.eclipse.cdt.EclipseCdtFormatterStepImpl.LINE_DELIMITER; +import static com.diffplug.spotless.extra.eclipse.base.SpotlessEclipseFramework.LINE_DELIMITER; import static org.junit.Assert.*; import java.util.Properties; From 73cc9b9d17bac86a7ba757187c76f21b106cfb1a Mon Sep 17 00:00:00 2001 From: Frank Vennemeyer Date: Mon, 6 Aug 2018 07:51:30 +0200 Subject: [PATCH 5/6] Align fat-JAR build and versioning. --- _ext/eclipse-cdt/build.gradle | 52 +++++------------------------- _ext/eclipse-cdt/gradle.properties | 8 ++--- 2 files changed, 12 insertions(+), 48 deletions(-) diff --git a/_ext/eclipse-cdt/build.gradle b/_ext/eclipse-cdt/build.gradle index e1d691b2c9..35f6f154fe 100644 --- a/_ext/eclipse-cdt/build.gradle +++ b/_ext/eclipse-cdt/build.gradle @@ -1,39 +1,19 @@ -plugins { - // bintray uploading - id 'com.jfrog.bintray' version '1.3.1' - // p2 dependencies - id 'com.diffplug.gradle.p2.asmaven' version '3.9.0' -} - -apply from: rootProject.file('../gradle/java-setup.gradle') -apply from: rootProject.file('../gradle/java-publish.gradle') - ext { developers = [ fvgh: [ name: 'Frank Vennemeyer', email: 'frankgh@zoho.com' ], ] -} -// The dependencies to pull from CDT's p2 repositories -def eclipseCdtDeps = [ - 'org.eclipse.cdt.core':'+', // CodeFormatter and related -] + p2Repository = "http://download.eclipse.org/tools/cdt/releases/${VER_ECLIPSE_CDT}" + + p2Dependencies = [ + 'org.eclipse.cdt.core':'+', // CodeFormatter and related + ] -// build a maven repo in our build folder containing these artifacts -p2AsMaven { - group 'p2', { - repo "http://download.eclipse.org/tools/cdt/releases/${VER_ECLIPSE_CDT}" - eclipseCdtDeps.keySet.each { p2.addIU(it) } - eclipseCdtDeps.keySet.each { p2.addIU(it + '.source') } - } } -configurations -{ - embeddedJars // JARs (Eclipse and WTP) the fat-jar is based uppon - embeddedSource // Source for Eclipse JARS (GrEclipse provides no source packages) - compile.extendsFrom(embeddedJars) -} +apply from: rootProject.file('../gradle/p2-fat-jar-setup.gradle') +apply from: rootProject.file('../gradle/java-publish.gradle') + dependencies { compile "com.diffplug.spotless:spotless-eclipse-base:${VER_SPOTLESS_ECLISPE_BASE}" @@ -41,24 +21,8 @@ dependencies { compile ("org.eclipse.platform:org.eclipse.jface.text:${VER_ECLISPE_JFACE}") { exclude group: 'org.eclipse.platform', module: 'org.eclipse.swt' } - - // Add the Eclipse and Eclipse-WTP jars to the embedded configuration. - eclipseCdtDeps.each { groupArtifact, version -> - embeddedJars "p2:${groupArtifact}:${version}" - embeddedSource "p2:${groupArtifact}:${version}:sources" - } } -jar { - // this embeds the eclipse jars into our "fat jar" - from { - configurations.embeddedJars.collect{ it.isDirectory() ? it : zipTree(it) } - } - // the eclipse jars are signed, and our fat jar breaks the signatures - // so we've got to be sure to filter out the signatures - exclude 'META-INF/*.RSA' - exclude 'META-INF/*.SF' -} ////////// // Test // diff --git a/_ext/eclipse-cdt/gradle.properties b/_ext/eclipse-cdt/gradle.properties index c1df05924b..1b6944c5f5 100644 --- a/_ext/eclipse-cdt/gradle.properties +++ b/_ext/eclipse-cdt/gradle.properties @@ -1,7 +1,7 @@ -# Mayor version correspond to the Eclipse C/C++ IDE version. -# Minor version changes in case the minimum Eclipse dependencies are raised due to incompatibilities of their internal interfaces. -# Patch version is incremented in case of bug-fixes and evolutions. -ext_version=9.0.0-SNAPSHOT +# 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.4.3 ext_artifactId=spotless-eclipse-cdt ext_description=Eclipse's CDT C/C++ formatter bundled for Spotless ext_org=diffplug From 37628a250fa336133f7445fb5861dfb4b5f9f425 Mon Sep 17 00:00:00 2001 From: Frank Vennemeyer Date: Mon, 6 Aug 2018 07:52:47 +0200 Subject: [PATCH 6/6] Fix common documentation and formatting mistakes. --- _ext/eclipse-groovy/gradle.properties | 6 +++--- _ext/eclipse-wtp/build.gradle | 2 +- _ext/eclipse-wtp/gradle.properties | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/_ext/eclipse-groovy/gradle.properties b/_ext/eclipse-groovy/gradle.properties index 766a0c9639..d8e7370d6a 100644 --- a/_ext/eclipse-groovy/gradle.properties +++ b/_ext/eclipse-groovy/gradle.properties @@ -1,6 +1,6 @@ -# Versions correspond to the Eclipse-Groovy version used for th FAT JAR -# See https://github.com/groovy/groovy-eclipse/releases for further information about Eclipse-Groovy versions. -# Patch version can be is incremented independently for backward compatible patches of this library. +# 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=2.9.2 ext_artifactId=spotless-eclipse-groovy ext_description=Groovy Eclipse's formatter bundled for Spotless diff --git a/_ext/eclipse-wtp/build.gradle b/_ext/eclipse-wtp/build.gradle index 050534a49f..7dba01caf4 100644 --- a/_ext/eclipse-wtp/build.gradle +++ b/_ext/eclipse-wtp/build.gradle @@ -5,7 +5,7 @@ ext { p2Repository = "http://download.eclipse.org/webtools/repository/${VER_ECLIPSE_WTP}" - p2Dependencies = [ + p2Dependencies = [ // XML/HTML Formatter - Dependencies 'org.eclipse.wst.xml.core':'+', // DefaultXMLPartitionFormatter and XMLAssociationProvider 'org.eclipse.wst.sse.core':'+', // Structure models diff --git a/_ext/eclipse-wtp/gradle.properties b/_ext/eclipse-wtp/gradle.properties index 6a19fcbeff..d8a23bd5e8 100644 --- a/_ext/eclipse-wtp/gradle.properties +++ b/_ext/eclipse-wtp/gradle.properties @@ -1,6 +1,6 @@ -# Versions correspond to the Eclipse-WTP version used for th FAT JAR -# See https://www.eclipse.org/webtools/ for further information about Eclipse-Groovy versions. -# Patch version can be is incremented independently for backward compatible patches of this library. +# 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.9.5 ext_artifactId=spotless-eclipse-wtp ext_description=Eclipse's WTP formatters bundled for Spotless