Closed Bug 1541820 Opened 7 years ago Closed 6 years ago

Implement a gradle plugin for Glean

Categories

(Data Platform and Tools :: Glean: SDK, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Dexter, Assigned: mdroettboom)

References

Details

(Whiteboard: [telemetry:glean-rs:m8])

Attachments

(1 file)

When using gradle's "offline" mode, building products using glean fails with this error:

FAILURE: Build failed with an exception.

  • Where:

Build file '/Users/XXX/src/reference-browser/app/build.gradle' line: 261

  • What went wrong:

A problem occurred evaluating project ':app'.

Could not get resource 'https://github.com/mozilla-mobile/android-components/raw/master/components/service/glean/scripts/sdk_generator.gradle'.
Could not HEAD 'https://github.com/mozilla-mobile/android-components/raw/master/components/service/glean/scripts/sdk_generator.gradle'.
> github.com: nodename nor servname provided, or not known

Type: defect → enhancement
Priority: -- → P3
Whiteboard: [telemetry:mobilesdk:m?]
See Also: → 1520499
Whiteboard: [telemetry:mobilesdk:m?] → [telemetry:mobilesdk:backlog]
Component: Telemetry → Glean: SDK
Product: Toolkit → Data Platform and Tools
Version: Trunk → unspecified
Whiteboard: [telemetry:mobilesdk:backlog] → [telemetry:glean-rs:m?]
Blocks: 1520499
Whiteboard: [telemetry:glean-rs:m?] → [telemetry:glean-rs:m9]
Assignee: nobody → mdroettboom
Blocks: 1577152
Whiteboard: [telemetry:glean-rs:m9] → [telemetry:glean-rs:m8]
Blocks: 1579541
Blocks: 1535258
Blocks: 1588098
Summary: Allow to use 'glean' when using gradle "offline" mode for building the product → Implement a gradle plugin for Glean

Some questions as I come back to this work:

  • I see that Fenix now has both an android components version and a mozilla-glean version, which I presume must be kept in sync. We can make gradle plugin releases in tandem with glean-core releases, so we can use the same mozilla-glean version number for both glean-core and the gradle plugin. However, what happens if android-components and mozilla-glean are not a matched pair (which doesn't necessarily mean the same version number...)?

  • I'm not aware of any projects linking to the sdk_generator.gradle file in the mozilla/glean repo (only the one in android-components). I think it makes sense to keep it like that -- let's migrate all the projects from the sdk_generator.gradle in a-c to the plugin in mozilla/glean in one step. Agree?

Flags: needinfo?(jrediger)

Agree, but this Android stuff and what repos to pull in where seems like :dexter-territory.

Flags: needinfo?(jrediger) → needinfo?(alessio.placitelli)

(In reply to Michael Droettboom [:mdroettboom] from comment #3)

Some questions as I come back to this work:

  • I see that Fenix now has both an android components version and a mozilla-glean version, which I presume must be kept in sync.

Yes, bug 1588098 tracks the work to address that.

We can make gradle plugin releases in tandem with glean-core releases, so we can use the same mozilla-glean version number for both glean-core and the gradle plugin. However, what happens if android-components and mozilla-glean are not a matched pair (which doesn't necessarily mean the same version number...)?

Yes, this is a good potential solution! As long as there's no mismatch between the version of mozilla-glean used in a-c and the one that the gradle-plugin makes the product use, we should be fine. Otherwise... we'll potentially crash in tests :)

  • I'm not aware of any projects linking to the sdk_generator.gradle file in the mozilla/glean repo (only the one in android-components). I think it makes sense to keep it like that -- let's migrate all the projects from the sdk_generator.gradle in a-c to the plugin in mozilla/glean in one step. Agree?

Yes, I agree :)

Flags: needinfo?(alessio.placitelli)

It feels really good to close this one.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: