cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i..@apache.org
Subject [1/2] android commit: CB-3445: Make minSdkVersion and base versionCode settable through env vars
Date Wed, 17 Sep 2014 20:00:00 GMT
Repository: cordova-android
Updated Branches:
  refs/heads/4.0.x c32bcca67 -> 215adab1f


CB-3445: Make minSdkVersion and base versionCode settable through env vars


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/7ce46ed6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/7ce46ed6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/7ce46ed6

Branch: refs/heads/4.0.x
Commit: 7ce46ed60cf5a5feff08752b610e426ee553b223
Parents: cb44236
Author: Ian Clelland <iclelland@chromium.org>
Authored: Wed Sep 17 15:54:28 2014 -0400
Committer: Ian Clelland <iclelland@chromium.org>
Committed: Wed Sep 17 15:58:22 2014 -0400

----------------------------------------------------------------------
 bin/templates/project/build.gradle   | 2 +-
 bin/templates/project/cordova.gradle | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/7ce46ed6/bin/templates/project/build.gradle
----------------------------------------------------------------------
diff --git a/bin/templates/project/build.gradle b/bin/templates/project/build.gradle
index 96ea009..b6994b6 100644
--- a/bin/templates/project/build.gradle
+++ b/bin/templates/project/build.gradle
@@ -57,7 +57,7 @@ android {
     }
 
     defaultConfig {
-        versionCode Integer.parseInt("" + getVersionCodeFromManifest() + "0")
+        versionCode Integer.parseInt(System.env.ANDROID_VERSION_CODE ?: ("" + getVersionCodeFromManifest()
+ "0"))
     }
 
     compileSdkVersion cordova.cordovaSdkVersion

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/7ce46ed6/bin/templates/project/cordova.gradle
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova.gradle b/bin/templates/project/cordova.gradle
index ba73c93..ec597b2 100644
--- a/bin/templates/project/cordova.gradle
+++ b/bin/templates/project/cordova.gradle
@@ -115,6 +115,6 @@ String getAndroidSdkDir() {
     androidSdkDir
 }
 
-cordovaSdkVersion =  getProjectTarget("android-19")
+cordovaSdkVersion =  System.env.MIN_SDK_VERSION ?: getProjectTarget("android-19")
 cordovaBuildToolsVersion = latestBuildToolsAvailable("19.1.0")
 


Mime
View raw message