cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject [26/45] android commit: CB-9402 Allow to set gradle distubutionUrl via env variable CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL
Date Wed, 23 Sep 2015 19:58:37 GMT
CB-9402 Allow to set gradle distubutionUrl via env variable CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL

This closes #205


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

Branch: refs/heads/5.0.x
Commit: a56f55b0364b88d0fefea5a3139c68eda658c4bf
Parents: 771f5ec
Author: Alexander Lebedev <alexander.lebedev@gmail.com>
Authored: Fri Aug 14 10:17:02 2015 +0300
Committer: Joe Bowser <bowserj@apache.org>
Committed: Thu Aug 20 14:22:41 2015 -0700

----------------------------------------------------------------------
 bin/templates/cordova/lib/build.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/a56f55b0/bin/templates/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/bin/templates/cordova/lib/build.js b/bin/templates/cordova/lib/build.js
index bbcf171..268a7c5 100644
--- a/bin/templates/cordova/lib/build.js
+++ b/bin/templates/cordova/lib/build.js
@@ -344,10 +344,10 @@ var builders = {
                 // If it's not set, do nothing, assuming that we're using a future version
of gradle that we don't want to mess with.
                 // For some reason, using ^ and $ don't work.  This does the job, though.
                 var distributionUrlRegex = /distributionUrl.*zip/;
-                var distributionUrl = 'distributionUrl=http\\://services.gradle.org/distributions/gradle-2.2.1-all.zip';
+                var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL']
|| 'http\\://services.gradle.org/distributions/gradle-2.2.1-all.zip';
                 var gradleWrapperPropertiesPath = path.join(projectPath, 'gradle', 'wrapper',
'gradle-wrapper.properties');
                 shell.chmod('u+w', gradleWrapperPropertiesPath);
-                shell.sed('-i', distributionUrlRegex, distributionUrl, gradleWrapperPropertiesPath);
+                shell.sed('-i', distributionUrlRegex, 'distributionUrl='+distributionUrl,
gradleWrapperPropertiesPath);
 
                 var propertiesFile = opts.buildType + SIGNING_PROPERTIES;
                 var propertiesFilePath = path.join(ROOT, propertiesFile);


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


Mime
View raw message