mirror of
https://github.com/tiennm99/loto-android.git
synced 2026-06-09 14:12:03 +00:00
feat: migrate to Capacitor wrapper for fully-offline Android
Replace the native Kotlin/Compose port with a Capacitor 8 wrapper around the upstream loto SvelteKit PWA. Loto is consumed as a git submodule and its static build is bundled into the APK at sync time. The wrapper has no INTERNET permission, so fully offline is enforced rather than conventional. - loto/ submodule pinned to dfb1c1e - android/ scaffolded by cap add android; signing wired via env vars - All 184 voice MP3s + service worker bundled in assets/public/ - CI checkouts submodule, runs npm build, then Gradle inside android/ - Native port preserved in git history atfe52232and9a35686
This commit is contained in:
@@ -11,6 +11,13 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Set up Node 20
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
@@ -21,12 +28,19 @@ jobs:
|
||||
- name: Set up Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
|
||||
- name: Lint + unit tests + assemble debug
|
||||
run: ./gradlew lint test :app:assembleDebug
|
||||
- name: Install wrapper deps
|
||||
run: npm ci
|
||||
|
||||
- name: Build loto + sync into Android
|
||||
run: npm run build
|
||||
|
||||
- name: Assemble debug APK
|
||||
working-directory: android
|
||||
run: ./gradlew :app:assembleDebug
|
||||
|
||||
- name: Upload debug APK
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: debug-apk
|
||||
path: app/build/outputs/apk/debug/*.apk
|
||||
path: android/app/build/outputs/apk/debug/*.apk
|
||||
retention-days: 7
|
||||
|
||||
@@ -10,6 +10,13 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Set up Node 20
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
@@ -20,20 +27,27 @@ jobs:
|
||||
- name: Set up Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
|
||||
- name: Install wrapper deps
|
||||
run: npm ci
|
||||
|
||||
- name: Build loto + sync into Android
|
||||
run: npm run build
|
||||
|
||||
- name: Decode keystore
|
||||
run: echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > keystore.jks
|
||||
|
||||
- name: Build release bundle and APK
|
||||
run: ./gradlew :app:bundleRelease :app:assembleRelease
|
||||
- name: Build signed AAB + APK
|
||||
working-directory: android
|
||||
env:
|
||||
LOTO_KEYSTORE_PATH: ${{ github.workspace }}/keystore.jks
|
||||
LOTO_KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
|
||||
LOTO_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
|
||||
LOTO_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
|
||||
run: ./gradlew :app:bundleRelease :app:assembleRelease
|
||||
|
||||
- name: Upload to GitHub Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
app/build/outputs/apk/release/*.apk
|
||||
app/build/outputs/bundle/release/*.aab
|
||||
android/app/build/outputs/apk/release/*.apk
|
||||
android/app/build/outputs/bundle/release/*.aab
|
||||
|
||||
Reference in New Issue
Block a user