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.
90 lines
3.0 KiB
YAML
90 lines
3.0 KiB
YAML
name: F-Droid
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
schedule:
|
|
- cron: '23 7 * * *'
|
|
workflow_dispatch:
|
|
inputs:
|
|
revision:
|
|
description: Exact committed candidate (defaults to the triggering commit)
|
|
required: false
|
|
type: string
|
|
workflow_call:
|
|
inputs:
|
|
revision:
|
|
required: false
|
|
type: string
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
name: F-Droid security and clean build
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 90
|
|
container:
|
|
# Official F-Droid buildserver, pinned for repeatable verification.
|
|
image: registry.gitlab.com/fdroid/fdroidserver@sha256:1ea8bef1820bff06c2974e31b4fc4c79c364cd24231b86e71fa4b926797e0dac
|
|
steps:
|
|
- name: Require an immutable candidate
|
|
env:
|
|
CANDIDATE: ${{ inputs.revision || github.sha }}
|
|
shell: bash
|
|
run: |
|
|
if ! [[ "$CANDIDATE" =~ ^[0-9a-f]{40}$ ]]; then
|
|
echo "::error::revision must be a full commit ID, never a branch or tag"
|
|
exit 1
|
|
fi
|
|
|
|
# Checkout's LFS support requires git-lfs inside the job container.
|
|
- name: Install recipe dependencies
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y --no-install-recommends build-essential jimsh libssl-dev python3-fonttools openjdk-21-jdk-headless fdroidserver git-lfs
|
|
update-alternatives --set java /usr/lib/jvm/java-21-openjdk-amd64/bin/java
|
|
|
|
- name: Checkout candidate
|
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
|
with:
|
|
ref: ${{ inputs.revision || github.sha }}
|
|
path: build/xyz.waozi.inbe
|
|
lfs: true
|
|
persist-credentials: false
|
|
|
|
- name: Verify and install Android SDK components
|
|
timeout-minutes: 20
|
|
run: |
|
|
python3 build/xyz.waozi.inbe/.github/scripts/install-android-sdk.py \
|
|
--sdk-root /opt/android-sdk --sdkmanager "$(command -v sdkmanager)"
|
|
|
|
- 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
|
|
with:
|
|
name: fdroid-unsigned
|
|
path: |
|
|
tmp/*.apk
|
|
logs/
|
|
metadata/
|
|
build/xyz.waozi.inbe/build/outputs/logs/
|
|
build/xyz.waozi.inbe/droid/app/build/intermediates/native_debug_metadata/
|
|
build/xyz.waozi.inbe/droid/app/build/intermediates/merged_native_libs/
|
|
if-no-files-found: error
|
|
retention-days: 7
|