Add jarjar_prefix propagation support for aconfig_declarations_group module type

jarjar_prefix propagation logic currently depends on the type of the
providers of the dependencies, thus the logic needs to be updated when a
new provider is added. Since `aconfig_declarations_group` module type
utilizes its custom provider "CodegenInfoProvider", this change adds
jarjar_prefix propagation support for this provider.

Test: Set aconfig_declaration module's exportable property to true && m framework-minus-apex and inspect if "repackaged-jarjar" subdir exists in outdir
Bug: 310504781
Change-Id: I1689027d7810687a53ec34b9cfda479806f2ec87
This commit is contained in:
Jihoon Kang
2024-02-16 22:22:18 +00:00
parent e4c98ae235
commit 03d014ff2b

View File

@@ -26,6 +26,7 @@ import (
"github.com/google/blueprint/pathtools"
"github.com/google/blueprint/proptools"
"android/soong/aconfig"
"android/soong/android"
"android/soong/dexpreopt"
"android/soong/java/config"
@@ -2544,6 +2545,8 @@ func collectDirectDepsProviders(ctx android.ModuleContext) (result *JarJarProvid
default:
return RenameUseExclude, "srcfile"
}
} else if _, ok := android.OtherModuleProvider(ctx, m, aconfig.CodegenInfoProvider); ok {
return RenameUseInclude, "aconfig_declarations_group"
} else {
switch tag {
case bootClasspathTag: