aboutsummaryrefslogtreecommitdiffhomepage
path: root/platform_tools/android
diff options
context:
space:
mode:
Diffstat (limited to 'platform_tools/android')
-rwxr-xr-xplatform_tools/android/bin/android_install_app13
-rwxr-xr-xplatform_tools/android/bin/android_setup.sh1
-rw-r--r--platform_tools/android/gyp/skia_android.gypi13
3 files changed, 20 insertions, 7 deletions
diff --git a/platform_tools/android/bin/android_install_app b/platform_tools/android/bin/android_install_app
index f61987d4ab..83b879f444 100755
--- a/platform_tools/android/bin/android_install_app
+++ b/platform_tools/android/bin/android_install_app
@@ -54,9 +54,16 @@ then
$ADB ${DEVICE_SERIAL} uninstall com.skia > /dev/null
fi
-BUILD_TYPE_LC=$(echo $BUILDTYPE | tr "[:upper:]" "[:lower:]")
+if [[ "$BUILDTYPE" == "Release" ]];
+then
+ apk_suffix="release-unsigned.apk"
+else
+ apk_suffix="debug.apk"
+fi
+
+
APP_LC=$(echo $app | tr "[:upper:]" "[:lower:]")
-echo "Installing ${APP_LC} from ${APP_LC}/build/outputs/apk/${APP_LC}-${ANDROID_ARCH}-${BUILD_TYPE_LC}.apk"
-$ADB ${DEVICE_SERIAL} install -r ${SCRIPT_DIR}/../apps/${APP_LC}/build/outputs/apk/${APP_LC}-${ANDROID_ARCH}-${BUILD_TYPE_LC}.apk
+echo "Installing ${APP_LC} from ${APP_LC}/build/outputs/apk/${APP_LC}-${ANDROID_ARCH}-${apk_suffix}"
+$ADB ${DEVICE_SERIAL} install -r ${SCRIPT_DIR}/../apps/${APP_LC}/build/outputs/apk/${APP_LC}-${ANDROID_ARCH}-${apk_suffix}
diff --git a/platform_tools/android/bin/android_setup.sh b/platform_tools/android/bin/android_setup.sh
index af2356945c..d42a3ac21b 100755
--- a/platform_tools/android/bin/android_setup.sh
+++ b/platform_tools/android/bin/android_setup.sh
@@ -171,6 +171,7 @@ setup_device() {
source $SCRIPT_DIR/utils/setup_toolchain.sh
DEFINES="${DEFINES} android_toolchain=${TOOLCHAIN_TYPE}"
+ DEFINES="${DEFINES} android_buildtype=${BUILDTYPE}"
exportVar GYP_DEFINES "$DEFINES $GYP_DEFINES"
SKIA_SRC_DIR=$(cd "${SCRIPT_DIR}/../../.."; pwd)
diff --git a/platform_tools/android/gyp/skia_android.gypi b/platform_tools/android/gyp/skia_android.gypi
index 48908cb93b..4e32fcbf7d 100644
--- a/platform_tools/android/gyp/skia_android.gypi
+++ b/platform_tools/android/gyp/skia_android.gypi
@@ -38,6 +38,11 @@
'android_arch%': "mips64",
'android_variant%': "mips64",
}],
+ [ 'android_buildtype == "Release"', {
+ 'android_apk_suffix': "release-unsigned.apk",
+ }, {
+ 'android_apk_suffix': "debug.apk",
+ }],
],
},
'targets': [
@@ -96,11 +101,11 @@
}],
],
'outputs': [
- '<(android_base)/apps/sample_app/build/outputs/apk/sample_app-arm-debug.apk',
+ '<(android_base)/apps/sample_app/build/outputs/apk/sample_app-<(android_variant)-<(android_apk_suffix)',
],
'action': [
'<(android_base)/apps/gradlew',
- ':sample_app:assemble<(android_variant)Debug',
+ ':sample_app:assemble<(android_variant)<(android_buildtype)',
'-p<(android_base)/apps/sample_app',
'-PsuppressNativeBuild',
],
@@ -159,11 +164,11 @@
}],
],
'outputs': [
- '<(android_base)/apps/visualbench/build/outputs/apk/visualbench-arm-debug.apk',
+ '<(android_base)/apps/visualbench/build/outputs/apk/visualbench-<(android_variant)-<(android_apk_suffix)',
],
'action': [
'<(android_base)/apps/gradlew',
- ':visualbench:assemble<(android_variant)Debug',
+ ':visualbench:assemble<(android_variant)<(android_buildtype)',
'-p<(android_base)/apps/visualbench',
'-PsuppressNativeBuild',
],