summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
author Jihoon Kang <jihoonkang@google.com> 2024-11-20 21:30:35 +0000
committer Jihoon Kang <jihoonkang@google.com> 2024-11-20 21:30:35 +0000
commit458fde5f93d5127ea2cd82814f1178f9f678ba6b (patch)
tree8e93184138ed6bce27766df1df5eb0d22b2d4edf /java/java.go
parent9ddba9f7de5b3d368544b40418f36649b7145c84 (diff)
Collect aconfig files from *_libs in java_api_library
Aconfig files can be provided to java_api_library in two ways: 1. By specifying the aconfig_declarations module names in the aconfig_declarations property 2. By specifying the java_aconfig_library (or its static rdeps) module names in the libs/static_libs property 1. was behaving as expected for java_api_library, but 2. was not behaving as expected and java_api_library is erroneously not collecting the aconfig files from the libs/static_libs dependencies. This change fixes such broken behavior. Test: CI Bug: 379807097 Change-Id: I1d6d1fa4eae32b4f28e68c88e4e67b2ff7ae7805
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/java/java.go b/java/java.go
index 64ef782f5..260d33610 100644
--- a/java/java.go
+++ b/java/java.go
@@ -2311,14 +2311,17 @@ func (al *ApiLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext) {
case libTag:
if provider, ok := android.OtherModuleProvider(ctx, dep, JavaInfoProvider); ok {
classPaths = append(classPaths, provider.HeaderJars...)
+ al.aconfigProtoFiles = append(al.aconfigProtoFiles, provider.AconfigIntermediateCacheOutputPaths...)
}
case bootClasspathTag:
if provider, ok := android.OtherModuleProvider(ctx, dep, JavaInfoProvider); ok {
bootclassPaths = append(bootclassPaths, provider.HeaderJars...)
+ al.aconfigProtoFiles = append(al.aconfigProtoFiles, provider.AconfigIntermediateCacheOutputPaths...)
}
case staticLibTag:
if provider, ok := android.OtherModuleProvider(ctx, dep, JavaInfoProvider); ok {
staticLibs = append(staticLibs, provider.HeaderJars...)
+ al.aconfigProtoFiles = append(al.aconfigProtoFiles, provider.AconfigIntermediateCacheOutputPaths...)
}
case systemModulesTag:
if sm, ok := android.OtherModuleProvider(ctx, dep, SystemModulesProvider); ok {