From 02677d0561e8a06ecb67496159bdca6c6c1fe5a2 Mon Sep 17 00:00:00 2001 From: Hiroyuki Okada Date: Sat, 28 Oct 2023 12:20:15 +0900 Subject: [PATCH] android: require MinSdkVersion (#46) * android: require MinSdkVersion * fix: minSdkVersion --- src/android/build.gradle | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/android/build.gradle b/src/android/build.gradle index 3af1fce..e8dfaf5 100644 --- a/src/android/build.gradle +++ b/src/android/build.gradle @@ -1,13 +1,19 @@ -ext.cdvMinSdkVersion = 24 - buildscript { repositories { jcenter() } } +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; +} + android { defaultConfig { + minSdkVersion _nodeMinSdkVersion externalNativeBuild { cmake { cppFlags ""