Skip to content

Use committed version metadata in release builds for reproducible APKs - #310

Merged
Moustachauve merged 2 commits into
devfrom
fix_android_reproducible_builds
Nov 6, 2026
Merged

Moustachauve merged 2 commits into
devfrom
fix_android_reproducible_builds

Conversation

@Moustachauve

@Moustachauve Moustachauve commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Computing VERSION_CODE dynamically from github.run_number and injecting it via -PversionCode in CI caused the signed GitHub Release APK's AndroidManifest.xml and BuildConfig.VERSION_CODE to diverge from a clean build of the git tag, breaking IzzyOnDroid Reproducible Builds for v8.0.0.

Since /prepare-release already runs before every beta and production deployment, bumping app_versionCode and app_versionName in gradle/libs.versions.toml (renamed from app-version* to use underscores for compatibility with IzzyOnDroid's yq parser, along with MARKETING_VERSION and CURRENT_PROJECT_VERSION in project.pbxproj) as part of the release-prep PR keeps gradle/libs.versions.toml as the single source of truth. release.yml now verifies that the release tag matches the committed version metadata and runs :app:assembleRelease without CLI property overrides or workspace changelog mutations so external builders produce byte-for-byte identical APKs.

Fixes #309

Computing VERSION_CODE from github.run_number and passing it via -PversionCode in CI caused the release APK's AndroidManifest.xml and BuildConfig.VERSION_CODE to diverge from what IzzyOnDroid builds from the git tag (#309).

Sync app-versionCode and CURRENT_PROJECT_VERSION to 108 (matching the published v8.0.0 store builds), update /prepare-release to bump the committed version metadata before every beta and production release, and have release.yml validate and build directly from gradle/libs.versions.toml without CLI overrides or workspace changelog mutations.
@Moustachauve Moustachauve added fix patch For fixes. labels Nov 5, 2026
@github-actions github-actions Bot added chore For changes that are mostly maintenance work. documentation Improvements or additions to documentation labels Nov 5, 2026
IzzyOnDroid's Debian yq parser cannot evaluate dashed keys like .versions.app-versionCode in gradle/libs.versions.toml (#309). Using underscores (app_versionCode and app_versionName) allows yq to read them directly while generating the same libs.versions.app.versionCode Kotlin accessors in Gradle.
@Moustachauve
Moustachauve merged commit 7ed02df into dev Nov 6, 2026
7 checks passed
@Moustachauve
Moustachauve deleted the fix_android_reproducible_builds branch November 6, 2026 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore For changes that are mostly maintenance work. documentation Improvements or additions to documentation fix patch For fixes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant