Closed Bug 1881001 Opened 1 year ago Closed 7 months ago

Use the same AGP version for AC and GeckoView

Categories

(GeckoView :: General, task, P2)

All
Android
task

Tracking

(firefox130 fixed)

RESOLVED FIXED
130 Branch
Tracking Status
firefox130 --- fixed

People

(Reporter: jcristau, Assigned: nicolas.guichard)

References

Details

Attachments

(1 file)

No description provided.

With 8.1.0 or 8.2.2, https://searchfox.org/mozilla-central/rev/97feebcab27f1a92e70ceacaa77211e9eaba0e6e/mobile/android/geckoview/build.gradle#531 ends up with an empty bootClasspath, which breaks the generateSDKBindings task.

Now that we've done the repo migration, we should aim to use ComponentsDependencies.tools_androidgradle in build.gradle and ComponentsDependencies.tools_lint & ComponentsDependencies.tools_lintchecks in mobile/android/annotations/build.gradle from the AC dependencies plugin rather than manually setting versions once the build issues can be identified and fixed.

Summary: Upgrade AGP to 8.2.2+ → Use the same AGP version for AC and GeckoView

We may also need to carry over setting android.enableNewResourceShrinker.preciseShrinking to false in the GV gradle.properties like we're doing for the AGP 8.3.0 update for AC et al.

Component: Core → General

Looks like this is also blocking building GVE with compile SDK 35.
Not sure if Google will fix it ( maybe it is infeasible) or just recommend updating AGP: https://issuetracker.google.com/issues/343592384

When trying to add AC/Fenix/Focus/Klar to mach android compile-all I got hit by this:

Could not determine the dependencies of task ':browser-domains:compileReleaseJavaWithJavac'.
> Could not determine the dependencies of null.
   > Failed to find Build Tools revision 30.0.3

I tracked this down to AGP 8.0.2 defaulting to Build Tools 30.0.3 but that version was removed from the android-sdk-linux toolchain. GeckoView has an explicit buildToolsVersion set but not the other projects. It looks like they all ended up using the same AGP 8.0.2 but only GeckoView used Build Tools 34.0.0.

I have a fix for this that I'll send for review shortly.

Blocks: 1893181

Delaying the definition of the generateSDKBindings task ensures the
android.bootClasspath has been populated.

Updating AGP apparently changes the location of apilint-result.json.

Assignee: nobody → nicolas.guichard
Status: NEW → ASSIGNED
Attachment #9411092 - Attachment description: Bug 1881001 - Use the same AGP version for AC and GeckoView. r=RyanVM! → Bug 1881001 - Use the same AGP version for AC and GeckoView. r=nalexander!

Regarding comment 4, I tested the attached patch added to my patch and it solves the issue I reported.

Pushed by rvandermeulen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bb385d942e86 Use the same AGP version for AC and GeckoView. r=geckoview-reviewers,nalexander,owlish
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 130 Branch
Regressions: 1909623
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: