Skip to content

build(samples): [Sample Tests 47] Move the Android integration tests to their own build - #6393

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

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

Conversation

@runningcode

@runningcode runningcode commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

PR Stack (Sample Tests)


📜 Description

sentry-uitest-android, sentry-uitest-android-critical and test-app-size are now a standalone Gradle build in sentry-android-integration-tests that includes the SDK build, like the Android sample. They depend on io.sentry:* coordinates, which Gradle substitutes with the SDK's projects, including the unpublished sentry-test-support. The SDK build doesn't include them back, so SAGP, the uitests' AndroidX test dependencies and their errorprone setup no longer load in it.

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

  • Plugins: the build's root build.gradle.kts loads AGP, Kotlin, errorprone, detekt and SAGP once for all three apps.
  • Detekt: uitest-android's detekt config moves into its own build file. It came from the root build's subprojects block.
  • AGP stays shared: a composite build can only use one AGP version, so the AGP matrix job's VERSION_AGP applies to both builds.
  • CI:
    • make preMerge runs this build's check, which covers what the root check ran for these apps: lint for all three, detekt and spotless.
    • The AGP matrix and size workflows call the build with -p.
    • The Makefile's assemble targets do too, so the UI test workflows don't change.
    • APK paths don't change.

💡 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?

  • :sentry-uitest-android:assembleRelease, :sentry-uitest-android:assembleAndroidTest, :sentry-uitest-android-critical:assembleRelease and :test-app-size:bundleRelease succeed. The outputs land at the paths the workflows and Sauce config use.
  • check passes and runs lintRelease for all three apps, detekt and spotless. With the lint version pin in this build's gradle.properties, uitest-android's lint (warningsAsErrors) failed on GradleDependency. The old layout passes because lint read gradle.properties from the module's parent directory, which had none.
  • With VERSION_AGP=9.2.1, :sentry-uitest-android:assembleRelease succeeds, so both builds use the same AGP.
  • Not run: the instrumented tests on an emulator or Sauce Labs, and the size upload, which needs SENTRY_AUTH_TOKEN.

📝 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

#6394 moves the JVM samples 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.62.0 (1) release

⚙️ sentry-android Build Distribution Settings

@runningcode
runningcode force-pushed the no/android-sample-own-build branch from f28da1f to 63b12f6 Compare October 27, 2026 14:33
@runningcode
runningcode force-pushed the no/android-integration-tests-own-build branch from 04f1683 to 7771435 Compare October 27, 2026 14:33
@runningcode runningcode changed the title build(samples): [Sample Tests 46] Move the Android integration tests to their own build build(samples): [Sample Tests 47] Move the Android integration tests to their own build Oct 27, 2026
sentry-uitest-android, sentry-uitest-android-critical and test-app-size
are now a standalone Gradle build that includes the SDK build, like the
Android sample. They depend on io.sentry:* coordinates, which Gradle
substitutes with the SDK's projects, including the unpublished
sentry-test-support. The SDK build doesn't include them back, so SAGP,
errorprone's uitest checks and their AndroidX test dependencies no longer
load in the SDK build.

AGP stays shared: a composite build can only use one AGP version, so the
AGP matrix job's VERSION_AGP still applies to both builds.

Root check and spotlessApply no longer reach these apps, so preMerge runs
this build's check, which covers what the root check ran for them: lint,
detekt and spotless. The format workflow runs its spotlessApply, and the
AGP matrix, UI test and size workflows call it with -p. APK paths don't
change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@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/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