mirror of
https://github.com/servo/servo.git
synced 2025-06-30 12:03:38 +01:00
Automatically enable webvr for Android VR builds
This commit is contained in:
parent
6eb396874a
commit
d171daa81c
2 changed files with 10 additions and 1 deletions
|
@ -281,6 +281,15 @@ class PackageCommands(CommandBase):
|
||||||
if flavor is not None:
|
if flavor is not None:
|
||||||
flavor_name = flavor.title()
|
flavor_name = flavor.title()
|
||||||
|
|
||||||
|
vr = flavor == "googlevr" or flavor == "oculusvr"
|
||||||
|
|
||||||
|
dir_to_resources = path.join(self.get_top_dir(), 'target', 'android', 'resources')
|
||||||
|
if path.exists(dir_to_resources):
|
||||||
|
delete(dir_to_resources)
|
||||||
|
|
||||||
|
shutil.copytree(path.join(dir_to_root, 'resources'), dir_to_resources)
|
||||||
|
change_prefs(dir_to_resources, "android", vr=vr)
|
||||||
|
|
||||||
variant = ":assemble" + flavor_name + build_type + build_mode
|
variant = ":assemble" + flavor_name + build_type + build_mode
|
||||||
apk_task_name = ":servoapp" + variant
|
apk_task_name = ":servoapp" + variant
|
||||||
aar_task_name = ":servoview" + variant
|
aar_task_name = ":servoview" + variant
|
||||||
|
|
|
@ -111,7 +111,7 @@ android {
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
assets.srcDirs = ['../../../../resources']
|
assets.srcDirs = [rootDir.absolutePath + "/../../../target/android/resources"]
|
||||||
}
|
}
|
||||||
armDebug {
|
armDebug {
|
||||||
jniLibs.srcDirs = [getJniLibsPath(true, 'arm')]
|
jniLibs.srcDirs = [getJniLibsPath(true, 'arm')]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue