From 12f817fef0c0d93661a34e8f45f5e896ff7bf567 Mon Sep 17 00:00:00 2001 From: Hiroyuki Okada Date: Sat, 28 Oct 2023 13:11:20 +0900 Subject: [PATCH] android: fix min sdk version (#48) * android: require NDK 24.x or higher * fix: compileNativeModulesSdkVersion --- src/android/build.gradle | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/android/build.gradle b/src/android/build.gradle index e8dfaf5..f6f0773 100644 --- a/src/android/build.gradle +++ b/src/android/build.gradle @@ -4,16 +4,12 @@ buildscript { } } -def _nodeMinSdkVersion = ((rootProject?.ext?.properties?.minSdkVersion) ?: 24) -def _compileNativeModulesSdkVersion = _nodeMinSdkVersion; -if (_compileNativeModulesSdkVersion<24) { - // 24 is the minimum sdk version Node is built with. - _compileNativeModulesSdkVersion=24; -} +def _nodeMinSdkVersion = 24 +ext.cdvMinSdkVersion = _nodeMinSdkVersion +def _compileNativeModulesSdkVersion=_nodeMinSdkVersion; android { defaultConfig { - minSdkVersion _nodeMinSdkVersion externalNativeBuild { cmake { cppFlags "" @@ -178,7 +174,7 @@ cdvPluginPostBuildExtras += { -> String ndk_bundle_path = android.ndkDirectory String toolchain_path = "${ndk_bundle_path}/toolchains/llvm/prebuilt/${temp_host_tag}" - String npm_toolchain_ar = "${toolchain_path}/bin/${temp_binutils_prefix}-ar" + String npm_toolchain_ar = "${toolchain_path}/bin/llvm-ar" String npm_toolchain_cc = "${toolchain_path}/bin/${temp_compiler_prefix}-clang" String npm_toolchain_cxx = "${toolchain_path}/bin/${temp_compiler_prefix}-clang++" String npm_toolchain_link = "${toolchain_path}/bin/${temp_compiler_prefix}-clang++"