release(fdroid): v0.4.3 — fix self-hosted F-Droid publish (v2-only signing)

The self-hosted F-Droid repo (https://dzianisv.github.io/opencode-mobile/fdroid/repo)
has been stuck at v0.4.1 because publish-fdroid crashed in androguard parsing the
CI APK's v2+v3 signature block pair ('NoOverwriteDict' object has no attribute
'append'). Force v1+v2-only signing: gradle flags for local builds, plus a
deterministic apksigner re-sign step in the workflow (expo prebuild regenerates
build.gradle, so the workflow step is the real guarantee). Bump to v0.4.3 /
versionCode 5 so a fresh tag re-runs the publish with the verified bug fixes
(#10 scope fixes, send-error fix) included.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
engineer
2026-06-02 00:58:41 -07:00
parent af351d1df0
commit c66f4fb858
4 changed files with 38 additions and 5 deletions

View File

@@ -68,6 +68,29 @@ jobs:
working-directory: android working-directory: android
run: ./gradlew assembleRelease run: ./gradlew assembleRelease
- name: Re-sign APK v1+v2 only (drop v3/v4 for fdroidserver compatibility)
if: ${{ env.RELEASE_STORE_FILE != '' }}
run: |
# androguard (used by fdroidserver) crashes parsing a v2+v3 signature
# block pair: "'NoOverwriteDict' object has no attribute 'append'".
# expo prebuild regenerates build.gradle, so we can't rely on the
# gradle signing flags surviving — force v1+v2-only here deterministically.
APK=android/app/build/outputs/apk/release/app-release.apk
APKSIGNER=$(ls "$ANDROID_HOME"/build-tools/*/apksigner | sort -V | tail -1)
echo "Using $APKSIGNER"
"$APKSIGNER" sign \
--ks android/app/release.keystore \
--ks-pass "pass:${RELEASE_STORE_PASSWORD}" \
--ks-key-alias "${RELEASE_KEY_ALIAS}" \
--key-pass "pass:${RELEASE_KEY_PASSWORD}" \
--v1-signing-enabled true \
--v2-signing-enabled true \
--v3-signing-enabled false \
--v4-signing-enabled false \
"$APK"
echo "=== signature schemes after re-sign ==="
"$APKSIGNER" verify -v "$APK" | grep -i "Verified using" || true
- name: Install fdroidserver - name: Install fdroidserver
# androguard version matters: 4.0.x crashes parsing our APK resources # androguard version matters: 4.0.x crashes parsing our APK resources
# ("res1 must be zero!"); 4.1.0/4.1.1 crash on the signature block # ("res1 must be zero!"); 4.1.0/4.1.1 crash on the signature block

View File

@@ -94,8 +94,8 @@ android {
applicationId 'cc.agentlabs.opencode' applicationId 'cc.agentlabs.opencode'
minSdkVersion rootProject.ext.minSdkVersion minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 4 versionCode 5
versionName "0.4.2" versionName "0.4.3"
buildConfigField "String", "REACT_NATIVE_RELEASE_LEVEL", "\"${findProperty('reactNativeReleaseLevel') ?: 'stable'}\"" buildConfigField "String", "REACT_NATIVE_RELEASE_LEVEL", "\"${findProperty('reactNativeReleaseLevel') ?: 'stable'}\""
} }
@@ -112,6 +112,16 @@ android {
storePassword System.getenv("RELEASE_STORE_PASSWORD") storePassword System.getenv("RELEASE_STORE_PASSWORD")
keyAlias System.getenv("RELEASE_KEY_ALIAS") keyAlias System.getenv("RELEASE_KEY_ALIAS")
keyPassword System.getenv("RELEASE_KEY_PASSWORD") keyPassword System.getenv("RELEASE_KEY_PASSWORD")
// Sign with v1+v2 only. A v2+v3 block pair crashes the androguard
// version fdroidserver uses ("'NoOverwriteDict' object has no
// attribute 'append'"), which broke the self-hosted F-Droid repo
// publish from v0.4.2 on. v1+v2 installs on all supported API levels
// and matches the known-good published APK. Re-enable v3 only once
// fdroidserver/androguard ships the fix.
enableV1Signing true
enableV2Signing true
enableV3Signing false
enableV4Signing false
} }
} }
} }

View File

@@ -2,7 +2,7 @@
"expo": { "expo": {
"name": "OpenCode", "name": "OpenCode",
"slug": "opencode-mobile", "slug": "opencode-mobile",
"version": "0.4.2", "version": "0.4.3",
"orientation": "portrait", "orientation": "portrait",
"scheme": "opencode", "scheme": "opencode",
"userInterfaceStyle": "automatic", "userInterfaceStyle": "automatic",
@@ -34,7 +34,7 @@
}, },
"android": { "android": {
"package": "cc.agentlabs.opencode", "package": "cc.agentlabs.opencode",
"versionCode": 4, "versionCode": 5,
"usesCleartextTraffic": true, "usesCleartextTraffic": true,
"adaptiveIcon": { "adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png", "foregroundImage": "./assets/adaptive-icon.png",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@opencode-ai/mobile", "name": "@opencode-ai/mobile",
"version": "0.4.2", "version": "0.4.3",
"private": true, "private": true,
"main": "expo-router/entry", "main": "expo-router/entry",
"scripts": { "scripts": {