diff options
author | 2015-07-24 13:15:58 -0700 | |
---|---|---|
committer | 2015-07-24 13:15:59 -0700 | |
commit | d18b861061253c8691949379546a7f96c9e251c9 (patch) | |
tree | 205731c911992c2bb60acce4871213f488c6b8f0 /platform_tools/android/bin | |
parent | 1818acb6a4b11cd9a1d44ce5dde77452502a9796 (diff) |
Update Android Apps to use gradle
This CL replaces ant with gradle for the task of building APKs.
The primary driver of this change is that it now allow us to
develop and test our apps using Android Studio.
DOCS_PREVIEW= https://skia.org/?cl=1215023017
Committed: https://skia.googlesource.com/skia/+/425535f1626932e4e22f61a2571f9c3c2b1c5977
Review URL: https://codereview.chromium.org/1215023017
Diffstat (limited to 'platform_tools/android/bin')
-rwxr-xr-x | platform_tools/android/bin/android_install_app | 14 | ||||
-rwxr-xr-x | platform_tools/android/bin/android_setup.sh | 5 |
2 files changed, 12 insertions, 7 deletions
diff --git a/platform_tools/android/bin/android_install_app b/platform_tools/android/bin/android_install_app index a8c1a12b2b..ed5ed61318 100755 --- a/platform_tools/android/bin/android_install_app +++ b/platform_tools/android/bin/android_install_app @@ -9,7 +9,7 @@ function print_usage { echo " -h Prints this help message" echo " --release Install the release build of Skia" echo " -s [device_s/n] Serial number of the device to be used" - echo " AppName Can be either SampleApp or VisualBench" + echo " AppName Can be either sample_app or VisualBench" } SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" @@ -18,8 +18,6 @@ source $SCRIPT_DIR/android_setup.sh source $SCRIPT_DIR/utils/setup_adb.sh forceRemoval="false" -installLauncher="false" -installOptions="-r" app="" for arg in ${APP_ARGS[@]}; do @@ -45,8 +43,8 @@ for arg in ${APP_ARGS[@]}; do done if [[ ${app} == "" ]]; then - echo "defaulting to installing SampleApp." - app="SampleApp" + echo "defaulting to installing sample_app." + app="sample_app" fi @@ -56,6 +54,8 @@ then $ADB ${DEVICE_SERIAL} uninstall com.skia > /dev/null fi -echo "Installing ${app} from ${SKIA_OUT}/${BUILDTYPE}" -$ADB ${DEVICE_SERIAL} install ${installOptions} ${SKIA_OUT}/${BUILDTYPE}/android/${app}/bin/${app}.apk +BUILD_TYPE_LC=$(echo $BUILDTYPE | tr "[:upper:]" "[:lower:]") + +echo "Installing ${app} from ${app}/build/outputs/apk/${app}-${ANDROID_ARCH}-${BUILD_TYPE_LC}.apk" +$ADB ${DEVICE_SERIAL} install -r ${SCRIPT_DIR}/../apps/${app}/build/outputs/apk/${app}-${ANDROID_ARCH}-${BUILD_TYPE_LC}.apk diff --git a/platform_tools/android/bin/android_setup.sh b/platform_tools/android/bin/android_setup.sh index 94ae87f9a1..5396294c7f 100755 --- a/platform_tools/android/bin/android_setup.sh +++ b/platform_tools/android/bin/android_setup.sh @@ -70,6 +70,11 @@ if [ -z "$ANDROID_SDK_ROOT" ]; then fi fi +if [ -z "$ANDROID_HOME" ]; then + echo "ANDROID_HOME not set so we are setting it to a default value of ANDROID_SDK_ROOT" + exportVar ANDROID_HOME $ANDROID_SDK_ROOT +fi + # check to see that gclient sync ran successfully THIRD_PARTY_EXTERNAL_DIR=${SCRIPT_DIR}/../third_party/externals if [ ! -d "$THIRD_PARTY_EXTERNAL_DIR" ]; then |