Skip to content

Commit 37b01cf

Browse files
committed
build: Keep the Spring Boot 2 sample apps on their published bytecode level
1 parent 7bd342c commit 37b01cf

5 files changed

Lines changed: 50 additions & 0 deletions

File tree

‎sentry-samples/sentry-samples-spring-boot-opentelemetry-noagent/build.gradle.kts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ plugins {
1010
id("io.sentry.systemtest")
1111
}
1212

13+
// Spring scans this app's own bytecode with its repackaged ASM at startup, and the oldest version
14+
// the Spring Boot 2.x matrix covers (2.4.13, Spring 5.3.13) fails on class files as new as the
15+
// toolchain's: "Unsupported class file major version 65". Only the app is scanned, so its test
16+
// code keeps following the toolchain.
17+
tasks.named<JavaCompile>("compileJava") { options.release.set(11) }
18+
19+
tasks.named<KotlinCompile>("compileKotlin") {
20+
compilerOptions.jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11
21+
}
22+
1323
application { mainClass.set("io.sentry.samples.spring.boot.SentryDemoApplication") }
1424

1525
group = "io.sentry.sample.spring-boot"

‎sentry-samples/sentry-samples-spring-boot-opentelemetry/build.gradle.kts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ plugins {
1010
id("io.sentry.systemtest")
1111
}
1212

13+
// Spring scans this app's own bytecode with its repackaged ASM at startup, and the oldest version
14+
// the Spring Boot 2.x matrix covers (2.4.13, Spring 5.3.13) fails on class files as new as the
15+
// toolchain's: "Unsupported class file major version 65". Only the app is scanned, so its test
16+
// code keeps following the toolchain.
17+
tasks.named<JavaCompile>("compileJava") { options.release.set(11) }
18+
19+
tasks.named<KotlinCompile>("compileKotlin") {
20+
compilerOptions.jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11
21+
}
22+
1323
application { mainClass.set("io.sentry.samples.spring.boot.SentryDemoApplication") }
1424

1525
group = "io.sentry.sample.spring-boot"

‎sentry-samples/sentry-samples-spring-boot-webflux/build.gradle.kts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ plugins {
1010
id("io.sentry.systemtest")
1111
}
1212

13+
// Spring scans this app's own bytecode with its repackaged ASM at startup, and the oldest version
14+
// the Spring Boot 2.x matrix covers (2.4.13, Spring 5.3.13) fails on class files as new as the
15+
// toolchain's: "Unsupported class file major version 65". Only the app is scanned, so its test
16+
// code keeps following the toolchain.
17+
tasks.named<JavaCompile>("compileJava") { options.release.set(11) }
18+
19+
tasks.named<KotlinCompile>("compileKotlin") {
20+
compilerOptions.jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11
21+
}
22+
1323
application { mainClass.set("io.sentry.samples.spring.boot.SentryDemoApplication") }
1424

1525
group = "io.sentry.sample.spring-boot"

‎sentry-samples/sentry-samples-spring-boot/build.gradle.kts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ plugins {
1010
id("io.sentry.systemtest")
1111
}
1212

13+
// Spring scans this app's own bytecode with its repackaged ASM at startup, and the oldest version
14+
// the Spring Boot 2.x matrix covers (2.4.13, Spring 5.3.13) fails on class files as new as the
15+
// toolchain's: "Unsupported class file major version 65". Only the app is scanned, so its test
16+
// code keeps following the toolchain.
17+
tasks.named<JavaCompile>("compileJava") { options.release.set(11) }
18+
19+
tasks.named<KotlinCompile>("compileKotlin") {
20+
compilerOptions.jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11
21+
}
22+
1323
application { mainClass.set("io.sentry.samples.spring.boot.SentryDemoApplication") }
1424

1525
group = "io.sentry.sample.spring-boot"

‎sentry-samples/sentry-samples-spring/build.gradle.kts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ plugins {
1010
id("io.sentry.systemtest")
1111
}
1212

13+
// Spring scans this app's own bytecode with its repackaged ASM at startup, and the oldest version
14+
// the Spring Boot 2.x matrix covers (2.4.13, Spring 5.3.13) fails on class files as new as the
15+
// toolchain's: "Unsupported class file major version 65". Only the app is scanned, so its test
16+
// code keeps following the toolchain.
17+
tasks.named<JavaCompile>("compileJava") { options.release.set(8) }
18+
19+
tasks.named<KotlinCompile>("compileKotlin") {
20+
compilerOptions.jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_1_8
21+
}
22+
1323
application { mainClass.set("io.sentry.samples.spring.Main") }
1424

1525
// Ensure WAR is up to date before run task

0 commit comments

Comments
 (0)