Skip to content

Commit

Permalink
Upgraded gradle to current latest release 6.0
Browse files Browse the repository at this point in the history
Upgraded android gradle plugin to version 3.5.2 (current stable)
Removed useDeprecatedNdk as this option is now completely removed from gradle.
  • Loading branch information
breautek committed Nov 15, 2019
1 parent 553d7f2 commit 5f4cb04
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bin/templates/cordova/lib/builders/ProjectBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ class ProjectBuilder {
// 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-5.6.2-all.zip';
var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'https\\://services.gradle.org/distributions/gradle-6.0-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);
Expand Down
5 changes: 1 addition & 4 deletions bin/templates/cordova/lib/config/GradlePropertiesParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ class GradlePropertiesParser {
'org.gradle.daemon': 'true',

// to allow dex in process
'org.gradle.jvmargs': '-Xmx2048m',

// allow NDK to be used - required by Gradle 1.5 plugin
'android.useDeprecatedNdk': 'true'
'org.gradle.jvmargs': '-Xmx2048m'

// Shaves another 100ms, but produces a "try at own risk" warning. Not worth it (yet):
// 'org.gradle.parallel': 'true'
Expand Down
4 changes: 2 additions & 2 deletions bin/templates/project/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath 'com.android.tools.build:gradle:3.5.2'
}
}

Expand All @@ -40,7 +40,7 @@ allprojects {
}

task wrapper(type: Wrapper) {
gradleVersion = '5.6.2'
gradleVersion = '6.0'
}

// Configuration properties. Set these via environment variables, build-extras.gradle, or gradle.properties.
Expand Down
2 changes: 1 addition & 1 deletion bin/templates/project/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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.3.0'
classpath 'com.android.tools.build:gradle:3.5.2'
}
}

Expand Down
2 changes: 1 addition & 1 deletion test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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.3.0'
classpath 'com.android.tools.build:gradle:3.5.2'
}
}

Expand Down
2 changes: 1 addition & 1 deletion test/wrapper.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
*/

wrapper {
gradleVersion = '5.6.2'
gradleVersion = '6.0'
}

0 comments on commit 5f4cb04

Please sign in to comment.