@@ -8,18 +8,19 @@ apply from: rootProject.file('gradle/java-setup.gradle')
8
8
apply from : rootProject. file(' gradle/java-publish.gradle' )
9
9
10
10
def NEEDS_GLUE = [
11
- ' sortPom' ,
12
- ' palantirJavaFormat' ,
11
+ // (alphabetic order please)
12
+ ' cleanthat' ,
13
+ ' diktat' ,
14
+ ' flexmark' ,
15
+ ' gherkin' ,
13
16
' googleJavaFormat' ,
17
+ ' gson' ,
18
+ ' jackson' ,
14
19
' ktfmt' ,
15
20
' ktlint' ,
16
- ' flexmark' ,
17
- ' diktat' ,
21
+ ' palantirJavaFormat' ,
18
22
' scalafmt' ,
19
- ' jackson' ,
20
- ' gson' ,
21
- ' cleanthat' ,
22
- ' gherkin'
23
+ ' sortPom'
23
24
]
24
25
for (glue in NEEDS_GLUE ) {
25
26
sourceSets. register(glue) {
@@ -31,6 +32,13 @@ for (glue in NEEDS_GLUE) {
31
32
32
33
versionCompatibility {
33
34
adapters {
35
+ // (alphabetic order please)
36
+ namespaces. register(' Cleanthat' ) {
37
+ versions = [
38
+ ' 2.1' ,
39
+ ]
40
+ targetSourceSetName = ' cleanthat'
41
+ }
34
42
namespaces. register(' KtLint' ) {
35
43
// as discussed at https://github.com/diffplug/spotless/pull/1475
36
44
// we will support no more than 2 breaking changes at a time = 3 incompatible versions
@@ -42,12 +50,6 @@ versionCompatibility {
42
50
]
43
51
targetSourceSetName = ' ktlint'
44
52
}
45
- namespaces. register(' Cleanthat' ) {
46
- versions = [
47
- ' 2.1' ,
48
- ]
49
- targetSourceSetName = ' cleanthat'
50
- }
51
53
}
52
54
}
53
55
@@ -66,33 +68,39 @@ dependencies {
66
68
testCommonImplementation " org.assertj:assertj-core:$VER_ASSERTJ "
67
69
testCommonImplementation " com.diffplug.durian:durian-testlib:$VER_DURIAN "
68
70
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"
84
93
ktfmtCompileOnly(" com.google.googlejavaformat:google-java-format" ) {
85
94
version {
86
- strictly VER_KTLINT_GOOGLE_JAVA_FORMAT
95
+ strictly ' 1.7 ' // for JDK 8 compatibility
87
96
}
88
97
}
89
-
98
+ // ktlint
90
99
String VER_KTLINT = ' 0.46.1'
91
100
ktlintCompileOnly " com.pinterest:ktlint:$VER_KTLINT "
92
101
ktlintCompileOnly " com.pinterest.ktlint:ktlint-core:$VER_KTLINT "
93
102
ktlintCompileOnly " com.pinterest.ktlint:ktlint-ruleset-experimental:$VER_KTLINT "
94
103
ktlintCompileOnly " com.pinterest.ktlint:ktlint-ruleset-standard:$VER_KTLINT "
95
-
96
104
compatKtLint0Dot46Dot0CompileOnly ' com.pinterest.ktlint:ktlint-core:0.46.0'
97
105
compatKtLint0Dot46Dot0CompileOnly ' com.pinterest.ktlint:ktlint-ruleset-experimental:0.46.0'
98
106
compatKtLint0Dot46Dot0CompileOnly ' com.pinterest.ktlint:ktlint-ruleset-standard:0.46.0'
@@ -102,24 +110,13 @@ dependencies {
102
110
compatKtLint0Dot48Dot0CompileAndTestOnly ' com.pinterest.ktlint:ktlint-core:0.48.0'
103
111
compatKtLint0Dot48Dot0CompileAndTestOnly ' com.pinterest.ktlint:ktlint-ruleset-experimental:0.48.0'
104
112
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'
123
120
}
124
121
125
122
// we'll hold the core lib to a high standard
0 commit comments