build(samples): Remove outputs.upToDateWhen { false } from systemTest tasks (#5522)
* 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) <noreply@anthropic.com>
* build(samples): Track systemTest app archive via convention plugin
The system tests launch the packaged sample (war/shadowJar/bootJar) from
build/libs as a separate process, so the archive is a real input to the
systemTest task even though it is not on the test classpath. Without it,
removing outputs.upToDateWhen { false } would let Gradle mark systemTest
up-to-date while a separate jar build refreshed the artifact, skipping
verification against the rebuilt sample.
Move that wiring into a single io.sentry.systemtest convention plugin in
build-logic instead of repeating it in every sample build file. The
plugin auto-detects the packaging task (war, else shadowJar, else
bootJar), mirroring the selection in test/system-test-runner.py, and
declares its archive as an input and dependency. Each sample just
applies the plugin.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* build(samples): Track OpenTelemetry agent jar as systemTest input
The agent-based OpenTelemetry samples are launched by the runner with
-javaagent:<sentry-opentelemetry-agent>, started outside the test JVM.
That jar is not on the test classpath nor one of the app archives, so
without tracking it systemTest could stay up-to-date and be skipped
while the runner launches a newer agent.
Add a usesOpenTelemetryAgent opt-in to the io.sentry.systemtest plugin;
the three agent samples enable it and the agent jar is then tracked as a
content input. The runner already builds and launches the agent before
invoking the task, so it is tracked by path without a cross-project task
dependency, which keeps it configuration-on-demand and configuration
cache compatible.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> N
Nelson Osacky committed
f982bad2175a3302c67624af6ec2bd27d72a549f
Parent: 57d359a
Committed by GitHub <noreply@github.com>
on 6/23/2026, 9:13:24 AM