forked from status-im/status-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-android.sh
More file actions
executable file
·36 lines (29 loc) · 1.02 KB
/
build-android.sh
File metadata and controls
executable file
·36 lines (29 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
set -euf
TARGET=${1:-debug}
CURRENT_DIR="$( cd "$( dirname "$0" )" && pwd )"
. "$CURRENT_DIR/lib/setup/path-support.sh"
source_lib "output.sh"
source_lib "properties.sh"
cecho "Building @b@green[[${TARGET}]] environment"
echo
GRADLE_PROPERTIES="--daemon --parallel -q -b android/build.gradle"
npm install
case $TARGET in
debug)
lein do clean, cljsbuild once android && ./android/gradlew ${GRADLE_PROPERTIES} assembleDebug
echo "Generated android/app/build/outputs/apk/debug/app-debug.apk"
exit 1
;;
release)
STORE_FILE=$(property_gradle 'STATUS_RELEASE_STORE_FILE')
[[ ! -e "${STORE_FILE/#\~/$HOME}" ]] && echo "Please generate keystore first using ./generate-keystore.sh" && exit 0
lein do clean, with-profile prod cljsbuild once android && ./android/gradlew ${GRADLE_PROPERTIES} assembleRelease
cecho "Generated @b@blueandroid/app/build/outputs/apk/release/app-release.apk"
echo
exit
;;
*)
echo "Only debug and release targets are supported"
exit 1
esac