Skip to content

Commit 76180d3

Browse files
authored
Merge pull request #436 from infil00p/update_gradle_deps
CB-14008: Updating Gradle Libraries to work with Android Studio 3.1.0
2 parents b8530a6 + 5c4f8ca commit 76180d3

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

bin/templates/cordova/lib/builders/GradleBuilder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ GradleBuilder.prototype.prepEnv = function (opts) {
247247
// For some reason, using ^ and $ don't work. This does the job, though.
248248
var distributionUrlRegex = /distributionUrl.*zip/;
249249
/* jshint -W069 */
250-
var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'https\\://services.gradle.org/distributions/gradle-4.1-all.zip';
250+
var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'https\\://services.gradle.org/distributions/gradle-4.4-all.zip';
251251
/* jshint +W069 */
252252
var gradleWrapperPropertiesPath = path.join(self.root, 'gradle', 'wrapper', 'gradle-wrapper.properties');
253253
shell.chmod('u+w', gradleWrapperPropertiesPath);

bin/templates/cordova/lib/builders/StudioBuilder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ StudioBuilder.prototype.prepEnv = function (opts) {
223223
// 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.
224224
// For some reason, using ^ and $ don't work. This does the job, though.
225225
var distributionUrlRegex = /distributionUrl.*zip/;
226-
var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'https\\://services.gradle.org/distributions/gradle-4.1-all.zip';
226+
var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'https\\://services.gradle.org/distributions/gradle-4.4-all.zip';
227227
var gradleWrapperPropertiesPath = path.join(self.root, 'gradle', 'wrapper', 'gradle-wrapper.properties');
228228
shell.chmod('u+w', gradleWrapperPropertiesPath);
229229
shell.sed('-i', distributionUrlRegex, 'distributionUrl=' + distributionUrl, gradleWrapperPropertiesPath);

bin/templates/project/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ buildscript {
2929
}
3030

3131
dependencies {
32-
classpath 'com.android.tools.build:gradle:3.0.1'
32+
classpath 'com.android.tools.build:gradle:3.1.0'
3333
}
3434
}
3535

@@ -42,7 +42,7 @@ allprojects {
4242
}
4343

4444
task wrapper(type: Wrapper) {
45-
gradleVersion = '4.1.0'
45+
gradleVersion = '4.4.0'
4646
}
4747

4848
// Configuration properties. Set these via environment variables, build-extras.gradle, or gradle.properties.

bin/templates/project/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ buildscript {
2929

3030
// NOTE: Do not place your application dependencies here; they belong
3131
// in the individual module build.gradle files
32-
classpath 'com.android.tools.build:gradle:3.0.1'
32+
classpath 'com.android.tools.build:gradle:3.1.0'
3333
}
3434
}
3535

framework/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ buildscript {
3131
}
3232

3333
dependencies {
34-
classpath 'com.android.tools.build:gradle:3.0.1'
35-
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
34+
// The gradle plugin and the maven plugin have to be updated after each version of Android
35+
// studio comes out
36+
classpath 'com.android.tools.build:gradle:3.1.0'
37+
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
3638
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
3739
}
3840
}

0 commit comments

Comments
 (0)