Skip to content

build: Disable Android debug variants outside the sample app#5825

Merged
runningcode merged 1 commit into
mainfrom
no/disable-debug-test-variants
Jul 23, 2026
Merged

build: Disable Android debug variants outside the sample app#5825
runningcode merged 1 commit into
mainfrom
no/disable-debug-test-variants

Conversation

@runningcode

Copy link
Copy Markdown
Contributor

📜 Description

Unit tests already run against the release variant (testBuildType = "release"), and CI already disabled the Android debug variant. This makes the same thing happen locally:

  • Config.Android.shouldSkipDebugVariant now skips the debug variant everywhere (not just in CI), so local builds of the libraries and integration-test apps match CI and no longer configure/build the unused debug variant.
  • The sample app (sentry-samples-android) keeps both debug and release variants locally and in CI, so manual runs and btrace profiling (installDebug) still work.
  • Updated the contributor docs (AGENTS.md, .cursor/rules/coding.mdc) and the test skill to reference testReleaseUnitTest instead of testDebugUnitTest.
  • Refreshed the now-stale "CI disables the debug variant" comments in the Android module build files and simplified the snapshot-outputs task matcher in sentry-android-core to the release task.

💡 Motivation and Context

All unit tests use the release variant, so the debug variant only added build/configuration overhead locally, and the docs pointed contributors (and agents) at a testDebugUnitTest task that no longer runs.

💚 How did you test it?

  • ./gradlew :sentry-android-core:tasks --all — only testReleaseUnitTest is present; no assembleDebug/testDebugUnitTest.
  • ./gradlew :sentry-samples:sentry-samples-android:tasks --all — both installDebug/assembleDebug and their release counterparts remain.
  • ./gradlew spotlessApply apiDump — passes with no API changes.

📝 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.

🔮 Next steps

#skip-changelog

Unit tests already target the release variant (testBuildType = release)
and CI disabled the debug variant. Disable the debug variant locally too
so local builds match CI and skip building the unused variant. The
sample app keeps both variants for manual runs and profiling.

Update the contributor docs and test skill to reference
testReleaseUnitTest instead of testDebugUnitTest.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@runningcode
runningcode marked this pull request as ready for review July 23, 2026 08:53
@runningcode
runningcode force-pushed the no/disable-debug-test-variants branch from 50cdc0a to 89fee1e Compare July 23, 2026 08:55
@sentry

sentry Bot commented Jul 23, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.50.0 (1) release

⚙️ sentry-android Build Distribution Settings

@github-actions

Copy link
Copy Markdown
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 362.69 ms 437.89 ms 75.20 ms
Size 0 B 0 B 0 B

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
eb95ded 317.51 ms 369.08 ms 51.57 ms
2124a46 319.19 ms 415.04 ms 95.85 ms
c3ee041 310.64 ms 361.90 ms 51.26 ms
dcc6bbf 382.58 ms 462.13 ms 79.54 ms
7a19fee 315.46 ms 368.62 ms 53.16 ms
9054d65 330.94 ms 403.24 ms 72.30 ms
d500866 326.13 ms 378.70 ms 52.58 ms
ad8da22 365.86 ms 427.00 ms 61.14 ms
ed33deb 337.52 ms 484.06 ms 146.54 ms
d15471f 310.26 ms 377.04 ms 66.78 ms

App size

Revision Plain With Sentry Diff
eb95ded 0 B 0 B 0 B
2124a46 1.58 MiB 2.12 MiB 551.51 KiB
c3ee041 0 B 0 B 0 B
dcc6bbf 1.58 MiB 2.12 MiB 553.10 KiB
7a19fee 0 B 0 B 0 B
9054d65 1.58 MiB 2.29 MiB 723.38 KiB
d500866 0 B 0 B 0 B
ad8da22 1.58 MiB 2.29 MiB 719.83 KiB
ed33deb 1.58 MiB 2.13 MiB 559.52 KiB
d15471f 1.58 MiB 2.13 MiB 559.54 KiB

Comment thread sentry-samples/sentry-samples-android/build.gradle.kts
@runningcode
runningcode enabled auto-merge (squash) July 23, 2026 13:59
@runningcode
runningcode merged commit 02e6bc8 into main Jul 23, 2026
71 of 74 checks passed
@runningcode
runningcode deleted the no/disable-debug-test-variants branch July 23, 2026 14:02
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.

2 participants