Bug 1727438 - Upgrade to Gradle 6.9.1. r=nalexander,owlish

This is the last version that doesn't require Java 11, we will upgrade to
Gradle 7 once all components are ready (namely, apilint).

Co-authored-by: Jan-Erik Rediger <janerik@fnordig.de>

Differential Revision: https://phabricator.services.mozilla.com/D123569
This commit is contained in:
Agi Sferro 2021-08-31 20:53:09 +00:00
parent 8b804e3125
commit 5675e00bd6
7 changed files with 26 additions and 19 deletions

View file

@ -101,8 +101,8 @@ buildscript {
ext.kotlin_version = '1.3.50' ext.kotlin_version = '1.3.50'
dependencies { dependencies {
classpath 'org.mozilla.apilint:apilint:0.4.1' classpath 'org.mozilla.apilint:apilint:0.4.4'
classpath 'com.android.tools.build:gradle:3.4.2' classpath 'com.android.tools.build:gradle:4.2.0'
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.8.2' classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.8.2'
classpath 'org.apache.commons:commons-exec:1.3' classpath 'org.apache.commons:commons-exec:1.3'
classpath 'org.tomlj:tomlj:1.0.0' classpath 'org.tomlj:tomlj:1.0.0'

View file

@ -3,6 +3,6 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-all.zip
# Bug 1596208, Android Studio has a bug that prevents us from using this # Bug 1596208, Android Studio has a bug that prevents us from using this
# distributionSha256Sum=53b71812f18cdb2777e9f1b2a0f2038683907c90bdc406bc64d8b400e1fb2c3b # distributionSha256Sum=53b71812f18cdb2777e9f1b2a0f2038683907c90bdc406bc64d8b400e1fb2c3b

View file

@ -3,8 +3,8 @@ buildDir "${topobjdir}/gradle/build/mobile/android/annotations"
apply plugin: 'java' apply plugin: 'java'
dependencies { dependencies {
compile 'com.android.tools.lint:lint:26.2.1' implementation 'com.android.tools.lint:lint:26.2.1'
compile 'com.android.tools.lint:lint-checks:26.2.1' implementation 'com.android.tools.lint:lint-checks:26.2.1'
} }
sourceCompatibility = JavaVersion.VERSION_1_8 sourceCompatibility = JavaVersion.VERSION_1_8

View file

@ -341,8 +341,12 @@ android.libraryVariants.all { variant ->
include 'org/mozilla/geckoview/**.java' include 'org/mozilla/geckoview/**.java'
options.addPathOption('sourcepath', ':').setValue( options.addPathOption('sourcepath', ':').setValue(
variant.sourceSets.collect({ it.java.srcDirs }).flatten() + variant.sourceSets.collect({ it.java.srcDirs }).flatten() +
variant.generateBuildConfigProvider.get().sourceOutputDir + variant.generateBuildConfigProvider.get().sourceOutputDir.asFile.get() +
variant.aidlCompileProvider.get().sourceOutputDir) variant.aidlCompileProvider.get().sourceOutputDir.asFile.get()
)
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
classpath += variant.javaCompileProvider.get().classpath
// javadoc 8 has a bug that requires the rt.jar file from the JRE to be // javadoc 8 has a bug that requires the rt.jar file from the JRE to be
// in the bootclasspath (https://stackoverflow.com/a/30458820). // in the bootclasspath (https://stackoverflow.com/a/30458820).
@ -392,7 +396,7 @@ android.libraryVariants.all { variant ->
} }
checkstyle { checkstyle {
configDir = file(".") configDirectory = file(".")
configFile = file("checkstyle.xml") configFile = file("checkstyle.xml")
toolVersion = "8.36.2" toolVersion = "8.36.2"
} }

View file

@ -98,11 +98,11 @@ def gradle_android_intermediates_folder(build_config):
) )
buildType = uncapitalize(build_config.geckoview.variant.buildType) buildType = uncapitalize(build_config.geckoview.variant.buildType)
return "gradle/build/mobile/android/geckoview/intermediates/javac/{}{}/compile{}{}JavaWithJavac/classes".format( return (
"gradle/build/mobile/android/geckoview/intermediates/javac/{}{}/classes".format(
productFlavor, productFlavor,
capitalize(buildType), capitalize(buildType),
capitalize(productFlavor), )
capitalize(buildType),
) )

View file

@ -89,7 +89,7 @@ class SyncLibsAndUpdateGenerationID extends DefaultTask {
@OutputDirectory @OutputDirectory
File destinationDir File destinationDir
@Input @InputDirectory
File llvmBin = project.ext.getLlvmBinFolder() File llvmBin = project.ext.getLlvmBinFolder()
// Sibling to `.note.gnu.build-id`. // Sibling to `.note.gnu.build-id`.
@ -222,7 +222,7 @@ ext.configureVariantWithGeckoBinaries = { variant ->
}() }()
def syncLibsFromDistDir = { if (shouldUpdateGenerationID) { def syncLibsFromDistDir = { if (shouldUpdateGenerationID) {
def jarTask = tasks["bundleLibRuntime${variant.name.capitalize()}"] def jarTask = tasks["bundleLibRuntimeToJar${variant.name.capitalize()}"]
def bundleJar = jarTask.outputs.files.find({ it.name == 'classes.jar' }) def bundleJar = jarTask.outputs.files.find({ it.name == 'classes.jar' })
task("syncLibsAndUpdateGenerationIDFromDistDirFor${variant.name.capitalize()}", type: SyncLibsAndUpdateGenerationID) { task("syncLibsAndUpdateGenerationIDFromDistDirFor${variant.name.capitalize()}", type: SyncLibsAndUpdateGenerationID) {
@ -292,7 +292,7 @@ ext.configureVariantWithGeckoBinaries = { variant ->
ext.configureLibraryVariantWithJNIWrappers = { variant, module -> ext.configureLibraryVariantWithJNIWrappers = { variant, module ->
// BundleLibRuntime prepares the library for further processing to be // BundleLibRuntime prepares the library for further processing to be
// incorporated in an app. We use this version to create the JNI wrappers. // incorporated in an app. We use this version to create the JNI wrappers.
def jarTask = tasks["bundleLibRuntime${variant.name.capitalize()}"] def jarTask = tasks["bundleLibRuntimeToJar${variant.name.capitalize()}"]
def bundleJar = jarTask.outputs.files.find({ it.name == 'classes.jar' }) def bundleJar = jarTask.outputs.files.find({ it.name == 'classes.jar' })
def annotationProcessorsJarTask = project(':annotations').jar def annotationProcessorsJarTask = project(':annotations').jar

View file

@ -34,10 +34,13 @@ lints:
name: public/code-review/mozlint.json name: public/code-review/mozlint.json
path: /builds/worker/mozlint.json path: /builds/worker/mozlint.json
- name: public/android/geckoview/api.txt - name: public/android/geckoview/api.txt
path: /builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/geckoview/intermediates/javac/withGeckoBinariesDebug/compileWithGeckoBinariesDebugJavaWithJavac/classes/api.txt path: /builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/geckoview/intermediates/javac/withGeckoBinariesDebug/classes/api.txt
type: file
- name: public/android/geckoview/api.txt.map
path: /builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/geckoview/intermediates/javac/withGeckoBinariesDebug/classes/api.txt.map
type: file type: file
- name: public/android/geckoview/apilint-result.json - name: public/android/geckoview/apilint-result.json
path: /builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/geckoview/intermediates/javac/withGeckoBinariesDebug/compileWithGeckoBinariesDebugJavaWithJavac/classes/apilint-result.json path: /builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/geckoview/intermediates/javac/withGeckoBinariesDebug/classes/apilint-result.json
type: file type: file
- name: public/android/geckoview/javadoc-results.json - name: public/android/geckoview/javadoc-results.json
path: /builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/geckoview/reports/javadoc-results-withGeckoBinariesDebug.json path: /builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/geckoview/reports/javadoc-results-withGeckoBinariesDebug.json