Auto merge of #18680 - MortimerGoro:android_flavors, r=larsbergstrom

Implement Gradle flavors for Android VR compilations

<!-- Please describe your changes on the following line: -->

This PR adds support to easily generate Android VR builds. Rust/Java VR dependencies are not added by default.

Default build (No VR support)
```
./mach build --release --android
./mach package --release --android
./mach install --release --android
```

GoogleVR builds (e.g. Daydream)
```
./mach build --release --android --features googlevr
./mach package --release --android --flavor googlevr
./mach install --release --android
```

OculusVR builds (e.g. Gear VR)
```
./mach build --release --android --features oculusvr
./mach package --release --android --flavor oculusvr
./mach install --release --android
```

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18680)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-09-30 12:17:37 -05:00 committed by GitHub
commit 2567c40829
13 changed files with 132 additions and 21 deletions

View file

@ -17,6 +17,8 @@ max_log_level = ["log/release_max_level_info"]
webdriver = ["webdriver_server"]
energy-profiling = ["profile_traits/energy-profiling"]
debugmozjs = ["script/debugmozjs"]
googlevr = ["webvr/googlevr"]
oculusvr = ["webvr/oculusvr"]
[dependencies]
bluetooth_traits = {path = "../bluetooth_traits"}

View file

@ -9,13 +9,17 @@ publish = false
name = "webvr"
path = "lib.rs"
[features]
googlevr = ['rust-webvr/googlevr']
oculusvr = ['rust-webvr/oculusvr']
[dependencies]
canvas_traits = {path = "../canvas_traits"}
euclid = "0.15"
ipc-channel = "0.8"
log = "0.3"
msg = {path = "../msg"}
rust-webvr = {version = "0.8", features = ["openvr"]}
rust-webvr = {version = "0.9", features = ["openvr"]}
script_traits = {path = "../script_traits"}
servo_config = {path = "../config"}
webvr_traits = {path = "../webvr_traits" }

View file

@ -12,5 +12,5 @@ path = "lib.rs"
[dependencies]
ipc-channel = "0.8"
msg = {path = "../msg"}
rust-webvr-api = {version = "0.8", features = ["serde-serialization"]}
rust-webvr-api = {version = "0.9", features = ["serde-serialization"]}
serde = "1.0"