Closed Bug 1190940 Opened 9 years ago Closed 9 years ago

Handle MOZ_NATIVE_DEVICES and MOZ_WEBRTC in Gradle build

Categories

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

defect
Not set
normal

Tracking

(firefox42 fixed)

RESOLVED FIXED
Tracking Status
firefox42 --- fixed

People

(Reporter: nalexander, Assigned: nalexander)

References

Details

Attachments

(1 file)

I found these in early try pushes for Bug 1119520.  We don't do the right thing in all of our build configurations; this ticket tracks fixing a few of them.
Bug 1190940 - Handle MOZ_NATIVE_DEVICES and MOZ_WEBRTC in Gradle build. r?skaspari

This is an information sharing review request.  This patch
demonstrates to ways to handle static build flags in the Java source
base.

For MOZ_NATIVE_DEVICES, we /exclude/ certain Java source files.  This
is unwieldy but works fine.

For MOZ_WEBRTC, we selectively /include/ certain Javas source
directories.  We symlink the directories into the objdir so that the
IntelliJ configuration remains entirely under the project directory --
IJ really doesn't like it when sources are outside of the project
content root.  Since two source directories declare the same package
(org.webrtc.videoengine) we can't symlink deep in the package
hierarchy.  Therefore, we add top-level source directories sibling to
src/main.
Attachment #8643148 - Flags: review?(s.kaspari)
Comment on attachment 8643148 [details]
MozReview Request: Bug 1190940 - Handle MOZ_NATIVE_DEVICES and MOZ_WEBRTC in Gradle build. r?skaspari

https://reviewboard.mozilla.org/r/14991/#review13469

Btw. there's a typo in the commit description: "This patch demonstrates t(W)o ways [..]"
Attachment #8643148 - Flags: review?(s.kaspari) → review+
url:        https://hg.mozilla.org/integration/fx-team/rev/437a166ba6ed525ee544b46c58270202d79a59a1
changeset:  437a166ba6ed525ee544b46c58270202d79a59a1
user:       Nick Alexander <nalexander@mozilla.com>
date:       Tue Aug 04 10:01:26 2015 -0700
description:
Bug 1190940 - Handle MOZ_NATIVE_DEVICES and MOZ_WEBRTC in Gradle build. r=sebastian

This is an information sharing review request.  This patch
demonstrates two ways to handle static build flags in the Java source
base.

For MOZ_NATIVE_DEVICES, we /exclude/ certain Java source files.  This
is unwieldy but works fine.

For MOZ_WEBRTC, we selectively /include/ certain Javas source
directories.  We symlink the directories into the objdir so that the
IntelliJ configuration remains entirely under the project directory --
IJ really doesn't like it when sources are outside of the project
content root.  Since two source directories declare the same package
(org.webrtc.videoengine) we can't symlink deep in the package
hierarchy.  Therefore, we add top-level source directories sibling to
src/main.
Assignee: nobody → nalexander
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/437a166ba6ed
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Component: Build Config → Build Config & IDE Support
Product: Core → Firefox for Android
Target Milestone: mozilla42 → ---
Product: Firefox for Android → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: