1#!/bin/bash
2
3# Fail-fast if anything in the script fails.
4set -e
5
6# Remove any existing .android_config file before running android_setup. If we
7# did not remove this now then we would build for whatever device type was
8# listed in the .android_config instead of the default device type.
9rm -f .android_config
10
11SCRIPT_DIR=$(dirname "${BASH_SOURCE[0]}")
12source $SCRIPT_DIR/android_setup.sh
13
14SKIA_SRC_DIR=$(cd "${SCRIPT_DIR}/../../.."; pwd)
15GYP_GENERATORS=ninja-android "${SKIA_SRC_DIR}/gyp_skia"
16ninja -C $SKIA_OUT/$BUILDTYPE ${APP_ARGS[@]}
17
18# Write the device id into the .android_config file.  This tells
19# android_run_skia the last build we completed.
20echo $DEVICE_ID > .android_config
21
22