Enable droidstubs to depend on aconfig_declarations_group module type
This change enabled aconfig_declarations_group module type to be added as `aconfig_declarations` property of droidstubs module. Similar to aconfig_declrations module, the aconfig_declarations_group module provides the intermediate cache files of the aconfig_declarations modules of the listed codegen modules to droidstubs module. Test: m nothing --no-skip-soong-tests Change-Id: I42eb64d3ab65e679ea733c5bb98833971e49a8e8
This commit is contained in:
@@ -21,6 +21,7 @@ import (
|
|||||||
|
|
||||||
"github.com/google/blueprint/proptools"
|
"github.com/google/blueprint/proptools"
|
||||||
|
|
||||||
|
"android/soong/aconfig"
|
||||||
"android/soong/android"
|
"android/soong/android"
|
||||||
"android/soong/java/config"
|
"android/soong/java/config"
|
||||||
)
|
)
|
||||||
@@ -413,9 +414,12 @@ func (j *Javadoc) collectDeps(ctx android.ModuleContext) deps {
|
|||||||
case aconfigDeclarationTag:
|
case aconfigDeclarationTag:
|
||||||
if dep, ok := android.OtherModuleProvider(ctx, module, android.AconfigDeclarationsProviderKey); ok {
|
if dep, ok := android.OtherModuleProvider(ctx, module, android.AconfigDeclarationsProviderKey); ok {
|
||||||
deps.aconfigProtoFiles = append(deps.aconfigProtoFiles, dep.IntermediateCacheOutputPath)
|
deps.aconfigProtoFiles = append(deps.aconfigProtoFiles, dep.IntermediateCacheOutputPath)
|
||||||
|
} else if dep, ok := android.OtherModuleProvider(ctx, module, aconfig.CodegenInfoProvider); ok {
|
||||||
|
deps.aconfigProtoFiles = append(deps.aconfigProtoFiles, dep.IntermediateCacheOutputPaths...)
|
||||||
} else {
|
} else {
|
||||||
ctx.ModuleErrorf("Only aconfig_declarations module type is allowed for "+
|
ctx.ModuleErrorf("Only aconfig_declarations and aconfig_declarations_group "+
|
||||||
"flags_packages property, but %s is not aconfig_declarations module type",
|
"module type is allowed for flags_packages property, but %s is neither "+
|
||||||
|
"of these supported module types",
|
||||||
module.Name(),
|
module.Name(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user