Skip to content

build(samples): [Sample Tests 47] Move the JVM samples to their own build - #6394

Merged
runningcode merged 8 commits into
mainfrom
no/jvm-samples-own-build
Nov 6, 2026
Merged

runningcode merged 8 commits into
mainfrom
no/jvm-samples-own-build

Conversation

@runningcode

@runningcode runningcode commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

PR Stack (Sample Tests)


📜 Description

Here's a little diagram from my clanker:
sentry_samples_builds_6394

This moves the `sentry-samples to their own build

💡 Motivation and Context

Part of the Linear project "Separate sample projects and tests from build." (JAVA-626): untie the SDK build from the versions used to test.

💚 How did you test it?

  • check passes from sentry-samples through its symlinked wrapper. The daemon starts on JDK 21 from the symlinked pin.
  • check runs what the root check ran for the samples: 28 compileJava, 20 compileKotlin, 20 jar, 5 shadowJar and 28 spotlessCheck.
  • Every io.sentry:* coordinate is checked against the SDK's project names. Typesafe accessors drop the hyphen before a digit, so sentrySpring7 is sentry-spring-7.
  • Root assemble --dry-run configures every SDK project without the Spring dependency-management declaration.
  • make format runs all four builds and changes nothing.
  • Not run: the samples themselves, including bootRunWithAgent.

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

Decoupling AGP from the SDK build needs the build-local Maven repo (JAVA-625).

#skip-changelog

🤖 Generated with Claude Code

@sentry

sentry Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.63.0 (1) release

⚙️ sentry-android Build Distribution Settings

@runningcode
runningcode force-pushed the no/android-integration-tests-own-build branch from 04f1683 to 7771435 Compare October 27, 2026 14:33
@runningcode
runningcode force-pushed the no/jvm-samples-own-build branch from 25775a4 to 02f2246 Compare October 27, 2026 14:33
@runningcode runningcode changed the title build(samples): [Sample Tests 47] Move the JVM samples to their own build build(samples): [Sample Tests 48] Move the JVM samples to their own build Oct 27, 2026
@runningcode
runningcode force-pushed the no/jvm-samples-own-build branch from 02f2246 to c78db42 Compare October 27, 2026 15:08
@runningcode
runningcode force-pushed the no/android-integration-tests-own-build branch from 7771435 to 76332ce Compare October 27, 2026 15:08
@runningcode
runningcode force-pushed the no/jvm-samples-own-build branch from c78db42 to f10b2e7 Compare October 28, 2026 10:09
@runningcode
runningcode force-pushed the no/android-integration-tests-own-build branch from 76332ce to 77bdde5 Compare October 28, 2026 10:09
@runningcode
runningcode force-pushed the no/jvm-samples-own-build branch from f10b2e7 to 4b70a06 Compare October 28, 2026 10:38
@runningcode
runningcode force-pushed the no/android-integration-tests-own-build branch from 77bdde5 to 12d5c7c Compare October 28, 2026 10:38
@runningcode runningcode changed the title build(samples): [Sample Tests 48] Move the JVM samples to their own build build(samples): [Sample Tests 47] Move the JVM samples to their own build Oct 28, 2026
@runningcode
runningcode force-pushed the no/android-integration-tests-own-build branch from 12d5c7c to 0ec48f1 Compare October 28, 2026 16:32
@runningcode
runningcode force-pushed the no/jvm-samples-own-build branch 2 times, most recently from 01c2d1c to 8324d47 Compare October 28, 2026 16:40
@runningcode
runningcode force-pushed the no/android-integration-tests-own-build branch 2 times, most recently from fcc7ba0 to 310e34e Compare November 5, 2026 16:34
@runningcode
runningcode force-pushed the no/jvm-samples-own-build branch from 91d3e9c to 28f75b3 Compare November 5, 2026 17:09
@runningcode
runningcode force-pushed the no/android-integration-tests-own-build branch from ebe1d63 to 356db6c Compare November 5, 2026 17:16
@runningcode
runningcode force-pushed the no/jvm-samples-own-build branch from 28f75b3 to f33be46 Compare November 5, 2026 17:20
@runningcode
runningcode marked this pull request as ready for review November 5, 2026 17:28
@runningcode
runningcode requested review from a team and adinauer as code owners November 5, 2026 17:28
@runningcode
runningcode requested review from 0xadam-brown and romtsn and removed request for a team November 5, 2026 17:28
@runningcode
runningcode force-pushed the no/android-integration-tests-own-build branch from 356db6c to 9d8ac7b Compare November 5, 2026 17:32
@runningcode
runningcode force-pushed the no/jvm-samples-own-build branch from f33be46 to f8c877f Compare November 5, 2026 17:32
@runningcode
runningcode force-pushed the no/android-integration-tests-own-build branch from 9d8ac7b to 27ec18e Compare November 5, 2026 17:35
@runningcode
runningcode force-pushed the no/jvm-samples-own-build branch from e38a01e to 6cb9996 Compare November 5, 2026 17:35

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 6cb9996. Configure here.

Base automatically changed from no/android-integration-tests-own-build to no/android-sample-own-build November 6, 2026 14:28
Base automatically changed from no/android-sample-own-build to no/samples-build-groundwork November 6, 2026 14:29
@runningcode
runningcode force-pushed the no/samples-build-groundwork branch from 8d0ed83 to 0825f70 Compare November 6, 2026 14:34
Base automatically changed from no/samples-build-groundwork to main November 6, 2026 14:47
runningcode and others added 7 commits November 6, 2026 15:49
The 28 JVM samples are now a standalone Gradle build in sentry-samples
that includes the SDK build, like the Android sample and the Android
integration tests. They depend on io.sentry:* coordinates, which Gradle
substitutes with the SDK's projects. The SDK build doesn't include them
back, so the Spring Boot, gretty and shadow plugins the samples apply no
longer load in the SDK build.

The three bootRunWithAgent tasks find the agent jar from the repository
root and take the SDK version from the catalog, since the samples build
has its own root directory and gradle.properties.

With no samples or integration tests left in the SDK build, the name
filters that skipped them for publishing and CodeQL go too.

Root check and spotlessApply no longer reach the samples, so preMerge runs
this build's check, which covers what the root check ran for them:
compilation, jars and spotless. The format workflow runs its
spotlessApply.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gradle.properties, gradlew, gradle/wrapper and
gradle/gradle-daemon-jvm.properties are now symlinks to the SDK build's
files, as in the Android sample and integration test builds. The copied
gradle.properties had drifted from the root one (-Xmx6g and
CrashOnOutOfMemoryError), and the build had no wrapper or daemon JDK pin.

The settings read the SDK version from the shared versionName property,
use the root build's Develocity plugin version, and include each sample
on its own line, matching the other separate builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each sample applies io.sentry.spotless and io.sentry.jdk-target in its
own plugins block, as the modules of the other separate builds do,
instead of the root script applying them to every subproject.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The JVM samples' check runs as its own job in the Samples workflow, like
the other separate builds, instead of through checkSamples in make
preMerge, so it no longer lengthens the required Build job. Dependabot
scans their build too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the JVM samples in their own build, no project in the SDK build
applies io.spring.dependency-management.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@runningcode
runningcode force-pushed the no/jvm-samples-own-build branch from 6cb9996 to 48391c4 Compare November 6, 2026 14:50

@romtsn romtsn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor comment might be legit, pre-approving

The dependencies block read sentryVersion before its declaration ran, so the
sample asked for io.sentry:sentry-servlet:null. The composite build substitutes
the SDK project by group and name, which hid it, but resolving published
artifacts would fail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@runningcode
runningcode enabled auto-merge (squash) November 6, 2026 15:04
@runningcode
runningcode merged commit c9a84ee into main Nov 6, 2026
46 checks passed
@runningcode
runningcode deleted the no/jvm-samples-own-build branch November 6, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants