From 36cdd44478d3f275c86a23d6feff450071bc286a Mon Sep 17 00:00:00 2001 From: Jose Bravo Date: Mon, 13 May 2024 19:28:08 +0200 Subject: [PATCH] chore: update minSdkVersion to get the project version or fallback to 21 (#272) Signed-off-by: Jose Bravo --- .../javascript/indy-vdr-react-native/android/build.gradle | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wrappers/javascript/indy-vdr-react-native/android/build.gradle b/wrappers/javascript/indy-vdr-react-native/android/build.gradle index 9017d77e..083320b1 100644 --- a/wrappers/javascript/indy-vdr-react-native/android/build.gradle +++ b/wrappers/javascript/indy-vdr-react-native/android/build.gradle @@ -59,6 +59,10 @@ def getExt(name) { return rootProject.ext.get(name) } +def getExtWithFallback(prop, fallback) { + return rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +} + def resolveBuildType() { def buildType = "debug" tasks.all({ task -> @@ -81,7 +85,7 @@ android { } defaultConfig { - minSdkVersion 21 + minSdkVersion getExtWithFallback('minSdkVersion', '21') targetSdkVersion getExt('targetSdkVersion') externalNativeBuild {