You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by br...@apache.org on 2018/09/12 11:31:26 UTC

[cordova-android] 01/01: Better cdvMinSdkVersion fix in build.gradle

This is an automated email from the ASF dual-hosted git repository.

brodybits pushed a commit to branch brodybits-gradle-patch-2
in repository https://gitbox.apache.org/repos/asf/cordova-android.git

commit 80b0134bace72a9d6f1a7c6912e61f0bac098558
Author: Chris Brody <ch...@gmail.com>
AuthorDate: Wed Sep 12 07:31:23 2018 -0400

    Better cdvMinSdkVersion fix in build.gradle
    
    Second followup to GH-495
---
 bin/templates/project/app/build.gradle | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/bin/templates/project/app/build.gradle b/bin/templates/project/app/build.gradle
index e0e6647..601eef7 100644
--- a/bin/templates/project/app/build.gradle
+++ b/bin/templates/project/app/build.gradle
@@ -63,7 +63,7 @@ ext {
     }
     // Sets the minSdkVersion to the given value.
     if (!project.hasProperty('cdvMinSdkVersion')) {
-        cdvMinSdkVersion = null
+        cdvMinSdkVersion = defaultMinSdkVersion
     }
     // Whether to build architecture-specific APKs.
     if (!project.hasProperty('cdvBuildMultipleApks')) {
@@ -117,7 +117,7 @@ if (ext.cdvReleaseSigningPropertiesFile == null && file('../release-signing.prop
 // Cast to appropriate types.
 ext.cdvBuildMultipleApks = cdvBuildMultipleApks == null ? false : cdvBuildMultipleApks.toBoolean();
 ext.cdvVersionCodeForceAbiDigit = cdvVersionCodeForceAbiDigit == null ? false : cdvVersionCodeForceAbiDigit.toBoolean();
-ext.cdvMinSdkVersion = cdvMinSdkVersion == null ? defaultMinSdkVersion : cdvMinSdkVersion
+ext.cdvMinSdkVersion = cdvMinSdkVersion
 ext.cdvVersionCode = cdvVersionCode == null ? null : Integer.parseInt('' + cdvVersionCode)
 
 def computeBuildTargetName(debugBuild) {
@@ -162,9 +162,7 @@ android {
         versionCode cdvVersionCode ?: new BigInteger("" + privateHelpers.extractIntFromManifest("versionCode"))
         applicationId privateHelpers.extractStringFromManifest("package")
 
-        if (cdvMinSdkVersion != null) {
-            minSdkVersion cdvMinSdkVersion
-        }
+        minSdkVersion cdvMinSdkVersion
     }
 
     lintOptions {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org