diff --git a/.forgejo/workflows/android.yml b/.forgejo/workflows/android.yml index f748b72..4a063e6 100644 --- a/.forgejo/workflows/android.yml +++ b/.forgejo/workflows/android.yml @@ -91,7 +91,12 @@ jobs: if [ -n "${ANDROID_KEYSTORE_BASE64:-}" ]; then printf '%s' "$ANDROID_KEYSTORE_BASE64" | base64 -d > /tmp/thoughtsync-release.jks echo "variant=Release" >> $GITHUB_OUTPUT - echo "profile=release" >> $GITHUB_OUTPUT + # DEBUG profile, in a release APK, deliberately — see the note above + # the cargoNdk task. The release profile strips the symbols uniffi + # reads its metadata out of, so `generateUniffiBindings` fails + # outright (run 4077). Unpicking that is worth doing and is not worth + # blocking signed builds on. + echo "profile=debug" >> $GITHUB_OUTPUT echo "keystore=/tmp/thoughtsync-release.jks" >> $GITHUB_OUTPUT echo "apk=android/app/build/outputs/apk/release/app-release.apk" >> $GITHUB_OUTPUT echo "Signed release build — $version (versionCode $GITHUB_RUN_NUMBER)" diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 61f3a38..4d86859 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -131,9 +131,14 @@ val rustInputs = * profiles. `android.yml` picks one profile and uses it for every Gradle call in * the run. * - * Defaults to debug so a local build stays fast; CI passes release, because an - * unoptimised store and sync engine is a real difference on a phone, not a - * theoretical one. + * CI currently passes `debug` even for a release APK, which is not where this + * should end up: an unoptimised store and sync engine is a real difference on a + * phone, not a theoretical one. The blocker is that the workspace's release + * profile sets `strip = true`, which removes the symbols uniffi reads its + * interface metadata from — `generateUniffiBindings` then fails with "No UniFFI + * metadata found" (run 4077). Fixing it means either an Android-specific profile + * that keeps symbols or generating the bindings from a separate unstripped + * build, and neither is worth holding signed APKs up for. Scribe #2810. */ val rustProfile = (project.findProperty("THOUGHTSYNC_CARGO_PROFILE") as String?)?.takeIf { it.isNotBlank() }