From 6f907ad3ddad9eb0e928ff7ad7965fa17a8a6946 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Mon, 16 Dec 2019 13:40:14 -0800 Subject: Also package recursive jni_libs deps of android_apps as well as direct deps. Previously, android_app targets for which a.shouldEmbedJnis(ctx) = true (e.g. CtsSelinuxTargetSdk25TestCases) would need to specify all of their recursive library dependencies, including for example libc++ when depending on the platform libc++. This means unnecessary churn when we add a new dependency to libc++ (e.g. libunwind [1]). To avoid the churn and allow jni_libs clauses to be simplified, make the build system search for the recursive dependencies and automatically include them. This change allows us to remove code that was previously adding NDK libc++ as a special case, as it is now covered by the generic code. Also fix some improper quoting that was exposed as a result of this change causing more files to be packaged than before. [1] https://android-review.googlesource.com/q/topic:%22libunwind-so%22 Bug: 144430859 Change-Id: I3d6fbcce75bc108a982eb7483992a4b202056339 --- java/app_builder.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'java/app_builder.go') diff --git a/java/app_builder.go b/java/app_builder.go index ec2f6dafe..5e7fbe6de 100644 --- a/java/app_builder.go +++ b/java/app_builder.go @@ -200,14 +200,14 @@ func TransformJniLibsToJar(ctx android.ModuleContext, outputFile android.Writabl } if uncompressJNI { - jarArgs = append(jarArgs, "-L 0") + jarArgs = append(jarArgs, "-L", "0") } for _, j := range jniLibs { deps = append(deps, j.path) jarArgs = append(jarArgs, - "-P "+targetToJniDir(j.target), - "-f "+j.path.String()) + "-P", targetToJniDir(j.target), + "-f", j.path.String()) } ctx.Build(pctx, android.BuildParams{ -- cgit v1.2.3-59-g8ed1b