cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject [1/4] cordova-amazon-fireos git commit: gradle: Allow absolute paths to keystore files
Date Fri, 07 Nov 2014 18:58:02 GMT
Repository: cordova-amazon-fireos
Updated Branches:
  refs/heads/master 39afa074e -> 95d806703


gradle: Allow absolute paths to keystore files


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/900db964
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/900db964
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/900db964

Branch: refs/heads/master
Commit: 900db964a67ad7715d0aa7eb08891ef1f52da6e0
Parents: 39afa07
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Tue Oct 21 12:43:30 2014 -0400
Committer: Ajitha <ajithas@amazon.com>
Committed: Wed Oct 29 17:05:00 2014 +0530

----------------------------------------------------------------------
 bin/templates/project/build.gradle | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/900db964/bin/templates/project/build.gradle
----------------------------------------------------------------------
diff --git a/bin/templates/project/build.gradle b/bin/templates/project/build.gradle
index 2e4d5cb..974a19f 100644
--- a/bin/templates/project/build.gradle
+++ b/bin/templates/project/build.gradle
@@ -180,14 +180,21 @@ def ensureValueExists(filePath, props, key) {
 
 def addSigningProps(propsFilePath, signingConfig) {
     def propsFile = file(propsFilePath)
+    def props = new Properties()
     propsFile.withReader { reader ->
-        def props = new Properties()
         props.load(reader)
-        signingConfig.keyAlias = ensureValueExists(propsFilePath, props, 'keyAlias')
-        signingConfig.keyPassword = props.get('keyPassword')
-        signingConfig.storeFile = RelativePath.parse(true, ensureValueExists(propsFilePath,
props, 'storeFile')).getFile(propsFile.getParentFile())
-        signingConfig.storePassword = props.get('storePassword')
     }
+    def storeFile = new File(ensureValueExists(propsFilePath, props, 'storeFile'))
+    if (!storeFile.isAbsolute()) {
+        storeFile = RelativePath.parse(true, storeFile.toString()).getFile(propsFile.getParentFile())
+    }
+    if (!storeFile.exists()) {
+        throw new FileNotFoundException('Keystore file does not exist: ' + storeFile.getAbsolutePath())
+    }
+    signingConfig.keyAlias = ensureValueExists(propsFilePath, props, 'keyAlias')
+    signingConfig.keyPassword = props.get('keyPassword')
+    signingConfig.storeFile = storeFile
+    signingConfig.storePassword = props.get('storePassword')
 }
 
 if (file('build-extras.gradle').exists()) {


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


Mime
View raw message