infil00p closed pull request #436: CB-14008: Updating Gradle Libraries to work 
with Android Studio 3.1.0
URL: https://github.com/apache/cordova-android/pull/436
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/bin/templates/cordova/lib/builders/GradleBuilder.js 
b/bin/templates/cordova/lib/builders/GradleBuilder.js
index 8237c739e..30d3c0fbb 100644
--- a/bin/templates/cordova/lib/builders/GradleBuilder.js
+++ b/bin/templates/cordova/lib/builders/GradleBuilder.js
@@ -247,7 +247,7 @@ GradleBuilder.prototype.prepEnv = function (opts) {
         // For some reason, using ^ and $ don't work.  This does the job, 
though.
         var distributionUrlRegex = /distributionUrl.*zip/;
         /* jshint -W069 */
-        var distributionUrl = 
process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 
'https\\://services.gradle.org/distributions/gradle-4.1-all.zip';
+        var distributionUrl = 
process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 
'https\\://services.gradle.org/distributions/gradle-4.4-all.zip';
         /* jshint +W069 */
         var gradleWrapperPropertiesPath = path.join(self.root, 'gradle', 
'wrapper', 'gradle-wrapper.properties');
         shell.chmod('u+w', gradleWrapperPropertiesPath);
diff --git a/bin/templates/cordova/lib/builders/StudioBuilder.js 
b/bin/templates/cordova/lib/builders/StudioBuilder.js
index 9587c7558..17cdfd587 100644
--- a/bin/templates/cordova/lib/builders/StudioBuilder.js
+++ b/bin/templates/cordova/lib/builders/StudioBuilder.js
@@ -223,7 +223,7 @@ StudioBuilder.prototype.prepEnv = function (opts) {
             // 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 distributionUrl = 
process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 
'https\\://services.gradle.org/distributions/gradle-4.1-all.zip';
+            var distributionUrl = 
process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 
'https\\://services.gradle.org/distributions/gradle-4.4-all.zip';
             var gradleWrapperPropertiesPath = path.join(self.root, 'gradle', 
'wrapper', 'gradle-wrapper.properties');
             shell.chmod('u+w', gradleWrapperPropertiesPath);
             shell.sed('-i', distributionUrlRegex, 'distributionUrl=' + 
distributionUrl, gradleWrapperPropertiesPath);
diff --git a/bin/templates/project/app/build.gradle 
b/bin/templates/project/app/build.gradle
index 586bcfa46..479b46dba 100644
--- a/bin/templates/project/app/build.gradle
+++ b/bin/templates/project/app/build.gradle
@@ -29,7 +29,7 @@ buildscript {
     }
 
     dependencies {
-        classpath 'com.android.tools.build:gradle:3.0.1'
+        classpath 'com.android.tools.build:gradle:3.1.0'
     }
 }
 
@@ -42,7 +42,7 @@ allprojects {
 }
 
 task wrapper(type: Wrapper) {
-    gradleVersion = '4.1.0'
+    gradleVersion = '4.4.0'
 }
 
 // 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 d982091fb..20b23fbd8 100644
--- a/bin/templates/project/build.gradle
+++ b/bin/templates/project/build.gradle
@@ -29,7 +29,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.0.1'
+        classpath 'com.android.tools.build:gradle:3.1.0'
     }
 }
 
diff --git a/framework/build.gradle b/framework/build.gradle
index 565f42296..dfe37a1e5 100644
--- a/framework/build.gradle
+++ b/framework/build.gradle
@@ -31,8 +31,10 @@ buildscript {
     }
 
     dependencies {
-        classpath 'com.android.tools.build:gradle:3.0.1'
-        classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
+        // 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.1.0'
+        classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
         classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
     }
 }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org

Reply via email to