Updates to viewer gradle scripts
BUG=skia: Change-Id: Ib847e5ae89d2ac3f496507f69f82f5bac4914f36 Reviewed-on: https://skia-review.googlesource.com/8133 Reviewed-by: Chris Dalton <csmartdalton@google.com>
This commit is contained in:
parent
8b8c76506a
commit
23145a3c5c
@ -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
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user