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..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,7 +71,14 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } + // 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 diff --git a/sentry-samples/sentry-samples-console-otlp/build.gradle.kts b/sentry-samples/sentry-samples-console-otlp/build.gradle.kts index 483f6bea799..3c896565242 100644 --- a/sentry-samples/sentry-samples-console-otlp/build.gradle.kts +++ b/sentry-samples/sentry-samples-console-otlp/build.gradle.kts @@ -74,7 +74,14 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } + // 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 diff --git a/sentry-samples/sentry-samples-console/build.gradle.kts b/sentry-samples/sentry-samples-console/build.gradle.kts index 79878ab9a08..2416c6475e3 100644 --- a/sentry-samples/sentry-samples-console/build.gradle.kts +++ b/sentry-samples/sentry-samples-console/build.gradle.kts @@ -75,7 +75,14 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } + // 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 diff --git a/sentry-samples/sentry-samples-jul/build.gradle.kts b/sentry-samples/sentry-samples-jul/build.gradle.kts index 01e6a95f13d..3c9ce93126a 100644 --- a/sentry-samples/sentry-samples-jul/build.gradle.kts +++ b/sentry-samples/sentry-samples-jul/build.gradle.kts @@ -66,7 +66,14 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } + // 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 diff --git a/sentry-samples/sentry-samples-log4j2/build.gradle.kts b/sentry-samples/sentry-samples-log4j2/build.gradle.kts index 005e1116528..bf6b052f77c 100644 --- a/sentry-samples/sentry-samples-log4j2/build.gradle.kts +++ b/sentry-samples/sentry-samples-log4j2/build.gradle.kts @@ -72,7 +72,14 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } + // 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 diff --git a/sentry-samples/sentry-samples-logback/build.gradle.kts b/sentry-samples/sentry-samples-logback/build.gradle.kts index 05f96c346a8..800adafcd4c 100644 --- a/sentry-samples/sentry-samples-logback/build.gradle.kts +++ b/sentry-samples/sentry-samples-logback/build.gradle.kts @@ -66,7 +66,14 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } + // 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 diff --git a/sentry-samples/sentry-samples-spring-7/build.gradle.kts b/sentry-samples/sentry-samples-spring-7/build.gradle.kts index e3300cd2841..6abc0ac9081 100644 --- a/sentry-samples/sentry-samples-spring-7/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-7/build.gradle.kts @@ -77,7 +77,14 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } + // 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 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..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,7 +90,14 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } + // 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 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..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,7 +118,14 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } + // 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 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..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,7 +91,14 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } + // 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 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..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,7 +70,14 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } + // 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 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..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,7 +92,14 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } + // 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 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..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,7 +95,14 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } + // 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 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..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,7 +128,14 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } + // 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 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..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,7 +98,14 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } + // 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 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..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,7 +140,14 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } + // 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 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..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,7 +162,14 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } + // 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 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..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,7 +72,14 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } + // 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 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..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,7 +107,14 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } + // 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 diff --git a/sentry-samples/sentry-samples-spring-boot/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot/build.gradle.kts index 0a2a6f2da57..f3380d9ea2b 100644 --- a/sentry-samples/sentry-samples-spring-boot/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot/build.gradle.kts @@ -141,7 +141,14 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } + // 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 diff --git a/sentry-samples/sentry-samples-spring-jakarta/build.gradle.kts b/sentry-samples/sentry-samples-spring-jakarta/build.gradle.kts index 3dec793e5c9..c8c1a791144 100644 --- a/sentry-samples/sentry-samples-spring-jakarta/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-jakarta/build.gradle.kts @@ -77,7 +77,14 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } + // 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 diff --git a/sentry-samples/sentry-samples-spring/build.gradle.kts b/sentry-samples/sentry-samples-spring/build.gradle.kts index 02e7f632450..180eef5edb6 100644 --- a/sentry-samples/sentry-samples-spring/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring/build.gradle.kts @@ -78,7 +78,14 @@ tasks.register("systemTest").configure { testClassesDirs = test.output.classesDirs classpath = test.runtimeClasspath - outputs.upToDateWhen { false } + // 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