Closed Bug 1727438 Opened 3 years ago Closed 3 years ago

Define Glean capability for GeckoView

Categories

(GeckoView :: General, task, P1)

Unspecified
All

Tracking

(firefox93 fixed)

RESOLVED FIXED
93 Branch
Tracking Status
firefox93 --- fixed

People

(Reporter: agi, Assigned: agi)

References

Details

Attachments

(5 files)

We noticed that depending on Glean doesn't really work as it creates a circular dependency:

geckoview -> glean -> glean-native (substituted as geckoview)

Since Gradle 6, capabilities can be consumed from libraries using the Gradle Metadata, so we can update to Gradle 6 and offer Glean as a capability in GeckoView directly, fixing the circular dependency.

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>

Assignee: nobody → agi
Status: NEW → ASSIGNED

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

There's a lot of code that we don't need anymore in our publication path (I'm
assuming it was needed when it was written but then gradle/the android plugin
caught up).

This has the nice side effect of producing better metadata (e.g. our
implementation dependencies end up in the |runtime| dependency group instead of
the default one where they were before, which means the app doesn't inherit our
private dependencies).

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

Depending on glean creates a circular dependency as glean depends on
glean-native which is substituted with GeckoView in omni builds.

Since Gradle 6 capabilities are passed on to consumers using the Gradle Module
Metadata, so now we can just define a glean capability in GeckoView and Fenix
will consume glean-native from GeckoView instead of adding a duplicated
libglean blob (there is code in the glean plugin to make sure this happens).

See also: https://docs.gradle.org/current/userguide/component_capabilities.html

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

Pushed by asferro@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/efda82445d85
Upgrade to Gradle 6.9.1. r=nalexander
https://hg.mozilla.org/integration/autoland/rev/00d32a3af979
Upgrade kotlin to 1.5.20. r=nalexander
https://hg.mozilla.org/integration/autoland/rev/8cba5f574196
Import publishing metadata from variant. r=nalexander
https://hg.mozilla.org/integration/autoland/rev/59d1a463178b
Define glean as a capability instead of depending on it. r=nalexander
Regressions: 1727706
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 93 Branch → ---
Severity: -- → S3
Priority: -- → P1

Looks like AC is not ready for runtime dependencies: https://github.com/mozilla-mobile/android-components/issues/10885

Looks like 6G is not enough for an ASAN build when updating the gradle version.
I tried 8G on try but that's not enough either.

Pushed by asferro@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8d03d49fe3a3
Increase java max heap to 16G. r=nalexander
https://hg.mozilla.org/integration/autoland/rev/ebb080f68880
Upgrade to Gradle 6.9.1. r=nalexander,owlish
https://hg.mozilla.org/integration/autoland/rev/97a06ad4cbcc
Upgrade kotlin to 1.5.20. r=nalexander,owlish
https://hg.mozilla.org/integration/autoland/rev/e015a4e8b62e
Import publishing metadata from variant. r=nalexander,owlish
https://hg.mozilla.org/integration/autoland/rev/66bad7f53820
Define glean as a capability instead of depending on it. r=nalexander,owlish
Attachment #9238548 - Attachment description: Bug 1727438 - Increase java max heap to 16G. → Bug 1727438 - Increase java max heap to 32G.
Pushed by asferro@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/839ea7d1556b
Increase java max heap to 32G. r=nalexander,owlish
https://hg.mozilla.org/integration/autoland/rev/eb725677507a
Upgrade to Gradle 6.9.1. r=nalexander,owlish
https://hg.mozilla.org/integration/autoland/rev/559e33eeafa8
Upgrade kotlin to 1.5.20. r=nalexander,owlish
https://hg.mozilla.org/integration/autoland/rev/4db29982dbe2
Import publishing metadata from variant. r=nalexander,owlish
https://hg.mozilla.org/integration/autoland/rev/2c6e3c15b81a
Define glean as a capability instead of depending on it. r=nalexander,owlish

Hopefully third time's the charm!

Flags: needinfo?(agi)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: