diff --git a/python/servo/package_commands.py b/python/servo/package_commands.py index 3d6e191a7316..5449cfc509a3 100644 --- a/python/servo/package_commands.py +++ b/python/servo/package_commands.py @@ -281,6 +281,15 @@ def package(self, release=False, dev=False, android=None, magicleap=None, debug= 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 diff --git a/support/android/apk/servoview/build.gradle b/support/android/apk/servoview/build.gradle index 257742af8264..0e97838f8168 100644 --- a/support/android/apk/servoview/build.gradle +++ b/support/android/apk/servoview/build.gradle @@ -111,7 +111,7 @@ android { sourceSets { main { - assets.srcDirs = ['../../../../resources'] + assets.srcDirs = [rootDir.absolutePath + "/../../../target/android/resources"] } armDebug { jniLibs.srcDirs = [getJniLibsPath(true, 'arm')]