cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject android commit: CB-8202 Fix gradle build signing when passwords provided interactively
Date Mon, 22 Dec 2014 15:22:03 GMT
Repository: cordova-android
Updated Branches:
  refs/heads/master 342bbaa3a -> 731a36d3a


CB-8202 Fix gradle build signing when passwords provided interactively


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

Branch: refs/heads/master
Commit: 731a36d3a04cd6176e035c6433d0e8290f82f8e8
Parents: 342bbaa
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Mon Dec 22 10:21:17 2014 -0500
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Mon Dec 22 10:21:17 2014 -0500

----------------------------------------------------------------------
 bin/templates/project/build.gradle | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/731a36d3/bin/templates/project/build.gradle
----------------------------------------------------------------------
diff --git a/bin/templates/project/build.gradle b/bin/templates/project/build.gradle
index f427561..a2ebaf5 100644
--- a/bin/templates/project/build.gradle
+++ b/bin/templates/project/build.gradle
@@ -107,9 +107,9 @@ android {
             release {
                 // These must be set or Gradle will complain (even if they are overridden).
                 keyAlias = ""
-                keyPassword = ""
+                keyPassword = "__unset" // And these must be set to non-empty in order to
have the signing step added to the task graph.
                 storeFile = null
-                storePassword = ""
+                storePassword = "__unset"
             }
         }
         buildTypes {
@@ -159,11 +159,10 @@ def promptForReleaseKeyPassword() {
     if (!System.env.RELEASE_SIGNING_PROPERTIES_FILE) {
         return;
     }
-    if (!android.signingConfigs.release.storePassword) {
+    if ('__unset'.equals(android.signingConfigs.release.storePassword)) {
         android.signingConfigs.release.storePassword = promptForPassword('Enter key store
password: ')
-        println('set to:' + android.signingConfigs.release.storePassword)
     }
-    if (!android.signingConfigs.release.keyPassword) {
+    if ('__unset'.equals(android.signingConfigs.release.keyPassword)) {
         android.signingConfigs.release.keyPassword = promptForPassword('Enter key password:
');
     }
 }
@@ -205,9 +204,9 @@ def addSigningProps(propsFilePath, signingConfig) {
         throw new FileNotFoundException('Keystore file does not exist: ' + storeFile.getAbsolutePath())
     }
     signingConfig.keyAlias = ensureValueExists(propsFilePath, props, 'keyAlias')
-    signingConfig.keyPassword = props.get('keyPassword')
+    signingConfig.keyPassword = props.get('keyPassword', signingConfig.keyPassword)
     signingConfig.storeFile = storeFile
-    signingConfig.storePassword = props.get('storePassword')
+    signingConfig.storePassword = props.get('storePassword', signingConfig.storePassword)
     def storeType = props.get('storeType')
     if (!storeType) {
         def filename = storeFile.getName().toLowerCase();


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


Mime
View raw message