mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-22 08:53:24 +08:00
CB-8143 Use gradle 2.2.1 instead of 1.12 to appease Android Studio 1.0 warning-on-startup
This commit is contained in:
parent
b92303b1c9
commit
6b6e887c2f
4
bin/templates/cordova/lib/build.js
vendored
4
bin/templates/cordova/lib/build.js
vendored
@ -238,11 +238,11 @@ var builders = {
|
|||||||
shell.mkdir('-p', path.join(projectPath, 'gradle'));
|
shell.mkdir('-p', path.join(projectPath, 'gradle'));
|
||||||
shell.cp('-r', path.join(wrapperDir, 'gradle', 'wrapper'), 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 the gradle distribution URL is set, make sure it points to version we want.
|
||||||
// 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.
|
// 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.
|
// For some reason, using ^ and $ don't work. This does the job, though.
|
||||||
var distributionUrlRegex = /distributionUrl.*zip/;
|
var distributionUrlRegex = /distributionUrl.*zip/;
|
||||||
var distributionUrl = 'distributionUrl=http\\://services.gradle.org/distributions/gradle-1.12-all.zip';
|
var distributionUrl = 'distributionUrl=http\\://services.gradle.org/distributions/gradle-2.2.1-all.zip';
|
||||||
var gradleWrapperPropertiesPath = path.join(projectPath, 'gradle', 'wrapper', 'gradle-wrapper.properties');
|
var gradleWrapperPropertiesPath = path.join(projectPath, 'gradle', 'wrapper', 'gradle-wrapper.properties');
|
||||||
shell.sed('-i', distributionUrlRegex, distributionUrl, gradleWrapperPropertiesPath);
|
shell.sed('-i', distributionUrlRegex, distributionUrl, gradleWrapperPropertiesPath);
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
task wrapper(type: Wrapper) {
|
task wrapper(type: Wrapper) {
|
||||||
gradleVersion = '1.12'
|
gradleVersion = '2.2.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
// PLUGIN GRADLE EXTENSIONS START
|
// PLUGIN GRADLE EXTENSIONS START
|
||||||
|
Loading…
Reference in New Issue
Block a user