Spaces:
Running
Running
| set -euo pipefail | |
| MANIFEST_URL=$1 | |
| OUTPUT_APK=$2 | |
| TMP_DIR=$(mktemp -d) | |
| cd "$TMP_DIR" | |
| echo "Initializing Bubblewrap..." | |
| npx bubblewrap init --manifest "$MANIFEST_URL" --directory twa | |
| cd twa | |
| echo "Building APK..." | |
| npx bubblewrap build | |
| # Copy resulting APK to output path | |
| cp ./build/app/outputs/apk/release/app-release-unsigned.apk "$OUTPUT_APK" | |
| echo "Build complete. APK at $OUTPUT_APK" | |