Repository navigation
Build libsqlite3.so with the NDK Gradle uses; prepare 1.13.2 - #102
Merged
Merged
Conversation
The SQLite build hook takes its compiler from Flutter, which reads ANDROID_NDK_HOME before anything else; Gradle compiles libdartjni.so with flutter.ndkVersion. GitHub's runners point the variable at their own default NDK, so the published 1.13.1 carries a libsqlite3.so built with r27d beside a libdartjni.so built with r28c. fdroidserver sets the same variable to the recipe's ndk:, r28c, so F-Droid's build cannot reproduce the release: the two libraries differ in 1.58 million of 1.75 million bytes. Two local builds agreed only because they share the one thing that differed. tool/pin_ndk.sh reads flutter.ndkVersion from the Flutter SDK, installs that NDK if needed and points ANDROID_NDK_HOME at it; both workflows run it before building. tool/check_apk_ndk.py reads the NDK each library compiled here names in its .note.android.ident and fails unless libsqlite3.so and libdartjni.so both carry that version. Prebuilt ones (libflutter.so, AndroidX's libdatastore_shared_counter.so) are not checked; they come with whatever NDK their publishers used. Tested against the 1.13.1 release APKs (fails, naming both NDKs), a local r28c build (passes), a wrong expectation and a missing library (both fail). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nothing changes in the app: this release exists so that F-Droid can reproduce it, now that libsqlite3.so is built with the same NDK as the rest. Build number 406, versionCodes 4061/4062/4063. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
F-Droid cannot reproduce 1.13.1. Its
libsqlite3.sowas compiled with NDK r27d, whilelibdartjni.so(and F-Droid's whole build) uses r28c — the twolibsqlite3.sobuilds differ in 1.58 M of 1.75 M bytes.Why: the SQLite build hook gets its compiler from Flutter, which reads
ANDROID_NDK_HOMEfirst. GitHub's runners set it to their own default NDK; fdroidserver sets it to the recipe'sndk:. Gradle meanwhile usesflutter.ndkVersionforlibdartjni.so. My earlier "two local builds are byte-identical" check (#99) could not see this, because both builds shared the one thing that differed.Fix:
tool/pin_ndk.shreadsflutter.ndkVersionfrom the Flutter SDK, installs that NDK if missing, and pointsANDROID_NDK_HOME/ANDROID_NDK_ROOT/ANDROID_NDKat it (via$GITHUB_ENVin CI,eval "$(tool/pin_ndk.sh)"locally). Run before the APK build inrelease.ymlandci.yml.tool/check_apk_ndk.pyreads.note.android.identfromlibsqlite3.soandlibdartjni.soin the built APKs and fails unless both name the pinned NDK. Prebuilt libraries (libflutter.so, AndroidX'slibdatastore_shared_counter.so) are deliberately not checked.Tested locally: the checker fails on the 1.13.1 release APKs (naming both NDKs), passes on a local r28c build, and fails on a wrong
--expector a missing library.Release: the second commit prepares 1.13.2+406 (versionCodes 4061/4062/4063), with a CHANGELOG and fastlane entry saying nothing in the app changed. After merging, tag
v1.13.2as usual; I'll then verify the release APKs and update the F-Droid recipe.🤖 Generated with Claude Code