cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject [02/12] cordova-amazon-fireos git commit: CB-8202 Fix gradle build signing when passwords provided interactively
Date Fri, 16 Jan 2015 21:32:46 GMT
CB-8202 Fix gradle build signing when passwords provided interactively


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/6b60c905
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/6b60c905
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/6b60c905

Branch: refs/heads/master
Commit: 6b60c905af987b3a57865e42c07683089ff4c63a
Parents: 11b2b1f
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Mon Dec 22 10:21:17 2014 -0500
Committer: Ajitha <ajithas@amazon.com>
Committed: Mon Jan 5 05:50:31 2015 +0000

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


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/6b60c905/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