diff --git a/lib-extra/build.gradle b/lib-extra/build.gradle index 8ed36bede6..5e491eaf20 100644 --- a/lib-extra/build.gradle +++ b/lib-extra/build.gradle @@ -40,9 +40,10 @@ tasks.withType(Test).configureEach { } def NEEDS_P2_DEPS = [ - 'jdt', + // (alphabetic order please) + 'cdt', 'groovy', - 'cdt' + 'jdt' ] for (needsP2 in NEEDS_P2_DEPS) { sourceSets.register(needsP2) { @@ -68,9 +69,11 @@ tasks.withType(Test).configureEach { apply plugin: 'dev.equo.p2deps' p2deps { - into 'jdtCompileOnly', { + // (alphabetic order please) + into 'cdtCompileOnly', { p2repo 'https://download.eclipse.org/eclipse/updates/4.26/' - install 'org.eclipse.jdt.core' + p2repo 'https://download.eclipse.org/tools/cdt/releases/10.7/' + install 'org.eclipse.cdt.core' } into 'groovyCompileOnly', { p2repo 'https://download.eclipse.org/eclipse/updates/4.26/' @@ -80,10 +83,9 @@ p2deps { install 'org.eclipse.jdt.groovy.core' install 'org.codehaus.groovy' } - into 'cdtCompileOnly', { + into 'jdtCompileOnly', { p2repo 'https://download.eclipse.org/eclipse/updates/4.26/' - p2repo 'https://download.eclipse.org/tools/cdt/releases/10.7/' - install 'org.eclipse.cdt.core' + install 'org.eclipse.jdt.core' } } diff --git a/lib/build.gradle b/lib/build.gradle index a0835a09e0..9e31bed698 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -8,18 +8,19 @@ apply from: rootProject.file('gradle/java-setup.gradle') apply from: rootProject.file('gradle/java-publish.gradle') def NEEDS_GLUE = [ - 'sortPom', - 'palantirJavaFormat', + // (alphabetic order please) + 'cleanthat', + 'diktat', + 'flexmark', + 'gherkin', 'googleJavaFormat', + 'gson', + 'jackson', 'ktfmt', 'ktlint', - 'flexmark', - 'diktat', + 'palantirJavaFormat', 'scalafmt', - 'jackson', - 'gson', - 'cleanthat', - 'gherkin' + 'sortPom' ] for (glue in NEEDS_GLUE) { sourceSets.register(glue) { @@ -31,6 +32,13 @@ for (glue in NEEDS_GLUE) { versionCompatibility { adapters { + // (alphabetic order please) + namespaces.register('Cleanthat') { + versions = [ + '2.1', + ] + targetSourceSetName = 'cleanthat' + } namespaces.register('KtLint') { // as discussed at https://github.com/diffplug/spotless/pull/1475 // we will support no more than 2 breaking changes at a time = 3 incompatible versions @@ -42,12 +50,6 @@ versionCompatibility { ] targetSourceSetName = 'ktlint' } - namespaces.register('Cleanthat') { - versions = [ - '2.1', - ] - targetSourceSetName = 'cleanthat' - } } } @@ -66,33 +68,39 @@ dependencies { testCommonImplementation "org.assertj:assertj-core:$VER_ASSERTJ" testCommonImplementation "com.diffplug.durian:durian-testlib:$VER_DURIAN" - // used for pom sorting - sortPomCompileOnly 'com.github.ekryd.sortpom:sortpom-sorter:3.0.0' - sortPomCompileOnly 'org.slf4j:slf4j-api:2.0.0' - - palantirJavaFormatCompileOnly 'com.palantir.javaformat:palantir-java-format:1.1.0' // this version needs to stay compilable against Java 8 for CI Job testNpm - - googleJavaFormatCompileOnly 'com.google.googlejavaformat:google-java-format:1.16.0' // minimum required version due to api changes before then - - // used jackson-based formatters - jacksonCompileOnly 'com.fasterxml.jackson.core:jackson-databind:2.14.2' - jacksonCompileOnly 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.14.2' - - String VER_KTFMT = '0.43' - ktfmtCompileOnly "com.facebook:ktfmt:$VER_KTFMT" - String VER_KTLINT_GOOGLE_JAVA_FORMAT = '1.7' // for JDK 8 compatibility + // GLUE CODE (alphabetic order please) + // cleanthat + String VER_CLEANTHAT='2.13' + cleanthatCompileOnly "io.github.solven-eu.cleanthat:java:$VER_CLEANTHAT" + compatCleanthat2Dot1CompileAndTestOnly "io.github.solven-eu.cleanthat:java:$VER_CLEANTHAT" + // diktat + diktatCompileOnly 'org.cqfn.diktat:diktat-rules:1.2.5' + // flexmark + flexmarkCompileOnly 'com.vladsch.flexmark:flexmark-all:0.64.0' + // gherkin + gherkinCompileOnly 'io.cucumber:gherkin-utils:8.0.2' + gherkinCompileOnly 'org.slf4j:slf4j-api:2.0.0' + // googleJavaFormat + googleJavaFormatCompileOnly 'com.google.googlejavaformat:google-java-format:1.16.0' + // gson + gsonCompileOnly 'com.google.code.gson:gson:2.10.1' + // jackson + String VER_JACKSON='2.14.2' + jacksonCompileOnly "com.fasterxml.jackson.core:jackson-databind:$VER_JACKSON" + jacksonCompileOnly "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$VER_JACKSON" + // ktfmt + ktfmtCompileOnly "com.facebook:ktfmt:0.43" ktfmtCompileOnly("com.google.googlejavaformat:google-java-format") { version { - strictly VER_KTLINT_GOOGLE_JAVA_FORMAT + strictly '1.7' // for JDK 8 compatibility } } - + // ktlint String VER_KTLINT='0.46.1' ktlintCompileOnly "com.pinterest:ktlint:$VER_KTLINT" ktlintCompileOnly "com.pinterest.ktlint:ktlint-core:$VER_KTLINT" ktlintCompileOnly "com.pinterest.ktlint:ktlint-ruleset-experimental:$VER_KTLINT" ktlintCompileOnly "com.pinterest.ktlint:ktlint-ruleset-standard:$VER_KTLINT" - compatKtLint0Dot46Dot0CompileOnly 'com.pinterest.ktlint:ktlint-core:0.46.0' compatKtLint0Dot46Dot0CompileOnly 'com.pinterest.ktlint:ktlint-ruleset-experimental:0.46.0' compatKtLint0Dot46Dot0CompileOnly 'com.pinterest.ktlint:ktlint-ruleset-standard:0.46.0' @@ -102,24 +110,13 @@ dependencies { compatKtLint0Dot48Dot0CompileAndTestOnly 'com.pinterest.ktlint:ktlint-core:0.48.0' compatKtLint0Dot48Dot0CompileAndTestOnly 'com.pinterest.ktlint:ktlint-ruleset-experimental:0.48.0' compatKtLint0Dot48Dot0CompileAndTestOnly 'com.pinterest.ktlint:ktlint-ruleset-standard:0.48.0' - - String VER_SCALAFMT="3.7.3" - scalafmtCompileOnly "org.scalameta:scalafmt-core_2.13:$VER_SCALAFMT" - - String VER_DIKTAT = "1.2.5" - diktatCompileOnly "org.cqfn.diktat:diktat-rules:$VER_DIKTAT" - - // used for markdown formatting - flexmarkCompileOnly 'com.vladsch.flexmark:flexmark-all:0.64.0' - - gsonCompileOnly 'com.google.code.gson:gson:2.10.1' - - String VER_CLEANTHAT="2.13" - cleanthatCompileOnly "io.github.solven-eu.cleanthat:java:$VER_CLEANTHAT" - compatCleanthat2Dot1CompileAndTestOnly "io.github.solven-eu.cleanthat:java:$VER_CLEANTHAT" - - gherkinCompileOnly 'io.cucumber:gherkin-utils:8.0.2' - gherkinCompileOnly 'org.slf4j:slf4j-api:2.0.0' + // palantirJavaFormat + palantirJavaFormatCompileOnly 'com.palantir.javaformat:palantir-java-format:1.1.0' // this version needs to stay compilable against Java 8 for CI Job testNpm + // scalafmt + scalafmtCompileOnly "org.scalameta:scalafmt-core_2.13:3.7.3" + // sortPom + sortPomCompileOnly 'com.github.ekryd.sortpom:sortpom-sorter:3.0.0' + sortPomCompileOnly 'org.slf4j:slf4j-api:2.0.0' } // we'll hold the core lib to a high standard