Dedup java genrule module type registration
Test: m checkbuild Bug: 146540677 Change-Id: I17f24fe145b4bb453e82aabaecc9c251f2b9769b
This commit is contained in:
parent
884363e782
commit
b0f850784a
2 changed files with 7 additions and 3 deletions
|
@ -20,8 +20,12 @@ import (
|
|||
)
|
||||
|
||||
func init() {
|
||||
android.RegisterModuleType("java_genrule", genRuleFactory)
|
||||
android.RegisterModuleType("java_genrule_host", genRuleFactoryHost)
|
||||
RegisterGenRuleBuildComponents(android.InitRegistrationContext)
|
||||
}
|
||||
|
||||
func RegisterGenRuleBuildComponents(ctx android.RegistrationContext) {
|
||||
ctx.RegisterModuleType("java_genrule", genRuleFactory)
|
||||
ctx.RegisterModuleType("java_genrule_host", genRuleFactoryHost)
|
||||
}
|
||||
|
||||
// java_genrule is a genrule that can depend on other java_* objects.
|
||||
|
|
|
@ -66,8 +66,8 @@ func testContext() *android.TestContext {
|
|||
RegisterJavaBuildComponents(ctx)
|
||||
RegisterAppBuildComponents(ctx)
|
||||
RegisterAARBuildComponents(ctx)
|
||||
RegisterGenRuleBuildComponents(ctx)
|
||||
ctx.RegisterModuleType("java_system_modules", SystemModulesFactory)
|
||||
ctx.RegisterModuleType("java_genrule", genRuleFactory)
|
||||
ctx.RegisterModuleType("java_plugin", PluginFactory)
|
||||
ctx.RegisterModuleType("filegroup", android.FileGroupFactory)
|
||||
ctx.RegisterModuleType("genrule", genrule.GenRuleFactory)
|
||||
|
|
Loading…
Reference in a new issue