From 619212abf3d62a83e97dfdb3d8d1a085bf2db792 Mon Sep 17 00:00:00 2001 From: Mitchell Hentges Date: Fri, 20 May 2016 22:23:28 +0200 Subject: [PATCH] Reduce 'android-18' duplication, as originally done by wenderen Use android.platform (and $ANDROID_PLATFORM) for configuration, apply 'android-18' default --- python/servo/command_base.py | 3 +++ servobuild.example | 3 ++- support/android/apk/build.xml | 14 +++----------- support/android/apk/jni/Application.mk | 2 +- support/android/apk/project.properties | 1 - support/android/build-apk/src/main.rs | 7 ++++++- support/android/openssl.sh | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) delete mode 100644 support/android/apk/project.properties diff --git a/python/servo/command_base.py b/python/servo/command_base.py index 921825dbf96d..79e1fb8f3c15 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -178,6 +178,7 @@ def resolverelative(category, key): self.config["android"].setdefault("sdk", "") self.config["android"].setdefault("ndk", "") self.config["android"].setdefault("toolchain", "") + self.config["android"].setdefault("platform", "android-18") self.config["android"].setdefault("target", "arm-linux-androideabi") self.config.setdefault("gonk", {}) @@ -318,6 +319,8 @@ def build_env(self, gonk=False, hosts_file_path=None, target=None): env["ANDROID_NDK"] = self.config["android"]["ndk"] if self.config["android"]["toolchain"]: env["ANDROID_TOOLCHAIN"] = self.config["android"]["toolchain"] + if self.config["android"]["platform"]: + env["ANDROID_PLATFORM"] = self.config["android"]["platform"] if gonk: if self.config["gonk"]["b2g"]: diff --git a/servobuild.example b/servobuild.example index ec4de5ee9e99..da3d8d73c80b 100644 --- a/servobuild.example +++ b/servobuild.example @@ -41,10 +41,11 @@ debug-mozjs = false # Android information [android] -# Defaults to the value of $ANDROID_SDK, $ANDROID_NDK, $ANDROID_TOOLCHAIN respectively +# Defaults to the value of $ANDROID_SDK, $ANDROID_NDK, $ANDROID_TOOLCHAIN, $ANDROID_PLATFORM respectively #sdk = "/opt/android-sdk" #ndk = "/opt/android-ndk" #toolchain = "/opt/android-toolchain" +#platform = "android-18" # Gonk information # Please fill the ndk/toolchain for Android too diff --git a/support/android/apk/build.xml b/support/android/apk/build.xml index 3d1611517a80..3e22c93f50a9 100644 --- a/support/android/apk/build.xml +++ b/support/android/apk/build.xml @@ -36,17 +36,9 @@ - - - + + +