From 305cb2cdd5f242b9b749e46fb75108c4dcdc5cdc Mon Sep 17 00:00:00 2001 From: Chris Brody Date: Mon, 8 Jun 2020 20:47:10 -0400 Subject: [PATCH] major: Gradle 6.5 & Android Gradle plugin 4.0.0 updates (#988) * feat: Gradle 6.5 & Android Gradle plugin 4.0.0 updates * update test/android/wrapper.gradle to reference Gradle 6.5 * update test/androidx/wrapper.gradle to reference Gradle 6.5 * update spec/fixtures/android_studio_project/build.gradle to reference com.android.tools.build:gradle:4.0.0 * update test/android/build.gradle to reference com.android.tools.build:gradle:4.0.0 * update test/androidx/build.gradle to reference com.android.tools.build:gradle:4.0.0 --- bin/templates/cordova/lib/builders/ProjectBuilder.js | 2 +- bin/templates/project/app/build.gradle | 4 ++-- bin/templates/project/build.gradle | 2 +- framework/build.gradle | 2 +- spec/fixtures/android_studio_project/build.gradle | 2 +- test/android/build.gradle | 2 +- test/android/wrapper.gradle | 2 +- test/androidx/build.gradle | 2 +- test/androidx/wrapper.gradle | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bin/templates/cordova/lib/builders/ProjectBuilder.js b/bin/templates/cordova/lib/builders/ProjectBuilder.js index 4ad6033f..fdf35be4 100644 --- a/bin/templates/cordova/lib/builders/ProjectBuilder.js +++ b/bin/templates/cordova/lib/builders/ProjectBuilder.js @@ -303,7 +303,7 @@ class ProjectBuilder { // update/set the distributionUrl in the gradle-wrapper.properties const gradleWrapperPropertiesPath = path.join(self.root, 'gradle/wrapper/gradle-wrapper.properties'); const gradleWrapperProperties = createEditor(gradleWrapperPropertiesPath); - const distributionUrl = process.env.CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL || 'https://services.gradle.org/distributions/gradle-6.1-all.zip'; + const distributionUrl = process.env.CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL || 'https://services.gradle.org/distributions/gradle-6.5-all.zip'; gradleWrapperProperties.set('distributionUrl', distributionUrl); gradleWrapperProperties.save(); diff --git a/bin/templates/project/app/build.gradle b/bin/templates/project/app/build.gradle index c454561d..f2485d05 100644 --- a/bin/templates/project/app/build.gradle +++ b/bin/templates/project/app/build.gradle @@ -53,7 +53,7 @@ buildscript { dependencies { apply from: '../CordovaLib/cordova.gradle' - classpath 'com.android.tools.build:gradle:3.5.3' + classpath 'com.android.tools.build:gradle:4.0.0' if (cdvHelpers.getConfigPreference('GradlePluginKotlinEnabled', 'false').toBoolean()) { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" @@ -89,7 +89,7 @@ allprojects { } task wrapper(type: Wrapper) { - gradleVersion = '6.1' + gradleVersion = '6.5' } // Configuration properties. Set these via environment variables, build-extras.gradle, or gradle.properties. diff --git a/bin/templates/project/build.gradle b/bin/templates/project/build.gradle index 14248fde..089660c2 100644 --- a/bin/templates/project/build.gradle +++ b/bin/templates/project/build.gradle @@ -25,7 +25,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.5.3' + classpath 'com.android.tools.build:gradle:4.0.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/framework/build.gradle b/framework/build.gradle index 43307d89..1541251c 100644 --- a/framework/build.gradle +++ b/framework/build.gradle @@ -31,7 +31,7 @@ buildscript { dependencies { // The gradle plugin and the maven plugin have to be updated after each version of Android // studio comes out - classpath 'com.android.tools.build:gradle:3.6.0' + classpath 'com.android.tools.build:gradle:4.0.0' classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3' } diff --git a/spec/fixtures/android_studio_project/build.gradle b/spec/fixtures/android_studio_project/build.gradle index 8df9299d..4dc1795e 100644 --- a/spec/fixtures/android_studio_project/build.gradle +++ b/spec/fixtures/android_studio_project/build.gradle @@ -6,7 +6,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.0.0' + classpath 'com.android.tools.build:gradle:4.0.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/test/android/build.gradle b/test/android/build.gradle index 8ed97544..e624f17e 100644 --- a/test/android/build.gradle +++ b/test/android/build.gradle @@ -30,7 +30,7 @@ buildscript { // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files - classpath 'com.android.tools.build:gradle:3.6.0' + classpath 'com.android.tools.build:gradle:4.0.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/test/android/wrapper.gradle b/test/android/wrapper.gradle index 3980234f..94d95d2d 100644 --- a/test/android/wrapper.gradle +++ b/test/android/wrapper.gradle @@ -17,5 +17,5 @@ */ wrapper { - gradleVersion = '6.1' + gradleVersion = '6.5' } diff --git a/test/androidx/build.gradle b/test/androidx/build.gradle index 46eb0c49..a90dee33 100644 --- a/test/androidx/build.gradle +++ b/test/androidx/build.gradle @@ -28,7 +28,7 @@ buildscript { // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files - classpath 'com.android.tools.build:gradle:3.6.0' + classpath 'com.android.tools.build:gradle:4.0.0' } } diff --git a/test/androidx/wrapper.gradle b/test/androidx/wrapper.gradle index 3980234f..94d95d2d 100644 --- a/test/androidx/wrapper.gradle +++ b/test/androidx/wrapper.gradle @@ -17,5 +17,5 @@ */ wrapper { - gradleVersion = '6.1' + gradleVersion = '6.5' }