Skip to content

Commit 98e7d65

Browse files
committed
Update spring boot plugin
1 parent fd74eb8 commit 98e7d65

File tree

6 files changed

+17
-29
lines changed

6 files changed

+17
-29
lines changed

settings.gradle.kts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,6 @@ dependencyResolutionManagement {
2828
mavenCentral()
2929
mavenLocal()
3030
}
31-
32-
versionCatalogs {
33-
fun addSpringBootCatalog(name: String, minVersion: String, maxVersion: String) {
34-
val latestDepTest = gradle.startParameter.projectProperties["testLatestDeps"] == "true"
35-
create(name) {
36-
val version =
37-
gradle.startParameter.projectProperties["${name}Version"]
38-
?: (if (latestDepTest) maxVersion else minVersion)
39-
plugin("versions", "org.springframework.boot").version(version)
40-
}
41-
}
42-
// r2dbc is not compatible with earlier versions
43-
addSpringBootCatalog("springBoot2", "2.6.15", "2.+")
44-
// spring boot 3.0 is not compatible with graalvm native image
45-
addSpringBootCatalog("springBoot31", "3.1.0", "3.+")
46-
addSpringBootCatalog("springBoot32", "3.2.0", "3.+")
47-
}
4831
}
4932

5033
develocity {

smoke-tests-otel-starter/spring-boot-2/build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id("otel.java-conventions")
3-
alias(springBoot2.plugins.versions)
3+
id("org.springframework.boot") version "3.5.4"
44
}
55

66
description = "smoke-tests-otel-starter-spring-boot-2"
@@ -13,7 +13,8 @@ dependencies {
1313
implementation("org.springframework.kafka:spring-kafka")
1414
implementation("org.springframework.boot:spring-boot-starter-data-mongodb")
1515
implementation("org.springframework.boot:spring-boot-starter-aop")
16-
implementation(platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES))
16+
val testLatestDeps = gradle.startParameter.projectProperties["testLatestDeps"] == "true"
17+
implementation(platform("org.springframework.boot:spring-boot-dependencies:" + if (testLatestDeps) "2.+" else "2.6.15"))
1718

1819
implementation(project(":smoke-tests-otel-starter:spring-boot-common"))
1920

smoke-tests-otel-starter/spring-boot-3.2/build.gradle.kts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id("otel.java-conventions")
3-
alias(springBoot32.plugins.versions)
3+
id("org.springframework.boot") version "3.5.4"
44
id("org.graalvm.buildtools.native")
55
}
66

@@ -10,6 +10,8 @@ otelJava {
1010
minJavaVersionSupported.set(JavaVersion.VERSION_17)
1111
}
1212

13+
val testLatestDeps = gradle.startParameter.projectProperties["testLatestDeps"] == "true"
14+
1315
dependencies {
1416
implementation("org.springframework.boot:spring-boot-starter-web")
1517
implementation("org.springframework.boot:spring-boot-starter-data-jdbc")
@@ -18,12 +20,11 @@ dependencies {
1820
implementation("org.springframework.kafka:spring-kafka")
1921
implementation("org.springframework.boot:spring-boot-starter-data-mongodb")
2022
implementation("org.springframework.boot:spring-boot-starter-aop")
21-
implementation(platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES))
23+
implementation(platform("org.springframework.boot:spring-boot-dependencies:" + if (testLatestDeps) "3.+" else "3.2.0"))
2224

2325
implementation(project(":smoke-tests-otel-starter:spring-boot-common"))
2426
testImplementation("org.springframework.boot:spring-boot-starter-test")
2527

26-
val testLatestDeps = gradle.startParameter.projectProperties["testLatestDeps"] == "true"
2728
if (testLatestDeps) {
2829
// with spring boot 3.5.0 versions of org.mongodb:mongodb-driver-sync and org.mongodb:mongodb-driver-core
2930
// are not in sync

smoke-tests-otel-starter/spring-boot-3/build.gradle.kts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id("otel.java-conventions")
3-
alias(springBoot31.plugins.versions)
3+
id("org.springframework.boot") version "3.5.4"
44
id("org.graalvm.buildtools.native")
55
}
66

@@ -10,6 +10,8 @@ otelJava {
1010
minJavaVersionSupported.set(JavaVersion.VERSION_17)
1111
}
1212

13+
val testLatestDeps = gradle.startParameter.projectProperties["testLatestDeps"] == "true"
14+
1315
dependencies {
1416
implementation("org.springframework.boot:spring-boot-starter-web")
1517
implementation("org.springframework.boot:spring-boot-starter-data-jdbc")
@@ -18,15 +20,14 @@ dependencies {
1820
implementation("org.springframework.kafka:spring-kafka")
1921
implementation("org.springframework.boot:spring-boot-starter-data-mongodb")
2022
implementation("org.springframework.boot:spring-boot-starter-aop")
21-
implementation(platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES))
23+
implementation(platform("org.springframework.boot:spring-boot-dependencies:" + if (testLatestDeps) "3.1.+" else "3.1.0"))
2224

2325
implementation(project(":smoke-tests-otel-starter:spring-boot-common"))
2426
testImplementation("org.testcontainers:junit-jupiter")
2527
testImplementation("org.testcontainers:kafka")
2628
testImplementation("org.testcontainers:mongodb")
2729
testImplementation("org.springframework.boot:spring-boot-starter-test")
2830

29-
val testLatestDeps = gradle.startParameter.projectProperties["testLatestDeps"] == "true"
3031
if (testLatestDeps) {
3132
// with spring boot 3.5.0 versions of org.mongodb:mongodb-driver-sync and org.mongodb:mongodb-driver-core
3233
// are not in sync

smoke-tests-otel-starter/spring-boot-reactive-2/build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
plugins {
22
id("otel.java-conventions")
3-
alias(springBoot2.plugins.versions)
3+
id("org.springframework.boot") version "3.5.4"
44
}
55

66
description = "smoke-tests-otel-starter-spring-boot-reactive-2"
77

88
dependencies {
99
implementation(project(":instrumentation:spring:starters:spring-boot-starter"))
10-
implementation(platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES))
10+
val testLatestDeps = gradle.startParameter.projectProperties["testLatestDeps"] == "true"
11+
implementation(platform("org.springframework.boot:spring-boot-dependencies:" + if (testLatestDeps) "2.+" else "2.6.15"))
1112

1213
implementation(project(":smoke-tests-otel-starter:spring-boot-reactive-common"))
1314
implementation("org.springframework.boot:spring-boot-starter-webflux")

smoke-tests-otel-starter/spring-boot-reactive-3/build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id("otel.java-conventions")
3-
alias(springBoot31.plugins.versions)
3+
id("org.springframework.boot") version "3.5.4"
44
id("org.graalvm.buildtools.native")
55
}
66

@@ -12,7 +12,8 @@ otelJava {
1212

1313
dependencies {
1414
implementation(project(":instrumentation:spring:starters:spring-boot-starter"))
15-
implementation(platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES))
15+
val testLatestDeps = gradle.startParameter.projectProperties["testLatestDeps"] == "true"
16+
implementation(platform("org.springframework.boot:spring-boot-dependencies:" + if (testLatestDeps) "3.+" else "3.1.0"))
1617

1718
implementation(project(":smoke-tests-otel-starter:spring-boot-reactive-common"))
1819
implementation("org.springframework.boot:spring-boot-starter-webflux")

0 commit comments

Comments
 (0)