From 458fde5f93d5127ea2cd82814f1178f9f678ba6b Mon Sep 17 00:00:00 2001 From: Jihoon Kang Date: Wed, 20 Nov 2024 21:30:35 +0000 Subject: 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 --- java/java.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'java/java.go') 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 { -- cgit v1.2.3-59-g8ed1b