Skip to content

Commit 99d2809

Browse files
authored
chore: complete the version catalog (#177)
Moves the remaining inline dependency and plugin versions into gradle/libs.versions.toml — the Spring Boot plugin, hydra-client, java-jwt, and playwright — and shares the catalog with buildSrc via buildSrc/settings.gradle.kts so its plugin-jar versions live there too. Version-managed Spring Boot starters stay as plain coordinates. The -PtestcontainersOryHydraVersion canary override continues to work through the settings-level catalog overwrite.
1 parent ffc8ae8 commit 99d2809

4 files changed

Lines changed: 33 additions & 8 deletions

File tree

buildSrc/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ repositories {
77
}
88

99
dependencies {
10-
implementation("io.freefair.gradle:lombok-plugin:9.5.0")
11-
implementation("io.spring.gradle:dependency-management-plugin:1.1.7")
12-
implementation("org.gradle.toolchains:foojay-resolver:0.9.0")
10+
implementation(libs.freefair.lombok.plugin)
11+
implementation(libs.spring.dependency.management.plugin)
12+
implementation(libs.foojay.resolver)
1313
}
1414

1515
kotlin {

buildSrc/settings.gradle.kts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1-
rootProject.name = "buildSrc"
1+
// Share the root project's version catalog with buildSrc so plugin-jar versions live in
2+
// gradle/libs.versions.toml alongside everything else.
3+
dependencyResolutionManagement {
4+
versionCatalogs {
5+
create("libs") {
6+
from(files("../gradle/libs.versions.toml"))
7+
}
8+
}
9+
}

gradle/libs.versions.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,24 @@
11
[versions]
2+
foojayResolver = "0.9.0"
3+
freefairLombok = "9.5.0"
4+
hydraClient = "26.2.0"
5+
javaJwt = "4.5.2"
6+
playwright = "1.61.0"
7+
springBoot = "4.1.0"
8+
springDependencyManagement = "1.1.7"
29
# Default pin. CI overrides this via -PtestcontainersOryHydraVersion (see settings.gradle.kts);
310
# do not inline this version back into build.gradle.kts.
411
testcontainersOryHydra = "0.0.6"
512

613
[libraries]
14+
auth0-java-jwt = { module = "com.auth0:java-jwt", version.ref = "javaJwt" }
15+
# Plugin jars consumed by buildSrc (see buildSrc/settings.gradle.kts for the catalog import).
16+
foojay-resolver = { module = "org.gradle.toolchains:foojay-resolver", version.ref = "foojayResolver" }
17+
freefair-lombok-plugin = { module = "io.freefair.gradle:lombok-plugin", version.ref = "freefairLombok" }
18+
microsoft-playwright = { module = "com.microsoft.playwright:playwright", version.ref = "playwright" }
19+
ory-hydra-client = { module = "sh.ory.hydra:hydra-client", version.ref = "hydraClient" }
20+
spring-dependency-management-plugin = { module = "io.spring.gradle:dependency-management-plugin", version.ref = "springDependencyManagement" }
721
testcontainers-ory-hydra = { module = "com.ardetrick.testcontainers:testcontainers-ory-hydra", version.ref = "testcontainersOryHydra" }
22+
23+
[plugins]
24+
spring-boot = { id = "org.springframework.boot", version.ref = "springBoot" }

reference-app/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id("org.springframework.boot") version "4.1.0"
2+
alias(libs.plugins.spring.boot)
33
id("project.java-conventions")
44
}
55

@@ -9,11 +9,11 @@ dependencies {
99
implementation("org.springframework.boot:spring-boot-starter-security")
1010
implementation("org.springframework.boot:spring-boot-starter-web")
1111
implementation("org.springframework.session:spring-session-core")
12-
implementation("sh.ory.hydra:hydra-client:26.2.0")
12+
implementation(libs.ory.hydra.client)
1313

1414
testImplementation(libs.testcontainers.ory.hydra)
15-
testImplementation("com.auth0:java-jwt:4.5.2")
16-
testImplementation("com.microsoft.playwright:playwright:1.61.0")
15+
testImplementation(libs.auth0.java.jwt)
16+
testImplementation(libs.microsoft.playwright)
1717
testImplementation("org.springframework.boot:spring-boot-starter-test")
1818
testImplementation("org.springframework.boot:spring-boot-starter-webmvc-test")
1919
}

0 commit comments

Comments
 (0)