Closed
Bug 1208793
Opened 9 years ago
Closed 9 years ago
Reduce number of Gradle projects in Fennec |mach gradle| build
Categories
(Firefox Build System :: Android Studio and Gradle Integration, defect)
Firefox Build System
Android Studio and Gradle Integration
Tracking
(firefox44 fixed)
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: nalexander, Assigned: nalexander)
References
Details
Attachments
(4 files)
40 bytes,
text/x-review-board-request
|
sebastian
:
review+
|
Details |
40 bytes,
text/x-review-board-request
|
sebastian
:
review+
|
Details |
MozReview Request: Bug 1208793 - Part 3: Remove 'preprocessed_resources' Gradle project. r?sebastian
40 bytes,
text/x-review-board-request
|
sebastian
:
review+
|
Details |
40 bytes,
text/x-review-board-request
|
sebastian
:
review+
|
Details |
Right now, we have many Gradle projects that go into building the main :app project. Every Gradle operation performs a multi-project configure step, which is not cheap. (Seconds, IIRC.)
The multiple projects are a left-over from how I coerced Eclipse into producing Fennec. Gradle is much more flexible and many of these extra projects aren't necessary.
In particular, we should be able to trivially fold :branding into :base. I expect a small amount of work will let us fold :preprocessed_code and :preprocessed_resources into :base as well.
There's an advantage to having /some/ code splitting, since compiling and dexing monolithic blogs is expensive. So I wouldn't fold :thirdparty into :base, since it's basically fixed and untouched each incremental build.
Assignee | ||
Comment 1•9 years ago
|
||
Bug 1208793 - Part 1: Fix gradle-targets dependencies. r?sebastian
We were both lazy and incomplete before. Lazy because .aapt.deps is a
sentinel, and doesn't necessarily see relevant changes, due to
timestamps and deletions. Incomplete because we never forced
generated Java code to be fresh.
Attachment #8676029 -
Flags: review?(s.kaspari)
Assignee | ||
Comment 2•9 years ago
|
||
Bug 1208793 - Part 2: Remove 'branding' Gradle project. r?sebastian
Technically, branding should be part of the App and not GeckoView, but
we don't have separated resources yet, so in it goes.
Attachment #8676030 -
Flags: review?(s.kaspari)
Assignee | ||
Comment 3•9 years ago
|
||
Bug 1208793 - Part 3: Remove 'preprocessed_resources' Gradle project. r?sebastian
While testing, I found some issues with the existing dependencies. To
address them, I've made all project preBuild tasks depend on the
(single) root generateCodeAndResources; this should ensure that the
Make integration happens as early as possible. In addition, I fixed
the dependencies syncing the generated resources into the build
directory, which weren't quite right. This works well locally now.
Attachment #8676031 -
Flags: review?(s.kaspari)
Assignee | ||
Comment 4•9 years ago
|
||
Bug 1208793 - Part 4: Remove 'preprocessed_code' Gradle project. r?sebastian
This needed the same dependency changes that the previous part did.
There's a nice simplification here because some of the code is now
being compiled in the containing project (base) and not the (now
removed) sibling project.
Attachment #8676032 -
Flags: review?(s.kaspari)
Assignee | ||
Comment 5•9 years ago
|
||
sebastian: it's my belief that we don't need a "Gradle clobber" for the |mach gradle-install| changes. There will be old files in $OBJDIR/mobile/android/gradle/{old-project}, but since settings.gradle no longer longer refers to 'old-project' it should all work.
Assignee: nobody → nalexander
Status: NEW → ASSIGNED
Comment 6•9 years ago
|
||
Comment on attachment 8676029 [details]
MozReview Request: Bug 1208793 - Part 1: Fix gradle-targets dependencies. r?sebastian
https://reviewboard.mozilla.org/r/22541/#review20083
Attachment #8676029 -
Flags: review?(s.kaspari) → review+
Comment 7•9 years ago
|
||
Comment on attachment 8676030 [details]
MozReview Request: Bug 1208793 - Part 2: Remove 'branding' Gradle project. r?sebastian
https://reviewboard.mozilla.org/r/22543/#review20085
Attachment #8676030 -
Flags: review?(s.kaspari) → review+
Updated•9 years ago
|
Attachment #8676031 -
Flags: review?(s.kaspari) → review+
Comment 8•9 years ago
|
||
Comment on attachment 8676031 [details]
MozReview Request: Bug 1208793 - Part 3: Remove 'preprocessed_resources' Gradle project. r?sebastian
https://reviewboard.mozilla.org/r/22545/#review20087
Comment 9•9 years ago
|
||
Comment on attachment 8676032 [details]
MozReview Request: Bug 1208793 - Part 4: Remove 'preprocessed_code' Gradle project. r?sebastian
https://reviewboard.mozilla.org/r/22547/#review20089
Attachment #8676032 -
Flags: review?(s.kaspari) → review+
Comment 10•9 years ago
|
||
I tested those patches along with the ones from bug 1216430 and bug 1216434. It just works. No issues! :)
(In reply to Nick Alexander :nalexander from comment #5)
> sebastian: it's my belief that we don't need a "Gradle clobber" for the
> |mach gradle-install| changes. There will be old files in
> $OBJDIR/mobile/android/gradle/{old-project}, but since settings.gradle no
> longer longer refers to 'old-project' it should all work.
Yeah, |mach gradle-install| was enough to get a working gradle build after applying the patches. However I needed to re-import the project into IntelliJ. Without that it refused to use the new gradle configuration.
Assignee | ||
Comment 11•9 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/caaa8c13b98f458d1ea7424881f92196bfd99aac
Bug 1208793 - Part 1: Fix gradle-targets dependencies. r=sebastian
https://hg.mozilla.org/integration/fx-team/rev/eae251eb922efb66b0fd985f92c8e52f1a16d430
Bug 1208793 - Part 2: Remove 'branding' Gradle project. r=sebastian
https://hg.mozilla.org/integration/fx-team/rev/d12ef59cbae5529866519f80a07138d1f8cc858d
Bug 1208793 - Part 3: Remove 'preprocessed_resources' Gradle project. r=sebastian
https://hg.mozilla.org/integration/fx-team/rev/27b83dafe62594dfafb630af5e13f9c806137a12
Bug 1208793 - Part 4: Remove 'preprocessed_code' Gradle project. r=sebastian
https://hg.mozilla.org/mozilla-central/rev/caaa8c13b98f
https://hg.mozilla.org/mozilla-central/rev/eae251eb922e
https://hg.mozilla.org/mozilla-central/rev/d12ef59cbae5
https://hg.mozilla.org/mozilla-central/rev/27b83dafe625
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Assignee | ||
Updated•7 years ago
|
Component: Build Config → Build Config & IDE Support
Product: Core → Firefox for Android
Target Milestone: mozilla44 → ---
Updated•6 years ago
|
Product: Firefox for Android → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•