Skip to content

Commit cc5e0f5

Browse files
committed
move to version calalogs.
1 parent c5aaa9c commit cc5e0f5

File tree

15 files changed

+76
-96
lines changed

15 files changed

+76
-96
lines changed

build.gradle

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ plugins {
22
id 'com.diffplug.spotless' version '6.2.2' apply false
33
id 'cz.augi.gradle.wartremover' version '0.14.2' apply false
44
id 'info.solidsoft.pitest' version '1.7.0' apply false
5-
id 'java-platform'
65
id 'me.champeau.jmh' version '0.6.6' apply false
76
id 'net.ltgt.errorprone' version '2.0.2' apply false
87
id 'net.researchgate.release' version '2.8.1'
@@ -11,7 +10,6 @@ plugins {
1110

1211
subprojects {
1312
apply plugin: 'java-library'
14-
apply from: rootProject.file('gradle/dependencies.gradle')
1513
apply from: rootProject.file('gradle/animal-sniffer.gradle')
1614
apply from: rootProject.file('gradle/check-checkstyle.gradle')
1715
apply from: rootProject.file('gradle/check-codecoverage.gradle')
@@ -26,22 +24,6 @@ subprojects {
2624
mavenCentral()
2725
}
2826

29-
configurations {
30-
internal {
31-
visible = false
32-
canBeConsumed = false
33-
canBeResolved = false
34-
}
35-
compileClasspath.extendsFrom internal
36-
runtimeClasspath.extendsFrom internal
37-
testCompileClasspath.extendsFrom internal
38-
testRuntimeClasspath.extendsFrom internal
39-
}
40-
41-
dependencies {
42-
internal platform(rootProject)
43-
}
44-
4527
java {
4628
withJavadocJar()
4729
withSourcesJar()
@@ -83,23 +65,9 @@ subprojects {
8365
}
8466
}
8567

86-
dependencies {
87-
constraints {
88-
api 'org.assertj:assertj-core:3.22.0'
89-
api 'org.dom4j:dom4j:2.1.3'
90-
api 'co.helmethair:scalatest-junit-runner:0.1.10'
91-
api 'com.google.code.gson:gson:2.8.9'
92-
api 'com.fasterxml.jackson.core:jackson-databind:2.13.1'
93-
api 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.13.1'
94-
api 'jakarta.json:jakarta.json-api:2.0.1'
95-
api 'org.glassfish:jakarta.json:2.0.1'
96-
api 'jaxen:jaxen:1.2.0'
97-
api 'org.jdom:jdom2:2.0.6.1'
98-
api 'org.junit.jupiter:junit-jupiter:5.8.2'
99-
api 'org.junit.platform:junit-platform-engine:1.8.2'
100-
api 'org.mockito:mockito-junit-jupiter:4.3.1'
101-
api 'xom:xom:1.3.7'
102-
}
68+
task build {
69+
group = 'build'
70+
description = 'Build All'
10371
}
10472

10573
release {

gradle/benchmark-jmh.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ jmh {
66

77
// after gradle 5.3 we need to set this attribute to mark test configuration targeting java 8
88
[configurations.jmhCompileClasspath, configurations.jmhRuntimeClasspath].each {
9-
it.extendsFrom configurations.internal
109
it.attributes {
1110
attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 8)
1211
}

gradle/dependencies.gradle

Lines changed: 0 additions & 16 deletions
This file was deleted.

gradle/libs.versions.toml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
[versions]
2+
jackson = '2.13.1'
3+
scala212 = '2.12.15'
4+
scala213 = '2.13.8'
5+
scala3 = '3.1.1'
6+
scalatest = '3.2.11'
7+
scalaxml = '2.0.1'
8+
9+
[libraries]
10+
assertj = 'org.assertj:assertj-core:3.22.0'
11+
dom4j = 'org.dom4j:dom4j:2.1.3'
12+
gson = 'com.google.code.gson:gson:2.8.9'
13+
jackson-databind = { module = 'com.fasterxml.jackson.core:jackson-databind', version.ref = 'jackson' }
14+
jackson-dataformat-yaml = { module = 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml', version.ref = 'jackson' }
15+
jaxen = 'jaxen:jaxen:1.2.0'
16+
jdom2 = 'org.jdom:jdom2:2.0.6.1'
17+
json-api = 'jakarta.json:jakarta.json-api:2.0.1'
18+
json-impl = 'org.glassfish:jakarta.json:2.0.1'
19+
junit-jupiter = 'org.junit.jupiter:junit-jupiter:5.8.2'
20+
junit-platform-engine = 'org.junit.platform:junit-platform-engine:1.8.2'
21+
mockito = 'org.mockito:mockito-junit-jupiter:4.3.1'
22+
scala-library-v212 = { module = 'org.scala-lang:scala-library', version.ref = 'scala212' }
23+
scala-library-v213 = { module = 'org.scala-lang:scala-library', version.ref = 'scala213' }
24+
scala-library-v3 = { module = 'org.scala-lang:scala3-library_3', version.ref = 'scala3' }
25+
scala-reflect-v212 = { module = 'org.scala-lang:scala-reflect', version.ref = 'scala212' }
26+
scala-reflect-v213 = { module = 'org.scala-lang:scala-reflect', version.ref = 'scala213' }
27+
scala-xml-v212 = { module = 'org.scala-lang.modules:scala-xml_2.12', version.ref = 'scalaxml' }
28+
scala-xml-v213 = { module = 'org.scala-lang.modules:scala-xml_2.13', version.ref = 'scalaxml' }
29+
scala-xml-v3 = { module = 'org.scala-lang.modules:scala-xml_3', version.ref = 'scalaxml' }
30+
scalatest-funspec-v212 = { module = 'org.scalatest:scalatest-funspec_2.12', version.ref = 'scalatest' }
31+
scalatest-funspec-v213 = { module = 'org.scalatest:scalatest-funspec_2.13', version.ref = 'scalatest' }
32+
scalatest-funspec-v3 = { module = 'org.scalatest:scalatest-funspec_3', version.ref = 'scalatest' }
33+
scalatest-shouldmatchers-v212 = { module = 'org.scalatest:scalatest-shouldmatchers_2.12', version.ref = 'scalatest' }
34+
scalatest-shouldmatchers-v213 = { module = 'org.scalatest:scalatest-shouldmatchers_2.13', version.ref = 'scalatest' }
35+
scalatest-shouldmatchers-v3 = { module = 'org.scalatest:scalatest-shouldmatchers_3', version.ref = 'scalatest' }
36+
scalatest-junit-runner = 'co.helmethair:scalatest-junit-runner:0.1.10'
37+
xom = 'xom:xom:1.3.7'
38+
39+
[bundles]
40+
junit = ["junit-jupiter", "assertj"]
41+
scalatest-v212 = ["scalatest-funspec-v212", "scalatest-shouldmatchers-v212", "scalatest-junit-runner", "junit-platform-engine"]
42+
scalatest-v213 = ["scalatest-funspec-v213", "scalatest-shouldmatchers-v213", "scalatest-junit-runner", "junit-platform-engine"]
43+
scalatest-v3 = ["scalatest-funspec-v3", "scalatest-shouldmatchers-v3", "scalatest-junit-runner", "junit-platform-engine"]

xpath-to-json-gson/build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ apply from: rootProject.file('gradle/benchmark-jmh.gradle')
55
dependencies {
66
api project(':xpath-to-xml-core')
77

8-
implementation 'com.google.code.gson:gson'
8+
implementation libs.gson
99

1010
testImplementation project(':xpath-to-xml-test')
11-
testImplementation 'org.junit.jupiter:junit-jupiter'
12-
testImplementation 'org.assertj:assertj-core'
11+
testImplementation libs.bundles.junit
1312
}

xpath-to-json-jackson/build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@ targetCompatibility = JavaVersion.VERSION_1_8
88
dependencies {
99
api project(':xpath-to-xml-core')
1010

11-
implementation 'com.fasterxml.jackson.core:jackson-databind'
11+
implementation libs.jackson.databind
1212

1313
testImplementation project(':xpath-to-xml-test')
1414
testImplementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml'
15-
testImplementation 'org.junit.jupiter:junit-jupiter'
16-
testImplementation 'org.assertj:assertj-core'
15+
testImplementation libs.bundles.junit
1716
}
1817

1918
compileJava {

xpath-to-json-jakarta/build.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@ targetCompatibility = JavaVersion.VERSION_1_8
88
dependencies {
99
api project(':xpath-to-xml-core')
1010

11-
compileOnly 'jakarta.json:jakarta.json-api'
11+
compileOnly libs.json.api
1212

1313
testImplementation project(':xpath-to-xml-test')
14-
testImplementation 'org.glassfish:jakarta.json'
15-
testImplementation 'org.junit.jupiter:junit-jupiter'
16-
testImplementation 'org.assertj:assertj-core'
14+
testImplementation libs.json.impl
15+
testImplementation libs.bundles.junit
1716
}
1817

1918
compileJava {

xpath-to-xml-core/build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ apply from: rootProject.file('gradle/check-mutationcoverage.gradle')
44

55
dependencies {
66
testImplementation project(':xpath-to-xml-test')
7-
testImplementation 'org.junit.jupiter:junit-jupiter'
8-
testImplementation 'org.mockito:mockito-junit-jupiter'
9-
testImplementation 'org.assertj:assertj-core'
7+
testImplementation libs.mockito
8+
testImplementation libs.bundles.junit
109
}

xpath-to-xml-dom/build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ dependencies {
66
api project(':xpath-to-xml-core')
77

88
testImplementation project(':xpath-to-xml-test')
9-
testImplementation 'org.junit.jupiter:junit-jupiter'
10-
testImplementation 'org.mockito:mockito-junit-jupiter'
11-
testImplementation 'org.assertj:assertj-core'
9+
testImplementation libs.mockito
10+
testImplementation libs.bundles.junit
1211
}

xpath-to-xml-dom4j/build.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@ targetCompatibility = JavaVersion.VERSION_1_8
88
dependencies {
99
api project(':xpath-to-xml-core')
1010

11-
implementation 'org.dom4j:dom4j'
11+
implementation libs.dom4j
1212

1313
testImplementation project(':xpath-to-xml-test')
14-
testImplementation 'jaxen:jaxen'
15-
testImplementation 'org.junit.jupiter:junit-jupiter'
16-
testImplementation 'org.assertj:assertj-core'
14+
testImplementation libs.jaxen
15+
testImplementation libs.bundles.junit
1716
}
1817

1918
compileJava {

0 commit comments

Comments
 (0)