mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-15 20:17:43 +00:00
While legacy stable kmapro releases have analytics on the Google Play Console, Google recommends [Firebase Crashlytics](https://firebase.google.com/docs/crash/) for crash reporting. This requires a `google-services.json` file for gradle builds. A sanitized version intended for developers/Debug variant is checked into the repo, and is associated with an appliction ID `com.tavultesoft.kmapro.debug`. The one for `com.tavultesoft.kmapro` releaeses will go on the CI servers. Breaking change: Consuming apps of KMEA will be responsible for including the Firebase dependencies. At the moment, only kmapro has been updated. TBD: Registering KMSamples and the Test Harness with Firebase for their own `google.services.json` file. - Log addKeyboard as an analytic event - Update kmapro build.sh script to allow debug-only variant - Add info to history.md and README.md - Add Gradle setting so CI server can use production `google-services.json` file - Temporarily add a menu button to force a crash. This is engineering code that will be removed once analytics in a Release build is confirmed.
58 lines
970 B
Bash
Executable file
58 lines
970 B
Bash
Executable file
#!/bin/bash
|
|
# Build KMAPro
|
|
|
|
display_usage ( ) {
|
|
echo "build.sh [-no-daemon]"
|
|
echo
|
|
echo "Build Keyman for Android"
|
|
echo " -no-daemon Don't start the Gradle daemon. Use for CI"
|
|
echo " -debug Compile only Debug variant"
|
|
exit 1
|
|
}
|
|
|
|
echo Build KMAPro
|
|
|
|
#
|
|
# Prevents 'clear' on exit of mingw64 bash shell
|
|
#
|
|
SHLVL=0
|
|
|
|
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
|
|
|