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:37:34 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2024-09-30 22:37:34 +0000
commitdc393f0addb2a4413741590ae7f69494094f72b7 (patch)
tree4e2c5e3821d54740d140eb8617192cbbc1d9fe19 /java/java.go
parentc43a8841597b4dbe95ab8088d672774c3f4ecb9b (diff)
parent36d573a83f33b9f6fad29a881421d6a933cc613c (diff)
Merge "Make the java jni_libs property configurable" into main am: 0c8d641426 am: 36d573a83f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3288256 Change-Id: I280702451ba5c0066c10a9535bb9290b3365011f 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...)
}
}