Keep Firebase's Gradle plugin in the Google Play edition

Only the -gplay edition may read a Google library. The google-services
plugin's classpath moves from the root plugins block into
droid/app/gplay-classpath.gradle and its application into
droid/app/gplay.gradle, both applied only in a Gradle run whose tasks name
gplay. Such a run refuses release or debug tasks beside it, so the Makefile
and the release workflow build the normal and gplay APKs in separate runs,
and the normal and F-Droid builds never resolve the plugin. The Moto check
builds only the normal APK and no longer writes the Firebase config.

CI checks the Gradle files with Kryon's google-free action, the release
workflow checks the normal, per-ABI and -fdroid APKs and finds Play
Billing in the -gplay APK, and the F-Droid workflow checks F-Droid's own APK.
This commit is contained in:
waozi committed 2026-10-29 16:22:59 -03:00
1 parent e2303c3ab4
commit cf1323ac8f
9 files changed
+81 -16

No files matched your search

-5
View File
@@ -106,11 +106,6 @@ jobs:
mkdir -p ~/.android
printf '%s' "$KEYSTORE_BASE64" | base64 -d > ~/.android/inbe-release.keystore
- name: Prepare Firebase config
env:
GOOGLE_SERVICES_JSON_BASE64: ${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}
run: ./scripts/write-google-services-json.sh
- name: Copy Android assets
run: ./scripts/copy-android-assets.sh
+12
View File
@@ -58,6 +58,18 @@ jobs:
fi
python3 scripts/check-file-size.py --since "$base"
google-free:
name: Google libraries only in the gplay edition
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
# The normal and F-Droid builds read no Google library or plugin; only
# gplay-scoped configurations and gplay files may name one.
- name: Keep Google libraries out of the normal and F-Droid build files
uses: kryonlabs/kryon/.github/actions/google-free@7217475dfa7f462939e47e3f0bc918aef248b179
guard-package-urls:
name: Package URLs are public HTTPS
runs-on: ubuntu-latest
+8
View File
@@ -65,6 +65,14 @@ jobs:
- name: Build and scan with F-Droid without cached package sources
run: python3 build/xyz.waozi.inbe/scripts/check-fdroid.py
# F-Droid's scanner checked the source; its APK must hold no Google
# library either.
- name: Keep Google libraries out of F-Droid's APK
uses: kryonlabs/kryon/.github/actions/google-free@7217475dfa7f462939e47e3f0bc918aef248b179
with:
packages: tmp/*.apk
source: ''
- name: Preserve APK, exact metadata and scanner evidence
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
+25 -1
View File
@@ -981,7 +981,13 @@ jobs:
run: |
set -euo pipefail
chmod +x droid/gradlew
./droid/gradlew -p droid assembleRelease assembleGplay \
./droid/gradlew -p droid assembleRelease \
-Pkeystore.path="$HOME/.android/inbe-release.keystore" \
-Pkeystore.alias="$KEY_ALIAS" \
-Pkeystore.password="$KEYSTORE_PASSWORD" \
--stacktrace
# Only the Google Play edition's own Gradle run reads its Google plugin.
./droid/gradlew -p droid assembleGplay \
-Pkeystore.path="$HOME/.android/inbe-release.keystore" \
-Pkeystore.alias="$KEY_ALIAS" \
-Pkeystore.password="$KEYSTORE_PASSWORD" \
@@ -1034,6 +1040,24 @@ jobs:
done
cp "build/android/inbe-$VERSION-gplay.aab" build/release/android/
# Only the Google Play edition may hold a Google library, in its build
# files as in its APK. The universal and both x86 APK names end in a digit.
- name: Keep Google libraries out of the normal and F-Droid APKs
uses: kryonlabs/kryon/.github/actions/google-free@7217475dfa7f462939e47e3f0bc918aef248b179
with:
packages: >-
build/release/android/inbe-*[0-9].apk
build/release/android/inbe-*-arm*.apk
build/release/android/inbe-*-fdroid.apk
# The Google check must still recognise Play Billing, or its passes on
# the other editions prove nothing.
- name: Find Play Billing in the Google Play APK
uses: kryonlabs/kryon/.github/actions/google-free@7217475dfa7f462939e47e3f0bc918aef248b179
with:
packages: build/release/android/inbe-*-gplay.apk
source: ''
expect-google: 'true'
- name: Upload Android Artifacts
uses: actions/upload-artifact@v4
with: