App technicien : appairage 1x (QR), géorepérage natif en arrière-plan (app fermée) -> checkpoints au hub /field/ts, scan série/MAC on-device MLKit. UI réutilisée depuis le hub (/field). APK Android buildé (debug, 19 Mo, arm64-v8a + armeabi-v7a). - apps/field-tech : Capacitor 6 + Vite ; src/main.js (appairage @capacitor/preferences + BackgroundGeolocation.addGeofences + redirection /field) ; projet android/ avec les 4 correctifs Gradle commités (force work-runtime 2.9.1, minSdk 24, repos maven xms.g + Huawei, googlePlayServicesLocationVersion 21.0.1) ; abiFilters arm (APK 32->19 Mo). - README : recette de build complète (toolchain M4, les 4 fixes, install/appairage) ; BUILD-ANDROID.md (Docker + Android Studio + release signée) ; CI-SETUP.md (runner Gitea). - CI Gitea Actions (.gitea/workflows) : android (runner Linux HORS prod, cache Gradle/npm -> artefact APK) + ios (runner macOS, workflow_dispatch, en attente compte Apple). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
50 lines
2.0 KiB
YAML
50 lines
2.0 KiB
YAML
name: field-tech-android
|
|
# Usine de build Android (APK) — runner Linux auto-hébergé (act_runner). Zéro impact prod.
|
|
# Artefact téléchargeable depuis l'exécution Gitea Actions. Voir apps/field-tech/CI-SETUP.md.
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'apps/field-tech/**'
|
|
- '.gitea/workflows/field-tech-android.yml'
|
|
workflow_dispatch: {}
|
|
|
|
jobs:
|
|
build-apk:
|
|
runs-on: ubuntu-latest # un act_runner Linux étiqueté ubuntu-latest (image catthehacker/ubuntu)
|
|
defaults:
|
|
run:
|
|
working-directory: apps/field-tech
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-java@v4
|
|
with: { distribution: temurin, java-version: '17' }
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
cache: npm
|
|
cache-dependency-path: apps/field-tech/package-lock.json
|
|
- uses: android-actions/setup-android@v3 # installe le SDK Android (platform-tools, platforms;android-34, build-tools)
|
|
- name: Cache Gradle
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.gradle/caches
|
|
~/.gradle/wrapper
|
|
key: gradle-${{ runner.os }}-${{ hashFiles('apps/field-tech/android/**/*.gradle', 'apps/field-tech/android/gradle/wrapper/gradle-wrapper.properties') }}
|
|
restore-keys: gradle-${{ runner.os }}-
|
|
- name: Build web (Vite) + Capacitor sync
|
|
run: |
|
|
npm install --no-audit --no-fund
|
|
npm run build
|
|
[ -d android ] || npx cap add android
|
|
npx cap sync android
|
|
- name: Gradle assembleDebug
|
|
working-directory: apps/field-tech/android
|
|
run: ./gradlew assembleDebug --no-daemon --stacktrace
|
|
# RELEASE (plus tard) : secrets TRANSISTORSOFT_LICENSE + keystore → assembleRelease + signature.
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: targo-tech-android-debug
|
|
path: apps/field-tech/android/app/build/outputs/apk/debug/*.apk
|
|
if-no-files-found: error
|