Repository navigation
build(samples): [Sample Tests 46] Move the Android sample to its own build - #6392
Draft
runningcode wants to merge 1 commit into
Draft
runningcode wants to merge 1 commit into
runningcode wants to merge 1 commit into
Conversation
This was referenced Oct 27, 2026
Draft
📲 Install BuildsAndroid
|
runningcode
force-pushed
the
no/samples-build-groundwork
branch
from
October 27, 2026 14:33
5ef89c4 to
c18fe91
Compare
runningcode
force-pushed
the
no/android-sample-own-build
branch
from
October 27, 2026 14:33
f28da1f to
63b12f6
Compare
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>
runningcode
force-pushed
the
no/android-sample-own-build
branch
from
October 27, 2026 15:08
63b12f6 to
e4a9b5a
Compare
runningcode
force-pushed
the
no/samples-build-groundwork
branch
from
October 27, 2026 15:08
c18fe91 to
95d364c
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Stack (Sample Tests)
main)📜 Description
sentry-samples/sentry-samples-androidis now a standalone Gradle build that includes the SDK build. It depends onio.sentry:*coordinates, which Gradle substitutes with the SDK's projects, so there is nothing to publish first. The SDK build doesn't include the sample back, so KSP, SQLDelight, Room and CameraX no longer load in it.Run it with
./gradlew -p sentry-samples/sentry-samples-android <task>, or open that directory in Android Studio.:macrobenchmark, because AGP requires a benchmark and the app it targets to be in the same build. The macrobenchmark workflow and its Sauce config follow.gradle.propertiesonly for the build it belongs to. The sample's settings readversionNamefrom the SDK build's file and add it to the catalog aslibs.versions.sentry.gradle.properties: the sample has its own copy of the lines it needs from the root file. It leaves outandroid.experimental.lint.version, because lint reads the build root'sgradle.propertiesand flags the pin, which equals AGP's bundled lint (9.4.0).checkandspotlessApplyno longer reach the sample.make preMerge, which the required Build job runs, runs the sample build'scheck. That covers what the rootcheckran for it: lint, unit tests, the SQLDelight migration checks and spotless. The format workflow andmake checkFormatcover the sample build too.💡 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?
assembleDebug,assembleReleaseand:macrobenchmark:assembleBenchmarksucceed. The APKs land at the paths the Sauce config uses.dependencies --configuration debugRuntimeClasspath: all 11io.sentry:*dependencies resolve to SDK projects.checkpasses and runslintDebug,testDebugUnitTest, both SQLDelight migration checks and spotless.-Xlint:all -Werrorflags fromio.sentry.jdk-target.check --dry-runno longer includes the sample.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
The sample directory has no Gradle wrapper of its own, so opening it alone in Android Studio may ask which Gradle to use.
#6393 moves the Android integration tests to their own build.
#skip-changelog
🤖 Generated with Claude Code