mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-12 17:07:31 +00:00
Merge pull request #6083 from keymanapp/cherrypick/android/lint-debug
chore(android/samples): Add -no-daemon flag to KMSample2 build script 🍒
This commit is contained in:
commit
f798bb2da2
1 changed files with 54 additions and 3 deletions
|
|
@ -1,10 +1,61 @@
|
|||
#!/bin/sh
|
||||
#!/usr/bin/env bash
|
||||
# Build KMSample2
|
||||
|
||||
set -e
|
||||
set -u
|
||||
|
||||
display_usage ( ) {
|
||||
echo "build.sh [-no-daemon] [-debug]"
|
||||
echo
|
||||
echo "Build KM Sample 2"
|
||||
echo " -no-daemon Don't start the Gradle daemon. Use for CI"
|
||||
echo " -debug Compile only Debug variant"
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo Build KMSample2
|
||||
|
||||
#
|
||||
# Prevents 'clear' on exit of mingw64 bash shell
|
||||
#
|
||||
SHLVL=0
|
||||
|
||||
echo Build KMSample2
|
||||
./gradlew clean build
|
||||
NO_DAEMON=false
|
||||
ONLY_DEBUG=false
|
||||
|
||||
# Parse args
|
||||
while [[ $# -gt 0 ]] ; do
|
||||
key="$1"
|
||||
case $key in
|
||||
-no-daemon)
|
||||
NO_DAEMON=true
|
||||
;;
|
||||
-debug)
|
||||
ONLY_DEBUG=true
|
||||
;;
|
||||
-h|-\?)
|
||||
display_usage
|
||||
;;
|
||||
esac
|
||||
shift # past argument
|
||||
done
|
||||
|
||||
echo
|
||||
echo "NO_DAEMON: $NO_DAEMON"
|
||||
echo "ONLY_DEBUG: $ONLY_DEBUG"
|
||||
echo
|
||||
|
||||
if [ "$NO_DAEMON" = true ]; then
|
||||
DAEMON_FLAG=--no-daemon
|
||||
else
|
||||
DAEMON_FLAG=
|
||||
fi
|
||||
|
||||
if [ "$ONLY_DEBUG" = true ]; then
|
||||
BUILD_FLAG=assembleDebug
|
||||
else
|
||||
BUILD_FLAG=build
|
||||
fi
|
||||
|
||||
./gradlew $DAEMON_FLAG clean $BUILD_FLAG
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue