diff options
author | 2024-09-30 22:06:14 +0000 | |
---|---|---|
committer | 2024-09-30 22:06:14 +0000 | |
commit | 0c8d641426d88c8d7c88b28fa9f7a911012432c4 (patch) | |
tree | 51d0c823a1f28a56f5d19ca5285085fa1a4e6875 /java/java.go | |
parent | 79e85398f6c7fbbea81433dbaf2e93cb5112707e (diff) | |
parent | 6d39c70d0b7e51e2f7c9cd60e733a7d08b62e8b0 (diff) |
Merge "Make the java jni_libs property configurable" into main
Diffstat (limited to 'java/java.go')
-rw-r--r-- | java/java.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/java/java.go b/java/java.go index 92dcc6322..661422b54 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...) } } |