aboutsummaryrefslogtreecommitdiffstats
path: root/support/android/build-apk/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'support/android/build-apk/src/main.rs')
-rw-r--r--support/android/build-apk/src/main.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/support/android/build-apk/src/main.rs b/support/android/build-apk/src/main.rs
index f9326f76452..0440cce8711 100644
--- a/support/android/build-apk/src/main.rs
+++ b/support/android/build-apk/src/main.rs
@@ -27,6 +27,11 @@ fn main() {
let ndk_path = env::var("NDK_HOME").ok().expect("Please set the NDK_HOME environment variable");
let ndk_path = Path::new(&ndk_path);
+ // Get the target android platform from ANDROID_PLATFORM env. Expecting "android-{version}"
+ let android_platform = env::var("ANDROID_PLATFORM")
+ .ok()
+ .expect("Please set the ANDROID_PLATFORM environment variable")
+
// Get the standalone NDK path from NDK_STANDALONE env.
// let standalone_path = env::var("NDK_STANDALONE").ok().unwrap_or("/opt/ndk_standalone".to_string());
// let standalone_path = Path::new(&standalone_path);
@@ -97,7 +102,7 @@ fn main() {
.arg("--name")
.arg("Servo")
.arg("--target")
- .arg("android-18")
+ .arg(&android_platform)
.arg("--path")
.arg(".")
.stdout(Stdio::inherit())