Update AGP to version 8.6.0
Categories
(Firefox Build System :: Android Studio and Gradle Integration, task)
Tracking
(firefox132 fixed)
| Tracking | Status | |
|---|---|---|
| firefox132 | --- | fixed |
People
(Reporter: RyanVM, Assigned: RyanVM)
References
Details
Attachments
(4 files)
I've done a bit of poking at updating from AGP 8.4 to AGP 8.5, but we're hitting a NPE during the GeckoView part of the build that I haven't been able to investigate. Now that this is blocking bug 1906365, we probably need another set of eyes on it.
https://treeherder.mozilla.org/logviewer?job_id=470327063&repo=try&lineNumber=3082
> Task :geckoview:compileWithGeckoBinariesDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
> Task :geckoview:bundleLibRuntimeToJarWithGeckoBinariesDebug
> Task :geckoview:generateJNIWrappersForGeneratedWithGeckoBinariesDebug FAILED
FAILURE: Build failed with an exception.
* Where:
Script '/builds/worker/workspace/build/src/mobile/android/gradle/with_gecko_binaries.gradle' line: 54
* What went wrong:
Execution failed for task ':geckoview:generateJNIWrappersForGeneratedWithGeckoBinariesDebug'.
> java.lang.NullPointerException (no error message)
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 2m 58s
I'll attach the WIP patches.
| Assignee | ||
Comment 1•1 year ago
|
||
| Assignee | ||
Comment 2•1 year ago
|
||
| Assignee | ||
Comment 3•1 year ago
|
||
Per https://issuetracker.google.com/issues/352722605. Removing the lines
completely caused the test to fail, but setting to DEFAULT works.
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Comment 4•1 year ago
|
||
I took a look at the NullPointerException in with_gecko_binaries.gradle: it seems that variant.javaCompileProvider.get().classpath.from indeed contains a null (is that an AGP bug?). Calling classpath.from(variant.javaCompileProvider.get().classpath) eventually calls ImmutableList.Builder<Object>.add(null) which asserts (IMO Gradle should either disallow nulls earlier when populating ConfigurableFileCollections, or allow nulls here too).
This works around the issue:
doFirst {
- classpath variant.javaCompileProvider.get().classpath
+ classpath variant.javaCompileProvider.get().classpath.files
}
Note that this is what we already do in geckoview/build.gradle#281.
I've launched a Try build with this at https://treeherder.mozilla.org/jobs?repo=try&revision=f7c3851031f3b56af9ae4e037d8ce068caf2c518. It hasn't failed so far.
| Assignee | ||
Comment 5•1 year ago
|
||
Nice find!
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Comment 6•1 year ago
|
||
Updated•1 year ago
|
Comment 8•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/6211d4d7d9da
https://hg.mozilla.org/mozilla-central/rev/553e602078db
https://hg.mozilla.org/mozilla-central/rev/cf8566ff2f8c
https://hg.mozilla.org/mozilla-central/rev/fa82550a0b9e
Comment 9•1 year ago
|
||
Is there a chance that these patches affected the runtime behavior of Fenix? We're seeing a 25% improvement on cold_view_nav_start startup time and it seems to have been caused by this push:
https://treeherder.mozilla.org/perfherder/graphs?highlightAlerts=1&highlightChangelogData=1&highlightCommonAlerts=0&replicates=0&series=autoland,4677531,1,15&timerange=2592000&zoom=1725449005001,1725449745633,1296.5752405809328,1606.1430059964293
| Assignee | ||
Comment 10•1 year ago
|
||
Maybe from an updated D8/R8? Below is a list of changes that went into it in case anything stands out.
https://developer.android.com/studio/releases/fixed-bugs/studio/2024.1.2
Description
•