From eee213e01a26054906fd07423f3620c98b786956 Mon Sep 17 00:00:00 2001 From: Fredia Huya-Kouadio Date: Tue, 5 Jan 2021 13:40:42 -0800 Subject: Improve the logic to compile for Android by automatically detecting and setting up the Android NDK if needed. --- platform/android/java/app/build.gradle | 2 ++ platform/android/java/app/config.gradle | 3 ++- platform/android/java/nativeSrcsConfigs/build.gradle | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) (limited to 'platform/android/java') diff --git a/platform/android/java/app/build.gradle b/platform/android/java/app/build.gradle index 53d11fda5b..814cc30613 100644 --- a/platform/android/java/app/build.gradle +++ b/platform/android/java/app/build.gradle @@ -98,6 +98,8 @@ android { disable 'MissingTranslation', 'UnusedResources' } + ndkVersion versions.ndkVersion + packagingOptions { exclude 'META-INF/LICENSE' exclude 'META-INF/NOTICE' diff --git a/platform/android/java/app/config.gradle b/platform/android/java/app/config.gradle index 80cf6f7ede..8d3aa8a6b0 100644 --- a/platform/android/java/app/config.gradle +++ b/platform/android/java/app/config.gradle @@ -7,7 +7,8 @@ ext.versions = [ supportCoreUtils : '1.0.0', kotlinVersion : '1.4.10', v4Support : '1.0.0', - javaVersion : 1.8 + javaVersion : 1.8, + ndkVersion : '21.3.6528147' // Also update 'platform/android/detect.py#get_project_ndk_version()' when this is updated. ] diff --git a/platform/android/java/nativeSrcsConfigs/build.gradle b/platform/android/java/nativeSrcsConfigs/build.gradle index 65b7bb9dc9..66077060ea 100644 --- a/platform/android/java/nativeSrcsConfigs/build.gradle +++ b/platform/android/java/nativeSrcsConfigs/build.gradle @@ -31,6 +31,8 @@ android { } } + ndkVersion versions.ndkVersion + externalNativeBuild { cmake { path "CMakeLists.txt" -- cgit v1.2.3