Skip to content

Enable test coverage only for debug builds - #63

Merged
warting merged 1 commit into
mainfrom
fix/jacoco-release-debuggable
Jul 20, 2026
Merged

Enable test coverage only for debug builds#63
warting merged 1 commit into
mainfrom
fix/jacoco-release-debuggable

Conversation

@warting

@warting warting commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Release artifacts have been built with android:debuggable="true" since the convention-plugin restructure. The Jacoco convention plugins enabled enableAndroidTestCoverage/enableUnitTestCoverage on every build type, and coverage instrumentation forces a variant to be debuggable.

This surfaced twice in the release pipeline:

  • Gradle Play Publisher skipped the release variants (GPP cannot configure variant 'playRelease' because it is debuggable) — the v0.6.1 failure
  • The Play Developer API rejected the v0.6.2 bundle (APK is marked as debuggable)

Change

Coverage is now enabled only for the debug build type, in both AndroidApplicationJacocoConventionPlugin and AndroidLibraryJacocoConventionPlugin.

Testing

  • ./gradlew :app:assembleFullRelease locally: the release APK manifest no longer contains the debuggable attribute (verified with aapt2 dump badging)
  • ./gradlew test passes
  • Final validation by re-tagging a release after merge

🤖 Generated with Claude Code

The Jacoco convention plugins enabled enableAndroidTestCoverage and
enableUnitTestCoverage on every build type. Coverage instrumentation
forces a variant to be debuggable, so all release artifacts since the
convention-plugin restructure carried android:debuggable=true.

This surfaced twice in the release pipeline: Gradle Play Publisher
skipped the release variants ('GPP cannot configure variant ... because
it is debuggable'), and the Play Developer API rejected the upload of
the v0.6.2 bundle ('APK is marked as debuggable').

Coverage is now enabled only for the debug build type, in both the
application and library convention plugins. Verified locally: the
release APK no longer contains the debuggable attribute.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@warting
warting enabled auto-merge (squash) July 20, 2026 13:01
@warting
warting merged commit 255957f into main Jul 20, 2026
2 checks passed
@warting
warting deleted the fix/jacoco-release-debuggable branch July 20, 2026 13:06
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