diff options
Diffstat (limited to 'platform_tools')
-rw-r--r-- | platform_tools/android/apps/build.gradle | 8 | ||||
-rwxr-xr-x | platform_tools/android/bin/android_build_app | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/platform_tools/android/apps/build.gradle b/platform_tools/android/apps/build.gradle index ee279e8b91..08dbc9f4f6 100644 --- a/platform_tools/android/apps/build.gradle +++ b/platform_tools/android/apps/build.gradle @@ -28,8 +28,10 @@ def setupSkiaLibraryBuild(project, appVariants, appName) { buildNativeLib.onlyIf { !project.hasProperty("suppressNativeBuild") } def copyNativeLib = project.task("${variant.name}_CopySkiaLib", type:Copy) { - from getVariantOutDir(project, variant).skiaOut - into getVariantOutDir(project, variant).androidOut + def fromDir = "../../../../" + getVariantOutDir(project, variant).skiaOut + def intoDir = getVariantOutDir(project, variant).androidOut + from fromDir + into intoDir include "${appName}.so" } @@ -38,7 +40,7 @@ def setupSkiaLibraryBuild(project, appVariants, appName) { it.name.toLowerCase().contains("compile" + variant.name.toLowerCase()) && it.name.toLowerCase().endsWith("ndk") } - compileTask.getAt(0).dependsOn copyNativeLib + compileTask.findAll()*.dependsOn copyNativeLib copyNativeLib.dependsOn buildNativeLib } } diff --git a/platform_tools/android/bin/android_build_app b/platform_tools/android/bin/android_build_app index cd044c1468..7ce13013f8 100755 --- a/platform_tools/android/bin/android_build_app +++ b/platform_tools/android/bin/android_build_app @@ -28,7 +28,7 @@ if args.output_dir == None: args_gn_path = os.path.join(args.output_dir, "args.gn") if os.path.exists(args_gn_path): for line in open(args_gn_path): - m = re.match('target_cpu = "(.*)"', line.strip()) + m = re.match('target_cpu ?= ?"(.*)"', line.strip()) if m: target_cpu = m.group(1) @@ -52,7 +52,7 @@ try: subprocess.check_call(['./apps/gradlew', ':viewer:assemble' + android_variant + android_buildtype, '-papps/' + args.app_name, - '-P' + target_cpu + 'out.dir=' + args.output_dir, + '-P' + target_cpu + '.out.dir=' + args.output_dir, '--daemon'], cwd=os.path.join(os.path.dirname(__file__), "..")) except subprocess.CalledProcessError as error: print error |