Repository navigation
build(samples): Build the Android sample and tests in one Gradle build - #6613
Merged
Merged
Conversation
📲 Install BuildsAndroid
|
runningcode
marked this pull request as ready for review
November 16, 2026 09:17
runningcode
requested review from
markushi and
romtsn
and removed request for
a team
November 16, 2026 09:17
Move the Android sample and its macrobenchmark into the sentry-android-integration-tests build, next to the UI tests and the size test, so every Android app that exercises the SDK lives in one folder and one build. The sample becomes a subproject instead of its build's root project, so its own settings and symlinked Gradle files go away. The macrobenchmark gets back its pre-#6391 name, sentry-uitest-android-macrobenchmark, which matches its namespace and Sauce config. CI, the Makefile and the docs follow the new paths, and the Samples workflow checks one Android build instead of two. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
runningcode
force-pushed
the
no/android-single-composite-build
branch
from
November 16, 2026 09:18
ca36a36 to
f984ec7
Compare
romtsn
approved these changes
Nov 17, 2026
romtsn
left a comment
Contributor
There was a problem hiding this comment.
approving but one question:
- should
sentry-android-integration-testsbe renamed to something different now that it contains the sample as well?
Contributor
Author
|
Yeah i had that same thought but the sample is an integration test as well so i thought the name suited. Open to other suggestions though! |
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.
📜 Description
Merges the two Android Gradle builds that sit outside the SDK build into one. The Android sample and its macrobenchmark move into
sentry-android-integration-tests, next to the UI tests and the size test, so every Android app that exercises the SDK lives in one folder and one build.Builds
Before, there were two Android builds, each including the SDK build:
flowchart LR SDK[("SDK build<br/>(repo root)")] subgraph SA["sentry-samples/sentry-samples-android (build)"] APP[": (root project)<br/>sample app"] MB[":macrobenchmark"] end subgraph IT["sentry-android-integration-tests (build)"] UI[":sentry-uitest-android"] CR[":sentry-uitest-android-critical"] SZ[":test-app-size"] end MB -- targetProjectPath --> APP SA -. includeBuild .-> SDK IT -. includeBuild .-> SDKAfter, there is one:
flowchart LR SDK[("SDK build<br/>(repo root)")] subgraph IT["sentry-android-integration-tests (build)"] APP[":sentry-samples-android"] MB[":sentry-uitest-android-macrobenchmark"] UI[":sentry-uitest-android"] CR[":sentry-uitest-android-critical"] SZ[":test-app-size"] end MB -- targetProjectPath --> APP IT -. includeBuild .-> SDKFolders
Before:
After:
Changes
settings.gradle.ktsand the symlinkedgradle.properties,gradlew,gradle/wrapperandgradle/gradle-daemon-jvm.propertiesare gone, since the integration-tests build already has identical ones. It stays two levels below the repo root, so its relative paths (debug.keystore, the native logging toggle) are unchanged.sentry-uitest-android-macrobenchmarkagain, its name before build(samples): [Sample Tests 44] Prepare the samples to build outside the SDK build #6391 moved it into the sample's build. That also matches its namespace and its Sauce config.targetProjectPathpoints at:sentry-samples-android.apply false, like the other plugins, so they load next to AGP and KGP.sentry-samples-androidrow; thesentry-android-integration-testsrow now checks the sample too..sauce/sentry-uitest-android-macrobenchmark.ymluse the new task and APK paths.sentry-samples/sentry-samples-android/**ignore, since*android*/**already covers the new location.make formatandmake checkFormatrun three builds instead of four.AGENTS.mdand the btrace skill use the new paths. In Android Studio, opensentry-android-integration-teststo get the sample.💡 Motivation and Context
Two Android builds meant two Gradle configurations, two Samples CI jobs, and the sample's build nested inside the JVM samples folder. The macrobenchmark only had to move into the sample's build because
targetProjectPathmust name a project in the same build; with a single build it can sit next to the other test apps again.💚 How did you test it?
Assembled the sample (debug and release) and the macrobenchmark APK locally from the combined build, ran
make format api.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
#skip-changelog
🤖 Generated with Claude Code