chore(build): update Taskfile for Android builds with improved flavor and ABI packaging options, update localization test command, and refine cleanup process

This commit is contained in:
Ivan
2026-04-23 02:31:51 -05:00
parent 428dd6f585
commit 06752bee37
+15 -8
View File
@@ -220,7 +220,7 @@ tasks:
test:lang:
desc: Run localization tests
cmds:
- "{{.NPM}} run test tests/frontend/i18n.test.js"
- "{{.NPM}} exec vitest run tests/frontend/i18n.test.js"
- "poetry run pytest tests/backend/test_translator_handler.py"
test:integrity:
@@ -474,8 +474,7 @@ tasks:
echo "Preparing Android assets..."
mkdir -p "{{.PYTHON_SRC_DIR}}"
rm -rf "{{.PYTHON_SRC_DIR}}/meshchatx"
cp -r meshchatx "{{.PYTHON_SRC_DIR}}/"
echo "MeshChatX Python sources staged. Dependency installation is handled by Chaquopy in android/app/build.gradle."
echo "MeshChatX Python tree is synced by Gradle into app/src/slim|full/python/meshchatx (see android/app/build.gradle)."
android:wheels:
desc: Build the Android (Chaquopy) wheels into android/vendor/. Mirrors CI.
@@ -491,22 +490,30 @@ tasks:
--abis "{{.ANDROID_WHEEL_ABIS}}"
android:build:
desc: Build Debug APK
desc: Build Debug APK (slim flavor, universal ABI packaging, arm64-v8a only unless overridden)
deps: [android:prepare]
vars:
MESHCHATX_ANDROID_FLAVOR: '{{.MESHCHATX_ANDROID_FLAVOR | default "slim"}}'
MESHCHATX_ABIS: '{{.MESHCHATX_ABIS | default "arm64-v8a"}}'
MESHCHATX_ABI_PACKAGING: '{{.MESHCHATX_ABI_PACKAGING | default "universal"}}'
cmds:
- cd "{{.ANDROID_DIR}}" && ./gradlew assembleDebug
- cd "{{.ANDROID_DIR}}" && ./gradlew :app:assemble{{title (.MESHCHATX_ANDROID_FLAVOR | default "slim")}}Debug -PmeshchatxAbis={{.MESHCHATX_ABIS}} -PmeshchatxAbiPackaging={{.MESHCHATX_ABI_PACKAGING}}
android:build:release:
desc: Build Release APK
desc: Build Release APK (same flavor / ABI defaults as android:build unless overridden)
deps: [android:prepare]
vars:
MESHCHATX_ANDROID_FLAVOR: '{{.MESHCHATX_ANDROID_FLAVOR | default "slim"}}'
MESHCHATX_ABIS: '{{.MESHCHATX_ABIS | default "arm64-v8a"}}'
MESHCHATX_ABI_PACKAGING: '{{.MESHCHATX_ABI_PACKAGING | default "universal"}}'
cmds:
- cd "{{.ANDROID_DIR}}" && ./gradlew assembleRelease
- cd "{{.ANDROID_DIR}}" && ./gradlew :app:assemble{{title (.MESHCHATX_ANDROID_FLAVOR | default "slim")}}Release -PmeshchatxAbis={{.MESHCHATX_ABIS}} -PmeshchatxAbiPackaging={{.MESHCHATX_ABI_PACKAGING}}
android:clean:
desc: Clean Android artifacts
cmds:
- cd "{{.ANDROID_DIR}}" && ./gradlew clean
- rm -rf "{{.PYTHON_SRC_DIR}}/meshchatx"
- rm -rf "{{.PYTHON_SRC_DIR}}/meshchatx" "{{.ANDROID_DIR}}/app/src/slim/python/meshchatx" "{{.ANDROID_DIR}}/app/src/full/python/meshchatx"
# --- Maintenance ---