@@ -8,18 +8,19 @@ apply from: rootProject.file('gradle/java-setup.gradle')
88apply from : rootProject. file(' gradle/java-publish.gradle' )
99
1010def NEEDS_GLUE = [
11- ' sortPom' ,
12- ' palantirJavaFormat' ,
11+ // (alphabetic order please)
12+ ' cleanthat' ,
13+ ' diktat' ,
14+ ' flexmark' ,
15+ ' gherkin' ,
1316 ' googleJavaFormat' ,
17+ ' gson' ,
18+ ' jackson' ,
1419 ' ktfmt' ,
1520 ' ktlint' ,
16- ' flexmark' ,
17- ' diktat' ,
21+ ' palantirJavaFormat' ,
1822 ' scalafmt' ,
19- ' jackson' ,
20- ' gson' ,
21- ' cleanthat' ,
22- ' gherkin'
23+ ' sortPom'
2324]
2425for (glue in NEEDS_GLUE ) {
2526 sourceSets. register(glue) {
@@ -31,6 +32,13 @@ for (glue in NEEDS_GLUE) {
3132
3233versionCompatibility {
3334 adapters {
35+ // (alphabetic order please)
36+ namespaces. register(' Cleanthat' ) {
37+ versions = [
38+ ' 2.1' ,
39+ ]
40+ targetSourceSetName = ' cleanthat'
41+ }
3442 namespaces. register(' KtLint' ) {
3543 // as discussed at https://github.com/diffplug/spotless/pull/1475
3644 // we will support no more than 2 breaking changes at a time = 3 incompatible versions
@@ -42,12 +50,6 @@ versionCompatibility {
4250 ]
4351 targetSourceSetName = ' ktlint'
4452 }
45- namespaces. register(' Cleanthat' ) {
46- versions = [
47- ' 2.1' ,
48- ]
49- targetSourceSetName = ' cleanthat'
50- }
5153 }
5254}
5355
@@ -66,33 +68,39 @@ dependencies {
6668 testCommonImplementation " org.assertj:assertj-core:$VER_ASSERTJ "
6769 testCommonImplementation " com.diffplug.durian:durian-testlib:$VER_DURIAN "
6870
69- // used for pom sorting
70- sortPomCompileOnly ' com.github.ekryd.sortpom:sortpom-sorter:3.0.0'
71- sortPomCompileOnly ' org.slf4j:slf4j-api:2.0.0'
72-
73- palantirJavaFormatCompileOnly ' com.palantir.javaformat:palantir-java-format:1.1.0' // this version needs to stay compilable against Java 8 for CI Job testNpm
74-
75- googleJavaFormatCompileOnly ' com.google.googlejavaformat:google-java-format:1.16.0' // minimum required version due to api changes before then
76-
77- // used jackson-based formatters
78- jacksonCompileOnly ' com.fasterxml.jackson.core:jackson-databind:2.14.2'
79- jacksonCompileOnly ' com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.14.2'
80-
81- String VER_KTFMT = ' 0.43'
82- ktfmtCompileOnly " com.facebook:ktfmt:$VER_KTFMT "
83- String VER_KTLINT_GOOGLE_JAVA_FORMAT = ' 1.7' // for JDK 8 compatibility
71+ // GLUE CODE (alphabetic order please)
72+ // cleanthat
73+ String VER_CLEANTHAT = ' 2.13'
74+ cleanthatCompileOnly " io.github.solven-eu.cleanthat:java:$VER_CLEANTHAT "
75+ compatCleanthat2Dot1CompileAndTestOnly " io.github.solven-eu.cleanthat:java:$VER_CLEANTHAT "
76+ // diktat
77+ diktatCompileOnly ' org.cqfn.diktat:diktat-rules:1.2.5'
78+ // flexmark
79+ flexmarkCompileOnly ' com.vladsch.flexmark:flexmark-all:0.64.0'
80+ // gherkin
81+ gherkinCompileOnly ' io.cucumber:gherkin-utils:8.0.2'
82+ gherkinCompileOnly ' org.slf4j:slf4j-api:2.0.0'
83+ // googleJavaFormat
84+ googleJavaFormatCompileOnly ' com.google.googlejavaformat:google-java-format:1.16.0'
85+ // gson
86+ gsonCompileOnly ' com.google.code.gson:gson:2.10.1'
87+ // jackson
88+ String VER_JACKSON = ' 2.14.2'
89+ jacksonCompileOnly " com.fasterxml.jackson.core:jackson-databind:$VER_JACKSON "
90+ jacksonCompileOnly " com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$VER_JACKSON "
91+ // ktfmt
92+ ktfmtCompileOnly " com.facebook:ktfmt:0.43"
8493 ktfmtCompileOnly(" com.google.googlejavaformat:google-java-format" ) {
8594 version {
86- strictly VER_KTLINT_GOOGLE_JAVA_FORMAT
95+ strictly ' 1.7 ' // for JDK 8 compatibility
8796 }
8897 }
89-
98+ // ktlint
9099 String VER_KTLINT = ' 0.46.1'
91100 ktlintCompileOnly " com.pinterest:ktlint:$VER_KTLINT "
92101 ktlintCompileOnly " com.pinterest.ktlint:ktlint-core:$VER_KTLINT "
93102 ktlintCompileOnly " com.pinterest.ktlint:ktlint-ruleset-experimental:$VER_KTLINT "
94103 ktlintCompileOnly " com.pinterest.ktlint:ktlint-ruleset-standard:$VER_KTLINT "
95-
96104 compatKtLint0Dot46Dot0CompileOnly ' com.pinterest.ktlint:ktlint-core:0.46.0'
97105 compatKtLint0Dot46Dot0CompileOnly ' com.pinterest.ktlint:ktlint-ruleset-experimental:0.46.0'
98106 compatKtLint0Dot46Dot0CompileOnly ' com.pinterest.ktlint:ktlint-ruleset-standard:0.46.0'
@@ -102,24 +110,13 @@ dependencies {
102110 compatKtLint0Dot48Dot0CompileAndTestOnly ' com.pinterest.ktlint:ktlint-core:0.48.0'
103111 compatKtLint0Dot48Dot0CompileAndTestOnly ' com.pinterest.ktlint:ktlint-ruleset-experimental:0.48.0'
104112 compatKtLint0Dot48Dot0CompileAndTestOnly ' com.pinterest.ktlint:ktlint-ruleset-standard:0.48.0'
105-
106- String VER_SCALAFMT = " 3.7.3"
107- scalafmtCompileOnly " org.scalameta:scalafmt-core_2.13:$VER_SCALAFMT "
108-
109- String VER_DIKTAT = " 1.2.5"
110- diktatCompileOnly " org.cqfn.diktat:diktat-rules:$VER_DIKTAT "
111-
112- // used for markdown formatting
113- flexmarkCompileOnly ' com.vladsch.flexmark:flexmark-all:0.64.0'
114-
115- gsonCompileOnly ' com.google.code.gson:gson:2.10.1'
116-
117- String VER_CLEANTHAT = " 2.13"
118- cleanthatCompileOnly " io.github.solven-eu.cleanthat:java:$VER_CLEANTHAT "
119- compatCleanthat2Dot1CompileAndTestOnly " io.github.solven-eu.cleanthat:java:$VER_CLEANTHAT "
120-
121- gherkinCompileOnly ' io.cucumber:gherkin-utils:8.0.2'
122- gherkinCompileOnly ' org.slf4j:slf4j-api:2.0.0'
113+ // palantirJavaFormat
114+ palantirJavaFormatCompileOnly ' com.palantir.javaformat:palantir-java-format:1.1.0' // this version needs to stay compilable against Java 8 for CI Job testNpm
115+ // scalafmt
116+ scalafmtCompileOnly " org.scalameta:scalafmt-core_2.13:3.7.3"
117+ // sortPom
118+ sortPomCompileOnly ' com.github.ekryd.sortpom:sortpom-sorter:3.0.0'
119+ sortPomCompileOnly ' org.slf4j:slf4j-api:2.0.0'
123120}
124121
125122// we'll hold the core lib to a high standard
0 commit comments