mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2025-06-29 04:39:53 +00:00
build-android: add bundle script (#931)
This commit is contained in:
parent
cc498572cd
commit
db367b376b
2 changed files with 29 additions and 0 deletions
27
scripts/android/build-android-bundle.sh
Executable file
27
scripts/android/build-android-bundle.sh
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env sh
|
||||
# Safety measures
|
||||
[ -n "$1" ] || exit 1
|
||||
set -eu
|
||||
|
||||
tmp=$(mktemp -d -t)
|
||||
libsim=$(cat "$1" | grep libsimplex)
|
||||
libsup=$(cat "$1" | grep libsupport)
|
||||
commit="${2:-nix-android}"
|
||||
|
||||
# Clone simplex
|
||||
git clone https://github.com/simplex-chat/simplex-chat "$tmp/simplex-chat"
|
||||
|
||||
# Switch to nix-android branch
|
||||
git -C "$tmp/simplex-chat" checkout "$commit"
|
||||
|
||||
# Create missing folders
|
||||
mkdir -p "$tmp/simplex-chat/apps/android/app/src/main/cpp/libs/arm64-v8a"
|
||||
|
||||
curl -sSf "$libsim" -o "$tmp/libsimplex.zip"
|
||||
unzip -o "$tmp/libsimplex.zip" -d "$tmp/simplex-chat/apps/android/app/src/main/cpp/libs/arm64-v8a"
|
||||
|
||||
curl -sSf "$libsup" -o "$tmp/libsupport.zip"
|
||||
unzip -o "$tmp/libsupport.zip" -d "$tmp/simplex-chat/apps/android/app/src/main/cpp/libs/arm64-v8a"
|
||||
|
||||
gradle -p "$tmp/simplex-chat/apps/android/" clean build
|
||||
cp "$tmp/simplex-chat/apps/android/app/build/outputs/apk/release/app-release-unsigned.apk" "$PWD/simplex-chat.apk"
|
2
scripts/android/lib.txt
Normal file
2
scripts/android/lib.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
https://ci.zw3rk.com/build/494539/download/1/pkg-aarch64-android-libsimplex.zip
|
||||
https://ci.zw3rk.com/build/482524/download/1/pkg-aarch64-android-libsupport.zip
|
Loading…
Add table
Add a link
Reference in a new issue