spiegel-keyman/android/Tests/KeyboardHarness/build.sh
darcywong00 32853aa162 Add Crashlytics dependencies to Samples and Test projects
Consumers of KMEA need to include Firebase and Crashlytics dependencies, but don't need to run the Google services. This simplifies these projects of not neeeding google-services.json.

Also added `-no-daemon` and `-debug` options to Samples and Test `build.sh` scripts so they can be run on CI servers.
2018-02-15 14:02:59 +07:00

67 lines
1.1 KiB
Bash

#!/bin/bash
# Build KeyboardHarness test app
display_usage ( ) {
echo "build.sh [-no-daemon] [-debug]"
echo
echo "Build KeyboardHarness test app"
echo " -no-daemon Don't start the Gradle daemon. Use for CI"
echo " -debug Compile only Debug variant"
exit 1
}
echo Build KeyboardHarness test app
#
# Prevents 'clear' on exit of mingw64 bash shell
#
SHLVL=0
echo Build KMEA first
cd ../../KMEA
./build.sh
cd ../Tests/KeyboardHarness
cp ../keyman-engine.aar app/libs/
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
echo Build KeyboardHarness
./gradlew $DAEMON_FLAG clean $BUILD_FLAG