Bug 1881001 - Use the same AGP version for AC and GeckoView. r=geckoview-reviewers,nalexander,owlish
Delaying the definition of the generateSDKBindings task's arguments ensures the android.bootClasspath has been populated. Updating AGP apparently changes the default location of apilint's apilint-result.json and api.txt, this moves them to a less foreign location. Unfortunately apilint only seems to use relative paths here. Differential Revision: https://phabricator.services.mozilla.com/D215654
This commit is contained in:
@@ -25,7 +25,7 @@ buildscript {
|
||||
|
||||
dependencies {
|
||||
classpath 'org.mozilla.apilint:apilint:0.5.3'
|
||||
classpath 'com.android.tools.build:gradle:8.0.2' // Bug 1881001 for using AC version
|
||||
classpath ComponentsDependencies.tools_androidgradle
|
||||
classpath 'org.apache.commons:commons-exec:1.3'
|
||||
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.25.0'
|
||||
classpath 'org.tomlj:tomlj:1.1.0'
|
||||
|
||||
@@ -2,12 +2,9 @@ buildDir "${topobjdir}/gradle/build/mobile/android/annotations"
|
||||
|
||||
apply plugin: 'java'
|
||||
|
||||
// lint should be X+23.Y.Z of gradle_plugin version, according to:
|
||||
// http://googlesamples.github.io/android-custom-lint-rules/api-guide.html#example:samplelintcheckgithubproject/lintversion?
|
||||
|
||||
dependencies {
|
||||
implementation 'com.android.tools.lint:lint:30.4.2'
|
||||
implementation 'com.android.tools.lint:lint-checks:30.4.2'
|
||||
implementation ComponentsDependencies.tools_lint
|
||||
implementation ComponentsDependencies.tools_lintchecks
|
||||
}
|
||||
|
||||
java {
|
||||
|
||||
@@ -511,14 +511,15 @@ task("generateSDKBindings", type: JavaExec) {
|
||||
]
|
||||
|
||||
mainClass = 'org.mozilla.gecko.annotationProcessors.SDKProcessor'
|
||||
// We only want to generate bindings for the main framework JAR,
|
||||
// but not any of the additional android.test libraries.
|
||||
args android.bootClasspath.findAll { it.getName().startsWith('android.jar') }
|
||||
args 29
|
||||
args "${topobjdir}/widget/android/bindings"
|
||||
|
||||
// Configure the arguments at evaluation-time, not at configuration-time.
|
||||
doFirst {
|
||||
// We only want to generate bindings for the main framework JAR,
|
||||
// but not any of the additional android.test libraries.
|
||||
args android.bootClasspath.findAll { it.getName().startsWith('android.jar') }
|
||||
args 29
|
||||
args "${topobjdir}/widget/android/bindings"
|
||||
|
||||
// From -Pgenerate_sdk_bindings_args=... on command line; missing in
|
||||
// `android-gradle-dependencies` toolchain task.
|
||||
if (project.hasProperty('generate_sdk_bindings_args')) {
|
||||
@@ -537,6 +538,10 @@ apiLint {
|
||||
// TODO: Change this to `org` after hiding org.mozilla.gecko
|
||||
packageFilter = 'org.mozilla.geckoview'
|
||||
changelogFileName = 'src/main/java/org/mozilla/geckoview/doc-files/CHANGELOG.md'
|
||||
// Put those files in ${buildDir}/intermediates/javac/<variant>
|
||||
// instead of ${buildDir}/intermediates/javac/<variant>/compile<Variant>JavaWithJavac/classes
|
||||
jsonResultFileName = '../../apilint-result.json'
|
||||
apiOutputFileName = '../../api.txt'
|
||||
skipClassesRegex = [
|
||||
'^org.mozilla.geckoview.BuildConfig$',
|
||||
'^org.mozilla.geckoview.R$',
|
||||
|
||||
@@ -98,11 +98,9 @@ def gradle_android_intermediates_folder(build_config):
|
||||
)
|
||||
buildType = uncapitalize(build_config.geckoview.variant.buildType)
|
||||
|
||||
return (
|
||||
"gradle/build/mobile/android/geckoview/intermediates/javac/{}{}/classes".format(
|
||||
productFlavor,
|
||||
capitalize(buildType),
|
||||
)
|
||||
return "gradle/build/mobile/android/geckoview/intermediates/javac/{}{}".format(
|
||||
productFlavor,
|
||||
capitalize(buildType),
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -34,13 +34,13 @@ lints:
|
||||
name: public/code-review/mozlint.json
|
||||
path: /builds/worker/mozlint.json
|
||||
- name: public/android/geckoview/api.txt
|
||||
path: /builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/geckoview/intermediates/javac/withGeckoBinariesDebug/classes/api.txt
|
||||
path: /builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/geckoview/intermediates/javac/withGeckoBinariesDebug/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
|
||||
path: /builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/geckoview/intermediates/javac/withGeckoBinariesDebug/api.txt.map
|
||||
type: file
|
||||
- name: public/android/geckoview/apilint-result.json
|
||||
path: /builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/geckoview/intermediates/javac/withGeckoBinariesDebug/classes/apilint-result.json
|
||||
path: /builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/geckoview/intermediates/javac/withGeckoBinariesDebug/apilint-result.json
|
||||
type: file
|
||||
- name: public/android/geckoview/javadoc-results.json
|
||||
path: /builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/geckoview/reports/javadoc-results-withGeckoBinariesDebug.json
|
||||
|
||||
Reference in New Issue
Block a user