sudo-soldier commited on
Commit
4fd4428
·
verified ·
1 Parent(s): 2cfaeb7

Create build_apk.sh

Browse files
Files changed (1) hide show
  1. build_apk.sh +20 -0
build_apk.sh ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ MANIFEST_URL=$1
5
+ OUTPUT_APK=$2
6
+ TMP_DIR=$(mktemp -d)
7
+
8
+ cd "$TMP_DIR"
9
+
10
+ echo "Initializing Bubblewrap..."
11
+ npx bubblewrap init --manifest "$MANIFEST_URL" --directory twa
12
+
13
+ cd twa
14
+ echo "Building APK..."
15
+ npx bubblewrap build
16
+
17
+ # Copy resulting APK to output path
18
+ cp ./build/app/outputs/apk/release/app-release-unsigned.apk "$OUTPUT_APK"
19
+
20
+ echo "Build complete. APK at $OUTPUT_APK"