Skip to content

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

Draft
runningcode wants to merge 1 commit into
no/android-integration-tests-own-buildfrom
no/jvm-samples-own-build
Draft

runningcode wants to merge 1 commit into
no/android-integration-tests-own-buildfrom
no/jvm-samples-own-build

Conversation

@runningcode

@runningcode runningcode commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

PR Stack (Sample Tests)


📜 Description

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 it. sentry-samples-android stays a separate build of its own.

Run it with ./gradlew -p sentry-samples <task>.

  • Conventions: the build's root build.gradle.kts applies io.sentry.spotless and io.sentry.jdk-target to every sample, as the SDK build's root did. The Spring Boot plugin stays in each sample, because the samples use different versions of it.
  • bootRunWithAgent: the three tasks find the agent jar from the repository root and take the SDK version from the catalog.
  • SDK build cleanup: with no samples or integration tests left, the apiValidation list keeps only sentry-test-support. The name filters that skipped samples and integration tests for publishing and CodeQL go too.
  • Docs: AGENTS.md and the new_module rule describe the separate builds.
  • CI: make preMerge runs this build's check, and the format workflow and make checkFormat cover it.

💡 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 and 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.
  • At the top of the stack:
    • Each separate build's check passes.
    • Root buildForCodeQL and root check --dry-run pass.
    • spotlessApply apiDump 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

make preMerge now runs three more Gradle invocations in the required Build job, and each configures the SDK build again. The added CI time hasn't been measured yet.

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

This is the last PR in the stack.

#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.62.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
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, its
apiValidation list and 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>
@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

This branch has not been deployed

No deployments
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.

1 participant