Skip to content

Commit 4c7b244

Browse files
authored
Remove dependencies.gradle and finish migration to catalog (#4045)
Signed-off-by: Dariusz Jędrzejczyk <dariusz.jedrzejczyk@broadcom.com>
1 parent ff9874e commit 4c7b244

File tree

10 files changed

+91
-80
lines changed

10 files changed

+91
-80
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ updates:
99
- "status/need-triage"
1010
reviewers:
1111
- "reactor/core-team"
12-
# updates in the oldest maintenance branch, we'll forward-merge up to main
12+
# Updates in the oldest maintenance branch. We'll forward-merge up to main
1313
target-branch: "3.7.x"
1414
ignore:
1515
# JSR166 backport is fixed
@@ -58,5 +58,5 @@ updates:
5858
- "type/dependency-upgrade"
5959
reviewers:
6060
- "reactor/core-team"
61-
# updates in oldest maintenance branch, we'll forward-merge up to main
61+
# Updates in the oldest maintenance branch. We'll forward-merge up to main
6262
target-branch: "3.7.x"

benchmarks/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ dependencies {
1616
compileOnly libs.reactor.perfBaseline.coreMicrometer
1717
compileOnly libs.jsr305
1818

19-
implementation "org.openjdk.jmh:jmh-core:$jmhVersion"
19+
implementation libs.jmh.core
2020
implementation libs.reactor.perfBaseline.extra, {
2121
exclude group: 'io.projectreactor', module: 'reactor-core'
2222
}
2323
implementation platform(libs.micrometer.bom)
24-
annotationProcessor "org.openjdk.jmh:jmh-generator-annprocess:$jmhVersion"
24+
annotationProcessor libs.jmh.generatorAnnprocess
2525

2626
current project(':reactor-core')
2727
current project(':reactor-core-micrometer')

build.gradle

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

4242
apply plugin: "io.reactor.gradle.detect-ci"
4343
apply from: "gradle/releaser.gradle"
44-
apply from: "gradle/dependencies.gradle"
4544

4645
repositories { //needed at root for asciidoctor and nohttp-checkstyle
4746
mavenCentral()

buildSrc/build.gradle

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@ repositories {
2323
gradlePluginPortal()
2424
}
2525

26-
apply from: "../gradle/dependencies.gradle"
27-
2826
dependencies {
29-
testImplementation "org.assertj:assertj-core:$assertjVersion"
30-
testImplementation platform("org.junit:junit-bom:$junitVersion")
31-
testImplementation "org.junit.jupiter:junit-jupiter-api"
32-
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine"
27+
testImplementation libs.assertJ
28+
testImplementation platform(libs.junit.bom)
29+
testImplementation libs.junit.jupiterApi
30+
testRuntimeOnly libs.junit.jupiterEngine
3331
}
3432

3533
test {

gradle/dependencies.gradle

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

gradle/libs.versions.toml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ micrometer = "1.14.8"
1818
micrometerDocsGenerator = "1.0.4"
1919
micrometerTracingTest="1.4.7"
2020
contextPropagation="1.1.3"
21-
kotlin = "1.8.22"
2221
reactiveStreams = "1.0.4"
2322
antora = "1.0.0"
2423
antora-yml = "0.0.1"
@@ -29,6 +28,20 @@ antora-collector-extension = "1.0.0-alpha.3"
2928
antora-tabs-extension = "1.0.0-beta.6"
3029
antora-springio-antora-extension = "1.14.4"
3130
antora-asciidoctor-extension = "1.0.0-alpha.10"
31+
archUnit = "0.23.1"
32+
assertJ = "3.27.3"
33+
awaitility = "4.3.0"
34+
blockhound = "1.0.13.RELEASE"
35+
byteBuddy = "1.17.6"
36+
cglib = "3.3.0"
37+
javaObjectLayout = "0.17"
38+
jmh = "1.37"
39+
junit = "5.13.2"
40+
logback = "1.2.13"
41+
mockito = "4.11.0"
42+
slf4j = "1.7.36"
43+
testng = "7.5.1" # since 7.6 JDK8 is unsupported, don't bump
44+
throwingFunction = "1.6.1"
3245

3346
[libraries]
3447
jsr166backport = "io.projectreactor:jsr166:1.0.0.RELEASE"
@@ -43,12 +56,31 @@ micrometer-docsGenerator = { module = "io.micrometer:micrometer-docs-generator",
4356
micrometer-observation-test = { module = "io.micrometer:micrometer-observation-test" }
4457
micrometer-tracing-test = { module = "io.micrometer:micrometer-tracing-integration-test", version.ref = "micrometerTracingTest" }
4558
micrometer-test = { module = "io.micrometer:micrometer-test" }
46-
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
4759
reactiveStreams = { module = "org.reactivestreams:reactive-streams", version.ref = "reactiveStreams" }
4860
reactiveStreams-tck = { module = "org.reactivestreams:reactive-streams-tck", version.ref = "reactiveStreams" }
4961
reactor-perfBaseline-core = { module = "io.projectreactor:reactor-core", version.ref = "baselinePerfCore" }
5062
reactor-perfBaseline-coreMicrometer = { module = "io.projectreactor:reactor-core-micrometer", version.ref = "baselinePerfCoreMicrometer" }
5163
reactor-perfBaseline-extra = { module = "io.projectreactor.addons:reactor-extra", version.ref = "baselinePerfExtra" }
64+
archUnit = { module = "com.tngtech.archunit:archunit", version.ref = "archUnit" }
65+
assertJ = { module = "org.assertj:assertj-core", version.ref = "assertJ" }
66+
awaitility = { module = "org.awaitility:awaitility", version.ref = "awaitility" }
67+
blockhound = { module = "io.projectreactor.tools:blockhound", version.ref = "blockhound" }
68+
byteBuddy-core = { module = "net.bytebuddy:byte-buddy", version.ref = "byteBuddy" }
69+
byteBuddy-agent = { module = "net.bytebuddy:byte-buddy-agent", version.ref = "byteBuddy" }
70+
cglib = { module = "cglib:cglib", version.ref = "cglib" }
71+
javaObjectLayout = { module = "org.openjdk.jol:jol-core", version.ref = "javaObjectLayout" }
72+
jmh-core = { module = "org.openjdk.jmh:jmh-core", version.ref = "jmh" }
73+
jmh-generatorAnnprocess = { module = "org.openjdk.jmh:jmh-core", version.ref = "jmh" }
74+
junit-bom = { module = "org.junit:junit-bom", version.ref = "junit" }
75+
junit-jupiterApi = { module = "org.junit.jupiter:junit-jupiter-api" }
76+
junit-jupiterEngine = { module = "org.junit.jupiter:junit-jupiter-engine" }
77+
junit-jupiterLauncher = { module = "org.junit.platform:junit-platform-launcher" }
78+
junit-jupiterParams = { module = "org.junit.jupiter:junit-jupiter-params" }
79+
logback = { module = "ch.qos.logback:logback-classic", version.ref = "logback" }
80+
mockito = { module = "org.mockito:mockito-core", version.ref = "mockito" }
81+
slf4j = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }
82+
testng = { module = "org.testng:testng", version.ref = "testng" }
83+
throwingFunction = { module = "com.pivovarit:throwing-function", version.ref = "throwingFunction" }
5284

5385
[plugins]
5486
artifactory = { id = "com.jfrog.artifactory", version = "4.33.1" }

reactor-core-micrometer/build.gradle

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ dependencies {
4747
implementation platform(libs.micrometer.bom)
4848
api libs.micrometer.core
4949

50-
testImplementation platform("org.junit:junit-bom:$junitVersion")
51-
testImplementation "org.junit.jupiter:junit-jupiter-api"
52-
testImplementation "org.junit.platform:junit-platform-launcher"
53-
testImplementation "org.junit.jupiter:junit-jupiter-params"
54-
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine"
50+
testImplementation platform(libs.junit.bom)
51+
testImplementation libs.junit.jupiterApi
52+
testImplementation libs.junit.jupiterLauncher
53+
testImplementation libs.junit.jupiterParams
54+
testRuntimeOnly libs.junit.jupiterEngine
5555

5656
testImplementation platform(libs.micrometer.bom)
5757
testImplementation (libs.micrometer.core) {
@@ -77,10 +77,10 @@ dependencies {
7777
// Needs sourceSets.test.output because tests there use helpers like AutoDisposingRule etc.
7878
testImplementation project(":reactor-core").sourceSets.test.output
7979

80-
testRuntimeOnly "ch.qos.logback:logback-classic:$logbackVersion" //need to access API to decrease some tests verbosity
81-
testImplementation "org.assertj:assertj-core:$assertjVersion"
82-
testImplementation "org.mockito:mockito-core:$mockitoVersion"
83-
testImplementation "org.awaitility:awaitility:$awaitilityVersion"
80+
testRuntimeOnly libs.logback //need to access API to decrease some tests verbosity
81+
testImplementation libs.assertJ
82+
testImplementation libs.mockito
83+
testImplementation libs.awaitility
8484
}
8585

8686
tasks.withType(Test).all {

reactor-core/build.gradle

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,15 @@ dependencies {
124124
*/
125125
exclude group: 'junit', module: 'junit'
126126
}
127-
tckTestImplementation "org.testng:testng:$testngVersion"
127+
tckTestImplementation libs.testng
128128

129129
// JSR-305 annotations
130130
compileOnly libs.jsr305
131131
testCompileOnly libs.jsr305
132132

133133
// Optional Logging Operator
134-
compileOnly "org.slf4j:slf4j-api:$slf4jVersion"
135-
testCompileOnly "org.slf4j:slf4j-api:$slf4jVersion"
134+
compileOnly libs.slf4j
135+
testCompileOnly libs.slf4j
136136

137137
// Optional Metrics
138138
compileOnly platform(libs.micrometer.bom)
@@ -143,29 +143,29 @@ dependencies {
143143
compileOnly libs.micrometer.contextPropagation
144144

145145
// Optional BlockHound support
146-
compileOnly "io.projectreactor.tools:blockhound:$blockhoundVersion"
146+
compileOnly libs.blockhound
147147
// Also make BlockHound visible in the CP of dedicated testset
148-
blockHoundTestImplementation "io.projectreactor.tools:blockhound:$blockhoundVersion"
148+
blockHoundTestImplementation libs.blockhound
149149

150150
// Optional JDK 9 Converter
151151
jsr166backport libs.jsr166backport
152152

153153
// Testing
154-
testImplementation platform("org.junit:junit-bom:$junitVersion")
155-
testImplementation "org.junit.jupiter:junit-jupiter-api"
156-
testImplementation "org.junit.platform:junit-platform-launcher"
157-
testImplementation "org.junit.jupiter:junit-jupiter-params"
158-
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine"
154+
testImplementation platform(libs.junit.bom)
155+
testImplementation libs.junit.jupiterApi
156+
testImplementation libs.junit.jupiterLauncher
157+
testImplementation libs.junit.jupiterParams
158+
testRuntimeOnly libs.junit.jupiterEngine
159159
testImplementation(project(":reactor-test")) {
160160
exclude module: 'reactor-core'
161161
}
162-
testImplementation "ch.qos.logback:logback-classic:$logbackVersion" //need to access API to decrease some tests verbosity
163-
testImplementation "org.assertj:assertj-core:$assertjVersion"
164-
testImplementation "org.mockito:mockito-core:$mockitoVersion"
165-
testImplementation "org.openjdk.jol:jol-core:$javaObjectLayoutVersion"
166-
testImplementation "org.awaitility:awaitility:$awaitilityVersion"
167-
testImplementation "com.pivovarit:throwing-function:$throwingFunctionVersion"
168-
testImplementation "com.tngtech.archunit:archunit:$archUnitVersion"
162+
testImplementation libs.logback //need to access API to decrease some tests verbosity
163+
testImplementation libs.assertJ
164+
testImplementation libs.mockito
165+
testImplementation libs.javaObjectLayout
166+
testImplementation libs.awaitility
167+
testImplementation libs.throwingFunction
168+
testImplementation libs.archUnit
169169

170170
// withMicrometerTest is a test-set that validates what happens when micrometer *IS*
171171
// on the classpath. Needs sourceSets.test.output because tests there use helpers like AutoDisposingRule etc.
@@ -184,7 +184,7 @@ dependencies {
184184
jcstressImplementation(project(":reactor-test")) {
185185
exclude module: 'reactor-core'
186186
}
187-
jcstressImplementation "ch.qos.logback:logback-classic:$logbackVersion"
187+
jcstressImplementation libs.logback
188188

189189
}
190190

reactor-test/build.gradle

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ dependencies {
4040
api project(":reactor-core")
4141
compileOnly libs.jsr305
4242

43-
testImplementation platform("org.junit:junit-bom:$junitVersion")
44-
testImplementation "org.junit.jupiter:junit-jupiter-api"
45-
testImplementation "org.junit.jupiter:junit-jupiter-params"
46-
testRuntimeOnly "org.junit.platform:junit-platform-launcher"
47-
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine"
48-
49-
testRuntimeOnly "ch.qos.logback:logback-classic:$logbackVersion"
50-
testImplementation "org.assertj:assertj-core:$assertjVersion"
51-
testImplementation "org.mockito:mockito-core:$mockitoVersion"
43+
testImplementation platform(libs.junit.bom)
44+
testImplementation libs.junit.jupiterApi
45+
testImplementation libs.junit.jupiterParams
46+
testImplementation libs.junit.jupiterLauncher
47+
testRuntimeOnly libs.junit.jupiterEngine
48+
49+
testRuntimeOnly libs.logback
50+
testImplementation libs.assertJ
51+
testImplementation libs.mockito
5252
}
5353

5454
task downloadBaseline(type: Download) {

reactor-tools/build.gradle

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,27 +68,27 @@ dependencies {
6868
compileOnly libs.jsr305
6969
compileOnly libs.jsr305
7070

71-
shaded "net.bytebuddy:byte-buddy:$byteBuddyVersion"
72-
shaded "net.bytebuddy:byte-buddy-agent:$byteBuddyVersion"
71+
shaded libs.byteBuddy.core
72+
shaded libs.byteBuddy.agent
7373
for (dependency in project.configurations.shaded.dependencies) {
7474
compileOnly(dependency)
7575
testRuntimeOnly(dependency)
7676
javaAgentTestRuntimeOnly(dependency)
7777
}
7878

79-
testImplementation platform("org.junit:junit-bom:$junitVersion")
80-
testImplementation "org.junit.jupiter:junit-jupiter-api"
81-
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine"
79+
testImplementation platform(libs.junit.bom)
80+
testImplementation libs.junit.jupiterApi
81+
testRuntimeOnly libs.junit.jupiterEngine
8282

83-
testImplementation "org.assertj:assertj-core:$assertjVersion"
84-
testImplementation "cglib:cglib:$cglibVersion"
83+
testImplementation libs.assertJ
84+
testImplementation libs.cglib
8585

86-
jarFileTestImplementation "org.assertj:assertj-core:$assertjVersion"
86+
jarFileTestImplementation libs.assertJ
8787

8888
buildPluginTestImplementation gradleTestKit()
89-
buildPluginTestImplementation platform("org.junit:junit-bom:$junitVersion")
90-
buildPluginTestImplementation "org.junit.jupiter:junit-jupiter-api"
91-
buildPluginTestRuntimeOnly "org.junit.jupiter:junit-jupiter-engine"
89+
buildPluginTestImplementation platform(libs.junit.bom)
90+
buildPluginTestImplementation libs.junit.jupiterApi
91+
buildPluginTestRuntimeOnly libs.junit.jupiterEngine
9292
}
9393

9494
test {
@@ -205,8 +205,8 @@ task generateMockGradle(type: Copy) {
205205
CORE: coreJar,
206206
AGENT: agentJar,
207207
REACTIVE_STREAMS_VERSION: libs.versions.reactiveStreams.get(),
208-
JUNIT_BOM_VERSION: "$junitVersion".toString(),
209-
BYTE_BUDDY_VERSION: "$byteBuddyVersion".toString()
208+
JUNIT_BOM_VERSION: libs.versions.junit.get(),
209+
BYTE_BUDDY_VERSION: libs.versions.byteBuddy.get()
210210
])
211211
}
212212

0 commit comments

Comments
 (0)