Make the java jni_libs property configurable
Bug: 323382414
Bug: 370563864
Test: m nothing --no-skip-soong-tests
Change-Id: Iae8f472c81fbbb192effb4b3cf0066b6160e6b6c
diff --git a/java/ravenwood.go b/java/ravenwood.go
index 9239bbd..4c9fdc2 100644
--- a/java/ravenwood.go
+++ b/java/ravenwood.go
@@ -54,7 +54,7 @@
}
type ravenwoodTestProperties struct {
- Jni_libs []string
+ Jni_libs proptools.Configurable[[]string]
// Specify another android_app module here to copy it to the test directory, so that
// the ravenwood test can access it. This APK will be loaded as resources of the test
@@ -126,7 +126,7 @@
}
// Add jni libs
- for _, lib := range r.ravenwoodTestProperties.Jni_libs {
+ for _, lib := range r.ravenwoodTestProperties.Jni_libs.GetOrDefault(ctx, nil) {
ctx.AddVariationDependencies(ctx.Config().BuildOSTarget.Variations(), jniLibTag, lib)
}
@@ -238,7 +238,7 @@
type ravenwoodLibgroupProperties struct {
Libs []string
- Jni_libs []string
+ Jni_libs proptools.Configurable[[]string]
// We use this to copy framework-res.apk to the ravenwood runtime directory.
Data []string `android:"path,arch_variant"`
@@ -280,7 +280,7 @@
for _, lib := range r.ravenwoodLibgroupProperties.Libs {
ctx.AddVariationDependencies(nil, ravenwoodLibContentTag, lib)
}
- for _, lib := range r.ravenwoodLibgroupProperties.Jni_libs {
+ for _, lib := range r.ravenwoodLibgroupProperties.Jni_libs.GetOrDefault(ctx, nil) {
ctx.AddVariationDependencies(ctx.Config().BuildOSTarget.Variations(), jniLibTag, lib)
}
}