From 6d39c70d0b7e51e2f7c9cd60e733a7d08b62e8b0 Mon Sep 17 00:00:00 2001 From: Jihoon Kang Date: Mon, 30 Sep 2024 20:50:38 +0000 Subject: Make the java jni_libs property configurable Bug: 323382414 Bug: 370563864 Test: m nothing --no-skip-soong-tests Change-Id: I11d8350d338e44d27537c6e5529034ba8a38265c --- java/java.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'java/java.go') diff --git a/java/java.go b/java/java.go index ab11363c1..a2a430856 100644 --- a/java/java.go +++ b/java/java.go @@ -1301,7 +1301,7 @@ type testProperties struct { Test_options TestOptions // Names of modules containing JNI libraries that should be installed alongside the test. - Jni_libs []string + Jni_libs proptools.Configurable[[]string] // Install the test into a folder named for the module in all test suites. Per_testcase_directory *bool @@ -1485,10 +1485,11 @@ func (j *TestHost) DepsMutator(ctx android.BottomUpMutatorContext) { } } - if len(j.testProperties.Jni_libs) > 0 { + jniLibs := j.testProperties.Jni_libs.GetOrDefault(ctx, nil) + if len(jniLibs) > 0 { for _, target := range ctx.MultiTargets() { sharedLibVariations := append(target.Variations(), blueprint.Variation{Mutator: "link", Variation: "shared"}) - ctx.AddFarVariationDependencies(sharedLibVariations, jniLibTag, j.testProperties.Jni_libs...) + ctx.AddFarVariationDependencies(sharedLibVariations, jniLibTag, jniLibs...) } } -- cgit v1.2.3-59-g8ed1b