From 44084faf0ee92b23376b9be75e9604f76e86a068 Mon Sep 17 00:00:00 2001 From: Nelson Osacky Date: Wed, 10 Jun 2026 10:43:58 +0200 Subject: [PATCH 1/2] build(samples): Remove outputs.upToDateWhen { false } from systemTest tasks The systemTest tasks in the sample modules forced Gradle to always treat their outputs as out of date, disabling up-to-date checks and build cache reuse. Removing this lets Gradle rely on its normal input/output tracking for the Test tasks. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../build.gradle.kts | 2 -- sentry-samples/sentry-samples-console-otlp/build.gradle.kts | 2 -- sentry-samples/sentry-samples-console/build.gradle.kts | 2 -- sentry-samples/sentry-samples-jul/build.gradle.kts | 2 -- sentry-samples/sentry-samples-log4j2/build.gradle.kts | 2 -- sentry-samples/sentry-samples-logback/build.gradle.kts | 2 -- sentry-samples/sentry-samples-spring-7/build.gradle.kts | 2 -- .../build.gradle.kts | 2 -- .../sentry-samples-spring-boot-4-opentelemetry/build.gradle.kts | 2 -- .../sentry-samples-spring-boot-4-otlp/build.gradle.kts | 2 -- .../sentry-samples-spring-boot-4-webflux/build.gradle.kts | 2 -- sentry-samples/sentry-samples-spring-boot-4/build.gradle.kts | 2 -- .../build.gradle.kts | 2 -- .../build.gradle.kts | 2 -- .../sentry-samples-spring-boot-jakarta/build.gradle.kts | 2 -- .../build.gradle.kts | 2 -- .../sentry-samples-spring-boot-opentelemetry/build.gradle.kts | 2 -- .../sentry-samples-spring-boot-webflux-jakarta/build.gradle.kts | 2 -- .../sentry-samples-spring-boot-webflux/build.gradle.kts | 2 -- sentry-samples/sentry-samples-spring-boot/build.gradle.kts | 2 -- sentry-samples/sentry-samples-spring-jakarta/build.gradle.kts | 2 -- sentry-samples/sentry-samples-spring/build.gradle.kts | 2 -- 22 files changed, 44 deletions(-) diff --git a/sentry-samples/sentry-samples-console-opentelemetry-noagent/build.gradle.kts b/sentry-samples/sentry-samples-console-opentelemetry-noagent/build.gradle.kts index f5d14dc2c38..3d957d47d70 100644 --- a/sentry-samples/sentry-samples-console-opentelemetry-noagent/build.gradle.kts +++ b/sentry-samples/sentry-samples-console-opentelemetry-noagent/build.gradle.kts @@ -71,8 +71,6 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } - maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-console-otlp/build.gradle.kts b/sentry-samples/sentry-samples-console-otlp/build.gradle.kts index 483f6bea799..b15095d34fa 100644 --- a/sentry-samples/sentry-samples-console-otlp/build.gradle.kts +++ b/sentry-samples/sentry-samples-console-otlp/build.gradle.kts @@ -74,8 +74,6 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } - maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-console/build.gradle.kts b/sentry-samples/sentry-samples-console/build.gradle.kts index 79878ab9a08..ca4cef0e1fe 100644 --- a/sentry-samples/sentry-samples-console/build.gradle.kts +++ b/sentry-samples/sentry-samples-console/build.gradle.kts @@ -75,8 +75,6 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } - maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-jul/build.gradle.kts b/sentry-samples/sentry-samples-jul/build.gradle.kts index 01e6a95f13d..8dda92fec68 100644 --- a/sentry-samples/sentry-samples-jul/build.gradle.kts +++ b/sentry-samples/sentry-samples-jul/build.gradle.kts @@ -66,8 +66,6 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } - maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-log4j2/build.gradle.kts b/sentry-samples/sentry-samples-log4j2/build.gradle.kts index 005e1116528..eeb5e28c136 100644 --- a/sentry-samples/sentry-samples-log4j2/build.gradle.kts +++ b/sentry-samples/sentry-samples-log4j2/build.gradle.kts @@ -72,8 +72,6 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } - maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-logback/build.gradle.kts b/sentry-samples/sentry-samples-logback/build.gradle.kts index 05f96c346a8..ec94c75f111 100644 --- a/sentry-samples/sentry-samples-logback/build.gradle.kts +++ b/sentry-samples/sentry-samples-logback/build.gradle.kts @@ -66,8 +66,6 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } - maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-7/build.gradle.kts b/sentry-samples/sentry-samples-spring-7/build.gradle.kts index e3300cd2841..87e130ab89b 100644 --- a/sentry-samples/sentry-samples-spring-7/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-7/build.gradle.kts @@ -77,8 +77,6 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } - maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-boot-4-opentelemetry-noagent/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-4-opentelemetry-noagent/build.gradle.kts index 64ef57692c3..7be3ca89465 100644 --- a/sentry-samples/sentry-samples-spring-boot-4-opentelemetry-noagent/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-4-opentelemetry-noagent/build.gradle.kts @@ -90,8 +90,6 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } - maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-boot-4-opentelemetry/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-4-opentelemetry/build.gradle.kts index e12b960e0fd..fea36cf4109 100644 --- a/sentry-samples/sentry-samples-spring-boot-4-opentelemetry/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-4-opentelemetry/build.gradle.kts @@ -118,8 +118,6 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } - maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-boot-4-otlp/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-4-otlp/build.gradle.kts index 7329d5cc0ea..2281fc03d49 100644 --- a/sentry-samples/sentry-samples-spring-boot-4-otlp/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-4-otlp/build.gradle.kts @@ -91,8 +91,6 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } - maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-boot-4-webflux/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-4-webflux/build.gradle.kts index a311b8a972e..2557b551dc1 100644 --- a/sentry-samples/sentry-samples-spring-boot-4-webflux/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-4-webflux/build.gradle.kts @@ -70,8 +70,6 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } - maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-boot-4/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-4/build.gradle.kts index cdb33ecc675..3d494b9567b 100644 --- a/sentry-samples/sentry-samples-spring-boot-4/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-4/build.gradle.kts @@ -92,8 +92,6 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } - maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-boot-jakarta-opentelemetry-noagent/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-jakarta-opentelemetry-noagent/build.gradle.kts index 7966e621ebd..e75f4b5f2c5 100644 --- a/sentry-samples/sentry-samples-spring-boot-jakarta-opentelemetry-noagent/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-jakarta-opentelemetry-noagent/build.gradle.kts @@ -95,8 +95,6 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } - maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-boot-jakarta-opentelemetry/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-jakarta-opentelemetry/build.gradle.kts index 3c7e00ae552..97c2437567f 100644 --- a/sentry-samples/sentry-samples-spring-boot-jakarta-opentelemetry/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-jakarta-opentelemetry/build.gradle.kts @@ -128,8 +128,6 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } - maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-boot-jakarta/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-jakarta/build.gradle.kts index d5e4caa595d..0e054a25fd4 100644 --- a/sentry-samples/sentry-samples-spring-boot-jakarta/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-jakarta/build.gradle.kts @@ -98,8 +98,6 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } - maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-boot-opentelemetry-noagent/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-opentelemetry-noagent/build.gradle.kts index 0b8c5a181e7..762c78964c5 100644 --- a/sentry-samples/sentry-samples-spring-boot-opentelemetry-noagent/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-opentelemetry-noagent/build.gradle.kts @@ -140,8 +140,6 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } - maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-boot-opentelemetry/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-opentelemetry/build.gradle.kts index b78f1f01881..b2a5bb5353c 100644 --- a/sentry-samples/sentry-samples-spring-boot-opentelemetry/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-opentelemetry/build.gradle.kts @@ -162,8 +162,6 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } - maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-boot-webflux-jakarta/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-webflux-jakarta/build.gradle.kts index 8b2079ddd9c..dd9946196d5 100644 --- a/sentry-samples/sentry-samples-spring-boot-webflux-jakarta/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-webflux-jakarta/build.gradle.kts @@ -72,8 +72,6 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } - maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-boot-webflux/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-webflux/build.gradle.kts index 2127dbfd79f..4d29e0daac2 100644 --- a/sentry-samples/sentry-samples-spring-boot-webflux/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-webflux/build.gradle.kts @@ -107,8 +107,6 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } - maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-boot/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot/build.gradle.kts index 0a2a6f2da57..9bd1a4f70bd 100644 --- a/sentry-samples/sentry-samples-spring-boot/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot/build.gradle.kts @@ -141,8 +141,6 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } - maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-jakarta/build.gradle.kts b/sentry-samples/sentry-samples-spring-jakarta/build.gradle.kts index 3dec793e5c9..9c1f4fd523b 100644 --- a/sentry-samples/sentry-samples-spring-jakarta/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-jakarta/build.gradle.kts @@ -77,8 +77,6 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } - maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring/build.gradle.kts b/sentry-samples/sentry-samples-spring/build.gradle.kts index 02e7f632450..aa289186c9f 100644 --- a/sentry-samples/sentry-samples-spring/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring/build.gradle.kts @@ -78,8 +78,6 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } - maxParallelForks = 1 // Cap JVM args per test From b038dc17a2039529e52848a58c08576c41846735 Mon Sep 17 00:00:00 2001 From: Nelson Osacky Date: Wed, 10 Jun 2026 14:32:29 +0200 Subject: [PATCH 2/2] build(samples): Track launched app archive as systemTest input Removing outputs.upToDateWhen { false } let Gradle treat systemTest as up-to-date from the test classpath alone, but the tests launch the packaged sample (shadowJar/bootJar/war) from build/libs as a separate process, and that archive was neither a task input nor a dependency. A separate jar build could refresh the artifact while systemTest was skipped, so verification would not run against the rebuilt sample. Declare the packaging task's archive as an input and depend on it, mirroring the task selection in system-test-runner.py (war for the Tomcat samples, shadowJar where the Shadow plugin is applied, bootJar otherwise). Up-to-date checks now account for the real artifact. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../build.gradle.kts | 9 +++++++++ .../sentry-samples-console-otlp/build.gradle.kts | 9 +++++++++ sentry-samples/sentry-samples-console/build.gradle.kts | 9 +++++++++ sentry-samples/sentry-samples-jul/build.gradle.kts | 9 +++++++++ sentry-samples/sentry-samples-log4j2/build.gradle.kts | 9 +++++++++ sentry-samples/sentry-samples-logback/build.gradle.kts | 9 +++++++++ sentry-samples/sentry-samples-spring-7/build.gradle.kts | 9 +++++++++ .../build.gradle.kts | 9 +++++++++ .../build.gradle.kts | 9 +++++++++ .../sentry-samples-spring-boot-4-otlp/build.gradle.kts | 9 +++++++++ .../build.gradle.kts | 9 +++++++++ .../sentry-samples-spring-boot-4/build.gradle.kts | 9 +++++++++ .../build.gradle.kts | 9 +++++++++ .../build.gradle.kts | 9 +++++++++ .../sentry-samples-spring-boot-jakarta/build.gradle.kts | 9 +++++++++ .../build.gradle.kts | 9 +++++++++ .../build.gradle.kts | 9 +++++++++ .../build.gradle.kts | 9 +++++++++ .../sentry-samples-spring-boot-webflux/build.gradle.kts | 9 +++++++++ .../sentry-samples-spring-boot/build.gradle.kts | 9 +++++++++ .../sentry-samples-spring-jakarta/build.gradle.kts | 9 +++++++++ sentry-samples/sentry-samples-spring/build.gradle.kts | 9 +++++++++ 22 files changed, 198 insertions(+) diff --git a/sentry-samples/sentry-samples-console-opentelemetry-noagent/build.gradle.kts b/sentry-samples/sentry-samples-console-opentelemetry-noagent/build.gradle.kts index 3d957d47d70..85807b46f51 100644 --- a/sentry-samples/sentry-samples-console-opentelemetry-noagent/build.gradle.kts +++ b/sentry-samples/sentry-samples-console-opentelemetry-noagent/build.gradle.kts @@ -71,6 +71,15 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath + // System tests launch the packaged sample app from build/libs as a separate + // process, so the archive is a real input even though it is not on the test classpath. + val appArchive = tasks.named("shadowJar") + dependsOn(appArchive) + inputs + .files(appArchive) + .withPropertyName("appArchive") + .withNormalizer(ClasspathNormalizer::class.java) + maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-console-otlp/build.gradle.kts b/sentry-samples/sentry-samples-console-otlp/build.gradle.kts index b15095d34fa..3c896565242 100644 --- a/sentry-samples/sentry-samples-console-otlp/build.gradle.kts +++ b/sentry-samples/sentry-samples-console-otlp/build.gradle.kts @@ -74,6 +74,15 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath + // System tests launch the packaged sample app from build/libs as a separate + // process, so the archive is a real input even though it is not on the test classpath. + val appArchive = tasks.named("shadowJar") + dependsOn(appArchive) + inputs + .files(appArchive) + .withPropertyName("appArchive") + .withNormalizer(ClasspathNormalizer::class.java) + maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-console/build.gradle.kts b/sentry-samples/sentry-samples-console/build.gradle.kts index ca4cef0e1fe..2416c6475e3 100644 --- a/sentry-samples/sentry-samples-console/build.gradle.kts +++ b/sentry-samples/sentry-samples-console/build.gradle.kts @@ -75,6 +75,15 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath + // System tests launch the packaged sample app from build/libs as a separate + // process, so the archive is a real input even though it is not on the test classpath. + val appArchive = tasks.named("shadowJar") + dependsOn(appArchive) + inputs + .files(appArchive) + .withPropertyName("appArchive") + .withNormalizer(ClasspathNormalizer::class.java) + maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-jul/build.gradle.kts b/sentry-samples/sentry-samples-jul/build.gradle.kts index 8dda92fec68..3c9ce93126a 100644 --- a/sentry-samples/sentry-samples-jul/build.gradle.kts +++ b/sentry-samples/sentry-samples-jul/build.gradle.kts @@ -66,6 +66,15 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath + // System tests launch the packaged sample app from build/libs as a separate + // process, so the archive is a real input even though it is not on the test classpath. + val appArchive = tasks.named("shadowJar") + dependsOn(appArchive) + inputs + .files(appArchive) + .withPropertyName("appArchive") + .withNormalizer(ClasspathNormalizer::class.java) + maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-log4j2/build.gradle.kts b/sentry-samples/sentry-samples-log4j2/build.gradle.kts index eeb5e28c136..bf6b052f77c 100644 --- a/sentry-samples/sentry-samples-log4j2/build.gradle.kts +++ b/sentry-samples/sentry-samples-log4j2/build.gradle.kts @@ -72,6 +72,15 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath + // System tests launch the packaged sample app from build/libs as a separate + // process, so the archive is a real input even though it is not on the test classpath. + val appArchive = tasks.named("shadowJar") + dependsOn(appArchive) + inputs + .files(appArchive) + .withPropertyName("appArchive") + .withNormalizer(ClasspathNormalizer::class.java) + maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-logback/build.gradle.kts b/sentry-samples/sentry-samples-logback/build.gradle.kts index ec94c75f111..800adafcd4c 100644 --- a/sentry-samples/sentry-samples-logback/build.gradle.kts +++ b/sentry-samples/sentry-samples-logback/build.gradle.kts @@ -66,6 +66,15 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath + // System tests launch the packaged sample app from build/libs as a separate + // process, so the archive is a real input even though it is not on the test classpath. + val appArchive = tasks.named("shadowJar") + dependsOn(appArchive) + inputs + .files(appArchive) + .withPropertyName("appArchive") + .withNormalizer(ClasspathNormalizer::class.java) + maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-7/build.gradle.kts b/sentry-samples/sentry-samples-spring-7/build.gradle.kts index 87e130ab89b..6abc0ac9081 100644 --- a/sentry-samples/sentry-samples-spring-7/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-7/build.gradle.kts @@ -77,6 +77,15 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath + // System tests launch the packaged sample app from build/libs as a separate + // process, so the archive is a real input even though it is not on the test classpath. + val appArchive = tasks.named("war") + dependsOn(appArchive) + inputs + .files(appArchive) + .withPropertyName("appArchive") + .withNormalizer(ClasspathNormalizer::class.java) + maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-boot-4-opentelemetry-noagent/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-4-opentelemetry-noagent/build.gradle.kts index 7be3ca89465..f167e47170c 100644 --- a/sentry-samples/sentry-samples-spring-boot-4-opentelemetry-noagent/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-4-opentelemetry-noagent/build.gradle.kts @@ -90,6 +90,15 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath + // System tests launch the packaged sample app from build/libs as a separate + // process, so the archive is a real input even though it is not on the test classpath. + val appArchive = tasks.named("bootJar") + dependsOn(appArchive) + inputs + .files(appArchive) + .withPropertyName("appArchive") + .withNormalizer(ClasspathNormalizer::class.java) + maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-boot-4-opentelemetry/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-4-opentelemetry/build.gradle.kts index fea36cf4109..892f74f70bd 100644 --- a/sentry-samples/sentry-samples-spring-boot-4-opentelemetry/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-4-opentelemetry/build.gradle.kts @@ -118,6 +118,15 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath + // System tests launch the packaged sample app from build/libs as a separate + // process, so the archive is a real input even though it is not on the test classpath. + val appArchive = tasks.named("bootJar") + dependsOn(appArchive) + inputs + .files(appArchive) + .withPropertyName("appArchive") + .withNormalizer(ClasspathNormalizer::class.java) + maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-boot-4-otlp/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-4-otlp/build.gradle.kts index 2281fc03d49..895a59fba55 100644 --- a/sentry-samples/sentry-samples-spring-boot-4-otlp/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-4-otlp/build.gradle.kts @@ -91,6 +91,15 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath + // System tests launch the packaged sample app from build/libs as a separate + // process, so the archive is a real input even though it is not on the test classpath. + val appArchive = tasks.named("bootJar") + dependsOn(appArchive) + inputs + .files(appArchive) + .withPropertyName("appArchive") + .withNormalizer(ClasspathNormalizer::class.java) + maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-boot-4-webflux/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-4-webflux/build.gradle.kts index 2557b551dc1..91633221d9b 100644 --- a/sentry-samples/sentry-samples-spring-boot-4-webflux/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-4-webflux/build.gradle.kts @@ -70,6 +70,15 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath + // System tests launch the packaged sample app from build/libs as a separate + // process, so the archive is a real input even though it is not on the test classpath. + val appArchive = tasks.named("bootJar") + dependsOn(appArchive) + inputs + .files(appArchive) + .withPropertyName("appArchive") + .withNormalizer(ClasspathNormalizer::class.java) + maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-boot-4/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-4/build.gradle.kts index 3d494b9567b..3cd9fe44701 100644 --- a/sentry-samples/sentry-samples-spring-boot-4/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-4/build.gradle.kts @@ -92,6 +92,15 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath + // System tests launch the packaged sample app from build/libs as a separate + // process, so the archive is a real input even though it is not on the test classpath. + val appArchive = tasks.named("bootJar") + dependsOn(appArchive) + inputs + .files(appArchive) + .withPropertyName("appArchive") + .withNormalizer(ClasspathNormalizer::class.java) + maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-boot-jakarta-opentelemetry-noagent/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-jakarta-opentelemetry-noagent/build.gradle.kts index e75f4b5f2c5..958ff15aaeb 100644 --- a/sentry-samples/sentry-samples-spring-boot-jakarta-opentelemetry-noagent/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-jakarta-opentelemetry-noagent/build.gradle.kts @@ -95,6 +95,15 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath + // System tests launch the packaged sample app from build/libs as a separate + // process, so the archive is a real input even though it is not on the test classpath. + val appArchive = tasks.named("bootJar") + dependsOn(appArchive) + inputs + .files(appArchive) + .withPropertyName("appArchive") + .withNormalizer(ClasspathNormalizer::class.java) + maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-boot-jakarta-opentelemetry/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-jakarta-opentelemetry/build.gradle.kts index 97c2437567f..c7cd04a3397 100644 --- a/sentry-samples/sentry-samples-spring-boot-jakarta-opentelemetry/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-jakarta-opentelemetry/build.gradle.kts @@ -128,6 +128,15 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath + // System tests launch the packaged sample app from build/libs as a separate + // process, so the archive is a real input even though it is not on the test classpath. + val appArchive = tasks.named("bootJar") + dependsOn(appArchive) + inputs + .files(appArchive) + .withPropertyName("appArchive") + .withNormalizer(ClasspathNormalizer::class.java) + maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-boot-jakarta/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-jakarta/build.gradle.kts index 0e054a25fd4..9521e2c15b4 100644 --- a/sentry-samples/sentry-samples-spring-boot-jakarta/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-jakarta/build.gradle.kts @@ -98,6 +98,15 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath + // System tests launch the packaged sample app from build/libs as a separate + // process, so the archive is a real input even though it is not on the test classpath. + val appArchive = tasks.named("bootJar") + dependsOn(appArchive) + inputs + .files(appArchive) + .withPropertyName("appArchive") + .withNormalizer(ClasspathNormalizer::class.java) + maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-boot-opentelemetry-noagent/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-opentelemetry-noagent/build.gradle.kts index 762c78964c5..de350a232e6 100644 --- a/sentry-samples/sentry-samples-spring-boot-opentelemetry-noagent/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-opentelemetry-noagent/build.gradle.kts @@ -140,6 +140,15 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath + // System tests launch the packaged sample app from build/libs as a separate + // process, so the archive is a real input even though it is not on the test classpath. + val appArchive = tasks.named("shadowJar") + dependsOn(appArchive) + inputs + .files(appArchive) + .withPropertyName("appArchive") + .withNormalizer(ClasspathNormalizer::class.java) + maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-boot-opentelemetry/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-opentelemetry/build.gradle.kts index b2a5bb5353c..be6a9cfaef7 100644 --- a/sentry-samples/sentry-samples-spring-boot-opentelemetry/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-opentelemetry/build.gradle.kts @@ -162,6 +162,15 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath + // System tests launch the packaged sample app from build/libs as a separate + // process, so the archive is a real input even though it is not on the test classpath. + val appArchive = tasks.named("shadowJar") + dependsOn(appArchive) + inputs + .files(appArchive) + .withPropertyName("appArchive") + .withNormalizer(ClasspathNormalizer::class.java) + maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-boot-webflux-jakarta/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-webflux-jakarta/build.gradle.kts index dd9946196d5..f1465a29524 100644 --- a/sentry-samples/sentry-samples-spring-boot-webflux-jakarta/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-webflux-jakarta/build.gradle.kts @@ -72,6 +72,15 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath + // System tests launch the packaged sample app from build/libs as a separate + // process, so the archive is a real input even though it is not on the test classpath. + val appArchive = tasks.named("bootJar") + dependsOn(appArchive) + inputs + .files(appArchive) + .withPropertyName("appArchive") + .withNormalizer(ClasspathNormalizer::class.java) + maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-boot-webflux/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-webflux/build.gradle.kts index 4d29e0daac2..69aa7588ccc 100644 --- a/sentry-samples/sentry-samples-spring-boot-webflux/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-webflux/build.gradle.kts @@ -107,6 +107,15 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath + // System tests launch the packaged sample app from build/libs as a separate + // process, so the archive is a real input even though it is not on the test classpath. + val appArchive = tasks.named("shadowJar") + dependsOn(appArchive) + inputs + .files(appArchive) + .withPropertyName("appArchive") + .withNormalizer(ClasspathNormalizer::class.java) + maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-boot/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot/build.gradle.kts index 9bd1a4f70bd..f3380d9ea2b 100644 --- a/sentry-samples/sentry-samples-spring-boot/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot/build.gradle.kts @@ -141,6 +141,15 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath + // System tests launch the packaged sample app from build/libs as a separate + // process, so the archive is a real input even though it is not on the test classpath. + val appArchive = tasks.named("shadowJar") + dependsOn(appArchive) + inputs + .files(appArchive) + .withPropertyName("appArchive") + .withNormalizer(ClasspathNormalizer::class.java) + maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring-jakarta/build.gradle.kts b/sentry-samples/sentry-samples-spring-jakarta/build.gradle.kts index 9c1f4fd523b..c8c1a791144 100644 --- a/sentry-samples/sentry-samples-spring-jakarta/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-jakarta/build.gradle.kts @@ -77,6 +77,15 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath + // System tests launch the packaged sample app from build/libs as a separate + // process, so the archive is a real input even though it is not on the test classpath. + val appArchive = tasks.named("war") + dependsOn(appArchive) + inputs + .files(appArchive) + .withPropertyName("appArchive") + .withNormalizer(ClasspathNormalizer::class.java) + maxParallelForks = 1 // Cap JVM args per test diff --git a/sentry-samples/sentry-samples-spring/build.gradle.kts b/sentry-samples/sentry-samples-spring/build.gradle.kts index aa289186c9f..180eef5edb6 100644 --- a/sentry-samples/sentry-samples-spring/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring/build.gradle.kts @@ -78,6 +78,15 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath + // System tests launch the packaged sample app from build/libs as a separate + // process, so the archive is a real input even though it is not on the test classpath. + val appArchive = tasks.named("war") + dependsOn(appArchive) + inputs + .files(appArchive) + .withPropertyName("appArchive") + .withNormalizer(ClasspathNormalizer::class.java) + maxParallelForks = 1 // Cap JVM args per test