summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-09-30 22:06:14 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-09-30 22:06:14 +0000
commit0c8d641426d88c8d7c88b28fa9f7a911012432c4 (patch)
tree51d0c823a1f28a56f5d19ca5285085fa1a4e6875 /java/java.go
parent79e85398f6c7fbbea81433dbaf2e93cb5112707e (diff)
parent6d39c70d0b7e51e2f7c9cd60e733a7d08b62e8b0 (diff)
Merge "Make the java jni_libs property configurable" into main
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go7
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...)
}
}