Skip to content

build(samples): [Sample Tests 45] Move the Android sample to its own build - #6392

Open
runningcode wants to merge 11 commits into
no/samples-build-groundworkfrom
no/android-sample-own-build
Open

runningcode wants to merge 11 commits into
no/samples-build-groundworkfrom
no/android-sample-own-build

Conversation

@runningcode

@runningcode runningcode commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

PR Stack (Sample Tests)


📜 Description

I had my clanker make a nice little visual of what these changes look like. For context, in the before picture we had just the SDK build in blue and the build-logic in grey. The sample builds were a part of the blue SDK build. We're now pulling them out so that we can isolate the versions.

sentry_samples_android_composite_build

Since we have separate builds tasks need to be invoked separately now. You can't run spotless for the whole build anymore in a single gradle invocation.

💡 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. This takes over from #6047, without that PR's include from the root build back into the sample. Including it back would put the sample's plugins and versions into the SDK build again.

💚 How did you test it?

Passes CI

📝 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

#6393 moves the Android integration tests to their own build.

#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/samples-build-groundwork branch from 5ef89c4 to c18fe91 Compare October 27, 2026 14:33
@runningcode
runningcode force-pushed the no/android-sample-own-build branch from f28da1f to 63b12f6 Compare October 27, 2026 14:33
@runningcode runningcode changed the title build(samples): [Sample Tests 45] Move the Android sample to its own build build(samples): [Sample Tests 46] Move the Android sample to its own build Oct 27, 2026
@runningcode
runningcode force-pushed the no/android-sample-own-build branch from 63b12f6 to e4a9b5a Compare October 27, 2026 15:08
@runningcode
runningcode force-pushed the no/samples-build-groundwork branch from c18fe91 to 95d364c Compare October 27, 2026 15:08
@runningcode
runningcode force-pushed the no/android-sample-own-build branch from e4a9b5a to c44fa03 Compare October 28, 2026 10:09
@runningcode
runningcode force-pushed the no/samples-build-groundwork branch 2 times, most recently from 1bd946c to fa34787 Compare October 28, 2026 10:38
@runningcode
runningcode force-pushed the no/android-sample-own-build branch from c44fa03 to b454372 Compare October 28, 2026 10:38
@runningcode runningcode changed the title build(samples): [Sample Tests 46] Move the Android sample to its own build build(samples): [Sample Tests 45] Move the Android sample to its own build Oct 28, 2026
@runningcode
runningcode force-pushed the no/samples-build-groundwork branch from fa34787 to e796595 Compare October 28, 2026 16:32
@runningcode
runningcode force-pushed the no/android-sample-own-build branch from b454372 to 0da6737 Compare October 28, 2026 16:32
runningcode and others added 6 commits November 5, 2026 17:04
The Android sample is now a standalone Gradle build that includes the SDK
build. It depends on io.sentry:* coordinates, which Gradle substitutes with
the SDK's projects, so there is nothing to publish first. The SDK build
doesn't include it back, so the sample's plugins (KSP, SQLDelight, Room,
CameraX) no longer load in the SDK build.

The macrobenchmark moves into the sample's build, because AGP requires a
benchmark and the app it targets to be in the same build.

Root check and spotlessApply no longer reach the sample, so preMerge runs
the sample build's check, and the format workflow runs its spotlessApply.
That check covers what the root check ran for it: lint, unit tests,
SQLDelight migrations and spotless.

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Instead of adding it to `make preMerge`, which the SDK's Build job runs,
a new Samples workflow runs the Android sample build's `check` as its own
job. A broken sample then fails its own check, it runs in parallel with
the SDK build, and the Build job doesn't get longer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he Samples workflow

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…les workflow

The head-SHA ref only matters for build.yml's snapshot upload, and the
repository has had no submodules since #3189.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ld's

gradle.properties, gradlew, gradle/wrapper and
gradle/gradle-daemon-jvm.properties are now symlinks to the SDK build's
files. Both builds pick the same daemon JDK and JVM arguments, so they
can share a daemon, and the sample reads the SDK version from the
versionName property instead of parsing the root file.

The copied gradle.properties had drifted from the root one (-Xmx6g and
CrashOnOutOfMemoryError instead of -Xmx8g and HeapDumpOnOutOfMemoryError).

Dependabot also scans the sample build, so the Develocity plugins in its
settings stay current.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The samples and integration test builds have no unit tests, and
phoenix-actions/test-reporting fails the job when it finds no JUnit XML,
even with fail-on-error set to false.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@runningcode
runningcode force-pushed the no/android-sample-own-build branch from 1992d3b to d5f25ea Compare November 5, 2026 16:06
The root spotlessApply can't reach the Android sample, because the SDK
build doesn't include it. make format runs spotlessApply in the root and
in the sample build, and the format workflow, AGENTS.md, CONTRIBUTING.md
and the create-java-pr skill use it. CONTRIBUTING.md already documented
make format, which #4476 removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@runningcode
runningcode marked this pull request as ready for review November 5, 2026 16:45
@runningcode
runningcode requested review from a team and adinauer as code owners November 5, 2026 16:45
@runningcode
runningcode requested review from markushi and romtsn and removed request for a team November 5, 2026 16:45
@runningcode runningcode added the sanity-check PR needs a lightweight review for obvious issues label Nov 5, 2026
runningcode and others added 4 commits November 5, 2026 18:15
The sample's settings now add versionName to the catalog as
libs.versions.sentry, as the other separate builds do, and use the root
build's Develocity plugin version.

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>
…tings

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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

sanity-check PR needs a lightweight review for obvious issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant