Closed Bug 1233882 Opened 9 years ago Closed 9 years ago

Fold base Gradle project into app Gradle project

Categories

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

defect
Not set
normal

Tracking

(firefox47 fixed)

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: nalexander, Assigned: nalexander)

References

Details

Attachments

(1 file)

Right now, base is where the action is, and app is a shell project. This is something a left-over from the Eclipse days, where it the org.mozilla.fennec/org.mozilla.gecko split was hard to handle. Gradle is more flexible, and we should be able to set the org.mozilla.fennec name as the applicationId and maintain org.mozilla.gecko as the resource package name. (There are technical blockers based on the fact that we don't currently use a manifest merger for this functionality in moz.build.) If we do this, we get: 1) better support for Instant Run, since App projects are better supported than library projects; 2) slightly faster builds; 3) better linting. I expect that improving the linting will make it easier to implement Android 6.0 permissions, since the linter will likely warn when things need to change.
The android:packageName setting is temporary; I'll find a way to make this better before landing. I want to get a few folks to run this commit locally, and I'd like whatever comments on the lint output mcomella may have. Review commit: https://reviewboard.mozilla.org/r/31269/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/31269/
Attachment #8709114 - Flags: review?(s.kaspari)
Attachment #8709114 - Flags: review?(michael.l.comella)
sebastian, mcomella: if you can cherry pick this commit or skim it, I'd appreciate it. vivek: I'd really appreciate help filing and mentoring tickets to address the worst lint failures this exposes. I see about 1100 locally, some of which are really bad, but most of which are easy to address. After applying these patches, run |./mach gradle lint| and you should get a nice report.
Flags: needinfo?(vivekb.balakrishnan)
(In reply to Nick Alexander :nalexander from comment #1) > Created attachment 8709114 [details] > MozReview Request: Bug 1233882 - Fold base Gradle project into app Gradle > project. r?sebastian,mcomella > > The android:packageName setting is temporary; I'll find a way to make > this better before landing. I want to get a few folks to run this > commit locally, and I'd like whatever comments on the lint output > mcomella may have. > > Review commit: https://reviewboard.mozilla.org/r/31269/diff/#index_header > See other reviews: https://reviewboard.mozilla.org/r/31269/ Worth noting that the combination of Gradle 2.10, com.android.tools.build:gradle:2.0.0-alpha6, and Android Studio 2.0.0 Preview 5 pegs dx in the IDE. (Builds from the command line work fine.)
Attachment #8709114 - Flags: review?(s.kaspari) → review+
Comment on attachment 8709114 [details] MozReview Request: Bug 1233882 - Fold base Gradle project into app Gradle project. r?sebastian,mcomella https://reviewboard.mozilla.org/r/31269/#review28047 Code looks good. The patch doesn't apply cleanly though.
Comment on attachment 8709114 [details] MozReview Request: Bug 1233882 - Fold base Gradle project into app Gradle project. r?sebastian,mcomella https://reviewboard.mozilla.org/r/31269/#review28533 I specifically reviewed the lint portions of this. I can't run this locally due to other errors from the commits this builds off of. However, the configuration looks good so r+. That being said, caveat: since we're adding more code (from app) to our config, we'll probably start to have errors again (as opposed to warnings; undoes bug 1177781). So we'll have to fix that.
Component: Build Config → Build Config & IDE Support
Product: Core → Firefox for Android
Status: NEW → ASSIGNED
Flags: needinfo?(vivekb.balakrishnan)
Sadly, this relied on the little bit of Bug 1242213 that I had to back out. We'll find a way to address this next week.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 47
Product: Firefox for Android → Firefox Build System
Target Milestone: Firefox 47 → mozilla47
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: