Skip to content

Commit aa3d9b9

Browse files
committed
build: add android build script
1 parent bb75f88 commit aa3d9b9

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

scripts/build-android.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
set -e
3+
4+
CD=$(dirname $0)
5+
cd $CD/../android
6+
7+
RELEASE_DIR="app/build/outputs/apk/release"
8+
BUILD_TOOLS="$HOME/app/android-sdk/build-tools/30.0.3"
9+
10+
./gradlew build
11+
12+
$BUILD_TOOLS/zipalign -f -v -p 4 \
13+
$RELEASE_DIR/app-release-unsigned.apk \
14+
$RELEASE_DIR/app-release-unsigned-aligned.apk
15+
16+
$BUILD_TOOLS/apksigner sign --ks $HOME/.android/release-key.jks \
17+
--out $RELEASE_DIR/app-release.apk \
18+
$RELEASE_DIR/app-release-unsigned-aligned.apk
19+
20+

0 commit comments

Comments
 (0)