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:17:47 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2024-09-30 22:17:47 +0000
commit36d573a83f33b9f6fad29a881421d6a933cc613c (patch)
tree51d0c823a1f28a56f5d19ca5285085fa1a4e6875 /java/java.go
parent1e0bdb392f2bfbc20ae6d591ea9c3c6378b40ef6 (diff)
parent0c8d641426d88c8d7c88b28fa9f7a911012432c4 (diff)
Merge "Make the java jni_libs property configurable" into main am: 0c8d641426
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3288256 Change-Id: I76aeeda9b2653b1e5951a2b53ca9f52546da75c3 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
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...)
}
}