Skip to content

Fix the failed Android release: unpin Robolectric's SDK, re-cut as android-v0.11.4 - #24

Merged
Shik3i merged 2 commits into
mainfrom
fix/android-release-robolectric
Aug 15, 2026
Merged

Fix the failed Android release: unpin Robolectric's SDK, re-cut as android-v0.11.4#24
Shik3i merged 2 commits into
mainfrom
fix/android-release-robolectric

Conversation

@Shik3i

@Shik3i Shik3i commented Aug 15, 2026

Copy link
Copy Markdown
Owner

The android-v0.11.3 release build failed at the Unit tests step — every Robolectric test in core:data threw UnsupportedOperationException before 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 pinned sdk=36 in a robolectric.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 targetSdk and the build's JDK.

It also slipped past the PR: by design, check-release-policy keeps Android builds out of every workflow except android-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.kts goes back to what it was and robolectric.properties is gone.

Verification

  • Injected the original regression (German new_episodes_title left as the English string) → the test fails.
  • Restored → passes.
  • ./gradlew --no-daemon testDebugUnitTest testReleaseUnitTest, both tasks the release workflow runs: BUILD SUCCESSFUL, 93 tests in core:data, 0 failures.

v0.11.5 (Docker) released successfully and is unaffected. No GitHub Release or artifact was produced for android-v0.11.3, so nothing downstream consumed that tag.

🤖 Generated with Claude Code

Shik3i and others added 2 commits August 15, 2026 13:05
…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>
@Shik3i Shik3i changed the title Fix the failed android-v0.11.3 release: unpin Robolectric's SDK Fix the failed Android release: unpin Robolectric's SDK, re-cut as android-v0.11.4 Aug 15, 2026
@Shik3i

Shik3i commented Aug 15, 2026

Copy link
Copy Markdown
Owner Author

Version bumped to versionCode 44 / versionName 0.11.4 on your call — android-v0.11.3 stays as a failed tag that published nothing, and its number is retired rather than reused.

Re-verified after the bump: testDebugUnitTest + testReleaseUnitTest both green, :app:assembleDebug builds, release-policy check passes.

Note for reviewers: no CI runs on this PR. ci.yml only triggers on apps/web/**, services/api/**, packages/openapi/** and the build files — this change is Android-only, and check-release-policy deliberately keeps Android builds out of every workflow except android-release.yml. The tag push is the first time CI will exercise it.

@Shik3i
Shik3i merged commit 03dd858 into main Aug 15, 2026
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