Skip to content

Commit b899b23

Browse files
committed
♻️ use version catalogs rather than inlining versions
1 parent 846fd0a commit b899b23

File tree

4 files changed

+23
-29
lines changed

4 files changed

+23
-29
lines changed

gradle/libs.versions.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,11 @@ picocli-codegen = { module = "info.picocli:picocli-codegen", version.ref = "pico
5050
progressbar = "me.tongfei:progressbar:0.9.3"
5151
slf4j-api = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }
5252
tuples = "org.javatuples:javatuples:1.2"
53+
kotlinStdlibJdk8 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version = "1.7.10" }
54+
jaxen = { module = "jaxen:jaxen", version = "1.2.0" }
55+
xerces-impl = { module = "xerces:xercesImpl", version = "2.12.2" }
56+
xmlunit-core = { module = "org.xmlunit:xmlunit-core", version = "2.9.0" }
57+
xmlunit-assertj3 = { module = "org.xmlunit:xmlunit-assertj3", version = "2.9.0" }
58+
java-semver = { module = "com.github.zafarkhaja:java-semver", version = "0.9.0" }
59+
diff-match-patch = { module = "fun.mike:diff-match-patch", version = "0.0.2" }
60+
slf4j-simple = { module = "org.slf4j:slf4j-simple", version.ref = "slf4j" }

gradle/testlibs.versions.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ junit-jupiter = "5.8.2"
66
assertj = "org.assertj:assertj-core:3.24.0"
77
hamcrest-core = { module = "org.hamcrest:hamcrest-core", version.ref = "hamcrest" }
88
hamcrest-library = { module = "org.hamcrest:hamcrest-library", version.ref = "hamcrest" }
9+
hamcrest-all = { module = "org.hamcrest:hamcrest-all", version = "1.3" }
910
jgit = "org.eclipse.jgit:org.eclipse.jgit:3.5.0.201409260305-r"
1011
junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit-jupiter" }
1112
junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "junit-jupiter" }

plugins/codemodder-plugin-maven/build.gradle.kts

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,43 +6,29 @@ plugins {
66
description = "Plugin for providing Maven dependency management functions to codemods."
77

88
dependencies {
9-
val commonsLangVersion = "3.12.0"
10-
val dom4jVersion = "2.1.3"
11-
val jaxenVersion = "1.2.0"
12-
val xercesImplVersion = "2.12.2"
13-
val xmlUnitVersion = "2.9.0"
14-
val kotlinVersion = "1.7.10"
15-
val javaSemverVersion = "0.9.0"
16-
val slf4jSimpleVersion = "2.0.0"
17-
val hamcrestVersion = "1.3"
18-
val kotlinTestVersion = "1.7.10"
19-
val slf4jApiVersion = "2.0.0"
20-
val juniversalchardetVersion = "2.4.0"
21-
val diffMatchPatchVersion = "0.0.2"
229

2310
compileOnly(libs.jetbrains.annotations)
2411
implementation(project(":framework:codemodder-base"))
2512

2613
testImplementation(testlibs.bundles.junit.jupiter)
2714
testImplementation(testlibs.bundles.hamcrest)
15+
testImplementation(testlibs.hamcrest.all)
2816
testImplementation(testlibs.assertj)
2917
testImplementation(testlibs.jgit)
3018
testImplementation(testlibs.mockito)
3119
testRuntimeOnly(testlibs.junit.jupiter.engine)
3220

33-
implementation("org.apache.commons:commons-lang3:$commonsLangVersion")
34-
implementation("org.dom4j:dom4j:$dom4jVersion")
35-
implementation("jaxen:jaxen:$jaxenVersion")
36-
implementation("xerces:xercesImpl:$xercesImplVersion")
37-
implementation("org.xmlunit:xmlunit-core:$xmlUnitVersion")
38-
implementation("org.xmlunit:xmlunit-assertj3:$xmlUnitVersion")
39-
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion")
40-
implementation("com.github.zafarkhaja:java-semver:$javaSemverVersion")
41-
implementation("com.github.albfernandez:juniversalchardet:$juniversalchardetVersion")
21+
implementation(libs.commons.lang3)
22+
implementation(libs.kotlinStdlibJdk8)
23+
implementation(libs.dom4j)
24+
implementation(libs.jaxen)
25+
implementation(libs.xerces.impl)
26+
implementation(libs.xmlunit.core)
27+
implementation(libs.xmlunit.assertj3)
28+
implementation(libs.java.semver)
29+
implementation(libs.juniversalchardet)
4230
implementation(libs.java.security.toolkit)
43-
testImplementation("fun.mike:diff-match-patch:$diffMatchPatchVersion")
44-
testImplementation("org.slf4j:slf4j-simple:$slf4jSimpleVersion")
45-
testImplementation("org.hamcrest:hamcrest-all:$hamcrestVersion")
46-
testImplementation("org.jetbrains.kotlin:kotlin-test-junit:$kotlinTestVersion")
47-
compileOnly("org.slf4j:slf4j-api:$slf4jApiVersion")
31+
implementation(libs.diff.match.patch)
32+
implementation(libs.slf4j.simple)
33+
implementation(libs.slf4j.api)
4834
}

plugins/codemodder-plugin-maven/src/test/java/io/codemodder/plugins/maven/operator/PropertyResolutionTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@
77
import java.util.Arrays;
88
import java.util.HashMap;
99
import java.util.Map;
10-
import junit.framework.TestCase;
1110
import org.dom4j.DocumentException;
1211
import org.junit.jupiter.api.Test;
1312
import org.slf4j.Logger;
1413
import org.slf4j.LoggerFactory;
1514

16-
final class PropertyResolutionTest extends TestCase {
15+
final class PropertyResolutionTest {
1716

1817
private static final Logger LOGGER = LoggerFactory.getLogger(PropertyResolutionTest.class);
1918

0 commit comments

Comments
 (0)