Fix the failed Android release: unpin Robolectric's SDK, re-cut as android-v0.11.4 - #24
Merged
Merged
Conversation
…ic SDK The android-v0.11.3 release build failed: every Robolectric test in core:data died with UnsupportedOperationException before running. Enabling merged resources for unit tests made Robolectric derive its SDK from the merged manifest, which targets API 37. Pinning sdk=36 to get past that worked locally on JDK 21 and could not work in CI, which runs JDK 17 — an android-all image that new needs the newer JVM. So the test tied every test in the module to a relationship between the app's targetSdk and the build's JDK, which is not a relationship a string assertion should have any opinion about. The two failure modes worth guarding are a key that was never translated and a placeholder set that disagrees between locales. Both are visible in the resource XML, so the test reads it directly: no merged resources, no SDK pin, no Android runtime, and the build configuration goes back to what it was. Verified by injecting the original regression (German left as the English string), which fails the test, and by running testDebugUnitTest and testReleaseUnitTest — both of the tasks the release workflow runs, which is what I should have run before tagging. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
android-v0.11.3 failed before publishing anything, so its version number is retired rather than reused: tags stay immutable and nobody has to wonder which 0.11.3 they are looking at. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Owner
Author
|
Version bumped to Re-verified after the bump: Note for reviewers: no CI runs on this PR. |
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.
The
android-v0.11.3release build failed at the Unit tests step — every Robolectric test incore:datathrewUnsupportedOperationExceptionbefore running. My regression, from #23.What happened
To let a test assert the German notification strings are actually translated, I enabled merged resources for unit tests. That made Robolectric derive its SDK from the merged manifest, which targets API 37, and it refused (
targetSdkVersion=37 > maxSdkVersion=36). I pinnedsdk=36in arobolectric.properties.That passed locally and could never pass in CI: I am on JDK 21, the release workflow is on JDK 17, and the API 36 android-all image needs the newer JVM. So a string assertion ended up tying every test in the module to the relationship between the app's
targetSdkand the build's JDK.It also slipped past the PR: by design,
check-release-policykeeps Android builds out of every workflow exceptandroid-release.yml, so PR CI never runs these tests. The mitigation is running both release-workflow tasks locally before tagging — which I hadn't.The fix
The two failure modes worth guarding are a key that was never translated and a placeholder set that disagrees between locales. Both are visible in the resource XML, so the test reads it directly — no merged resources, no SDK pin, no Android runtime.
core/data/build.gradle.ktsgoes back to what it was androbolectric.propertiesis gone.Verification
new_episodes_titleleft as the English string) → the test fails../gradlew --no-daemon testDebugUnitTest testReleaseUnitTest, both tasks the release workflow runs: BUILD SUCCESSFUL, 93 tests incore:data, 0 failures.v0.11.5(Docker) released successfully and is unaffected. No GitHub Release or artifact was produced forandroid-v0.11.3, so nothing downstream consumed that tag.🤖 Generated with Claude Code