You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by na...@apache.org on 2014/10/09 22:22:38 UTC

[06/19] git commit: Added gradle distribution URL updating.

Added gradle distribution URL updating.

Conflicts:
	bin/templates/cordova/lib/build.js
	framework/build.gradle


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

Branch: refs/heads/master
Commit: 73e2a9a68a63669f14cfa41036f9b86220792a3b
Parents: f9cd9a1
Author: Max Woghiren <ma...@gmail.com>
Authored: Mon Sep 22 16:04:24 2014 -0400
Committer: Prabhjot Singh <pr...@amazon.com>
Committed: Mon Oct 6 16:13:59 2014 +0530

----------------------------------------------------------------------
 bin/templates/cordova/lib/build.js | 8 ++++++++
 framework/build.gradle             | 1 +
 2 files changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/73e2a9a6/bin/templates/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/bin/templates/cordova/lib/build.js b/bin/templates/cordova/lib/build.js
index 5fc378c..89556fe 100644
--- a/bin/templates/cordova/lib/build.js
+++ b/bin/templates/cordova/lib/build.js
@@ -223,6 +223,14 @@ var builders = {
                 shell.mkdir('-p', path.join(projectPath, 'gradle'));
                 shell.cp('-r', path.join(wrapperDir, 'gradle', 'wrapper'), path.join(projectPath, 'gradle'));
 
+                // If the gradle distribution URL is set, make sure it points to version 1.12.
+                // 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-1.12-all.zip';
+                var gradleWrapperPropertiesPath = path.join(projectPath, 'gradle', 'wrapper', 'gradle-wrapper.properties');
+                shell.sed('-i', distributionUrlRegex, distributionUrl, gradleWrapperPropertiesPath);
+
                 // Update the version of build.gradle in each dependent library.
                 var pluginBuildGradle = path.join(projectPath, 'cordova', 'lib', 'plugin-build.gradle');
                 var subProjects = extractSubProjectPaths();

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/73e2a9a6/framework/build.gradle
----------------------------------------------------------------------
diff --git a/framework/build.gradle b/framework/build.gradle
index e9d06ea..b9e9cdf 100644
--- a/framework/build.gradle
+++ b/framework/build.gradle
@@ -32,6 +32,7 @@ buildscript {
         // * framework/build.gradle
         // * bin/templates/project/cordova.gradle
         // * bin/templates/cordova/lib/plugin-build.gradle
+        // * distributionUrl within bin/templates/cordova/lib/build.js.
         classpath 'com.android.tools.build:gradle:0.12.+'
     }
 }


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