From ffd14fe7d95161f98ce88dc9f8b58046a51bbd79 Mon Sep 17 00:00:00 2001 From: Brian Geppert Date: Tue, 9 Dec 2014 11:57:29 -0600 Subject: [PATCH] Revert Gradle distributionUrlRegex cleanup. This reverts commit 75a0a6752a77e2e0f491ae4de7137f5163c7a4bd. --- bin/templates/cordova/lib/build.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/templates/cordova/lib/build.js b/bin/templates/cordova/lib/build.js index 0d4d0046..fead2067 100644 --- a/bin/templates/cordova/lib/build.js +++ b/bin/templates/cordova/lib/build.js @@ -239,7 +239,8 @@ 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. - var distributionUrlRegex = '/^distributionUrl=.*$/'; + // 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);