Make 'mach package' part of 'mach build' for mobile/android
Categories
(GeckoView :: General, enhancement, P3)
Tracking
(firefox68 wontfix, firefox69 wontfix, firefox70 fixed)
People
(Reporter: snorp, Assigned: nalexander)
References
(Blocks 5 open bugs)
Details
Attachments
(2 files)
I don't think I have ever run 'mach build' w/o 'mach package'. We should just put it all in the same command.
Assignee | ||
Comment 2•6 years ago
|
||
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) (he/him) from comment #1)
Nick, is this reasonable?
We could definitely make mach build
also do mach package
for certain apps, namely mobile/android
. But (part of) the reason this all sucks so much is that no other app regularly packages as part of development at all; local builds of Desktop use a flat format, not an omnijar, and hence don't need to package. (Or to produce an APK.)
Technically this is still very hard; that's why we still have packaging at all.
We already fold packaging into the Gradle commands -- under the hood, we're running mach build faster
and mach stage-package
-- it just isn't all there for non-artifact builds. We could improve that.
But making mach build
also do mach package
, at least for local builds -- yeah, that's not too hard.
Updated•6 years ago
|
Comment 3•6 years ago
|
||
Or include mach package
into mach run
?
Assignee | ||
Comment 4•6 years ago
|
||
(In reply to Chris Peterson [:cpeterson] from comment #3)
Or include
mach package
intomach run
?
This is the prize winning idea so far. I recall another conversation where gbrown (I think) was saying that we should make mach run
install GVE (more generally, the target), and I didn't want to do that across the board; but this convinces me that I am wrong.
The principle concern that I voice in https://bugzilla.mozilla.org/show_bug.cgi?id=1550146#c2 is that changing mach build
could have unintended consequences. But nobody really uses mach run
on Android (and my work on Bug 1521996 has stalled) so we can radically change what mach run
means without fear of consequences.
I will take this as a call to revisit Bug 1521996 and make ./mach run
be "get this built object directory onto the device and invoke the target". Thanks, Chris!
Assignee | ||
Comment 5•5 years ago
|
||
Depends on D41448
Assignee | ||
Comment 6•5 years ago
|
||
Android artifacts (GeckoView AARs, GeckoViewExample (and Fennec) APKs)
require native libraries (libxul.so
) and an omnijar (omni.ja
).
These are produced by mach package
. Engineers essentially never
want a build without a package for mobile/android. This adds
mobile/android-only tiers that run mach package
and then mach android assemble-app
. The latter consumes libxul.so
and omni.ja
to produce all the things relevant to GeckoView engineers.
Depends on D41449
Assignee | ||
Comment 7•5 years ago
|
||
Fresh try is percolating at https://treeherder.mozilla.org/#/jobs?repo=try&revision=0d88681b337088abcd0efae119b850a5b8f45415.
Updated•5 years ago
|
Assignee | ||
Comment 8•5 years ago
|
||
(In reply to Nick Alexander :nalexander [he/him] from comment #7)
Fresh try is percolating at https://treeherder.mozilla.org/#/jobs?repo=try&revision=0d88681b337088abcd0efae119b850a5b8f45415.
This is looking good. The Ngv orange is Bug 1573751.
Assignee | ||
Comment 10•5 years ago
|
||
So, after all the discussion, we ended up doing what was originally asked for, which is to package (really, stage-package
, for technical reasons) during mach build
. That allows us to run mach android assemble-app
during mach build
(and after stage-package
), which makes mach build
produce All The Things for GeckoView and unlocks deeper simplifications in the future.
Assignee | ||
Updated•5 years ago
|
Comment 11•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e4eb5e085f39
https://hg.mozilla.org/mozilla-central/rev/ce76e1a54a3c
Updated•5 years ago
|
Description
•