You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ma...@apache.org on 2014/09/23 20:28:11 UTC

android commit: Improved a regex.

Repository: cordova-android
Updated Branches:
  refs/heads/4.0.x 363fc8deb -> 75a0a6752


Improved a regex.


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

Branch: refs/heads/4.0.x
Commit: 75a0a6752a77e2e0f491ae4de7137f5163c7a4bd
Parents: 363fc8d
Author: Max Woghiren <ma...@gmail.com>
Authored: Tue Sep 23 14:27:43 2014 -0400
Committer: Max Woghiren <ma...@gmail.com>
Committed: Tue Sep 23 14:27:54 2014 -0400

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


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/75a0a675/bin/templates/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/bin/templates/cordova/lib/build.js b/bin/templates/cordova/lib/build.js
index 89556fe..9c872bf 100644
--- a/bin/templates/cordova/lib/build.js
+++ b/bin/templates/cordova/lib/build.js
@@ -225,8 +225,7 @@ var builders = {
 
                 // 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 distributionUrlRegex = '/^distributionUrl=.*$/';
                 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);