Closed Bug 1557796 Opened 6 years ago Closed 4 years ago

Allow to override mozconfig for Android Studio in local.properties

Categories

(Firefox Build System :: Android Studio and Gradle Integration, enhancement)

enhancement
Not set
normal

Tracking

(firefox94 fixed)

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: nalexander, Assigned: agi)

References

Details

Attachments

(2 files)

Right now, Android Studio never manages the MOZCONFIG environment variable itself. That means that if you're very resourceful, you can make AS use any mozconfig file by setting the environment variable before launching. But on macOS, at least, it's very hard to arrange that: setting env vars for GUI programs has changed in almost every major revision since macOS was released. So for most people that means that we only read mozconfig from the topsrcdir. This surprises people regularly.

We can't really use environment variables for this, but I think we may be able to accommodate a MOZCONFIG-like setting in local.properites. The tricky thing is doing the right thing when MOZCONFIG is set in the environment (say from a env MOZCONFIG=... mach build invocation) and is set in local.properties. What does that do? I guess it should take the MOZCONFIG from the environment variable, to support command line development with multiple mozconfig files.

Product: Firefox for Android → Firefox Build System

I pushed up some sketch of this that I had locally. As I said in #gv on Slack, I cannot for the life of me remember what happened. I may have not needed it or I may have found some issue that I didn’t put in the commit message (but usually I amend with issues for future me to address).

agi: rebase and test my old patch?

Flags: needinfo?(agi)

ah nice. Will do.

Flags: needinfo?(agi)
Assignee: nobody → agi

This patch introduces a new local.settings field: mozilla-central.mozconfig.

This field can be used to set a custom mozconfig file for the gradle build (and
for Android Studio).

The environment variable MOZCONFIG will take precedence over what is defined in
local.settings to allow Gecko engineers to use multiple mozconfig files.

Pushed by asferro@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cbd314b0b9d4 Custom mozconfig for gradle build. r=nalexander,owlish
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: