Automatically enable webvr for Android VR builds

This commit is contained in:
Manish Goregaokar 2018-11-28 15:39:11 -08:00
parent 6eb396874a
commit d171daa81c
2 changed files with 10 additions and 1 deletions

View file

@ -281,6 +281,15 @@ class PackageCommands(CommandBase):
if flavor is not None:
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
apk_task_name = ":servoapp" + variant
aar_task_name = ":servoview" + variant