diff --git a/src/android/barcodescanner.gradle b/src/android/barcodescanner.gradle index 96edb181..115113d5 100644 --- a/src/android/barcodescanner.gradle +++ b/src/android/barcodescanner.gradle @@ -1,4 +1,8 @@ -cdvMinSdkVersion = Math.max(15, cdvHelpers.getConfigPreference('android-minSdkVersion', 0) as Integer) +def DEFAULT_MIN_SDK_VERSION = 15 +def minSdk = Math.max(DEFAULT_MIN_SDK_VERSION, cdvHelpers.getConfigPreference('android-minSdkVersion',0) as Integer); +if (cdvMinSdkVersion == null || Integer.parseInt(cdvMinSdkVersion) < minSdk ) { + ext.cdvMinSdkVersion = minSdk; +} repositories{ jcenter()