summaryrefslogtreecommitdiff
path: root/java/genrule.go
diff options
context:
space:
mode:
author Paul Duffin <paulduffin@google.com> 2019-12-19 10:28:56 +0000
committer Paul Duffin <paulduffin@google.com> 2019-12-19 19:19:40 +0000
commitb0f850784acef479cfc1b351ffb6196f12ebda85 (patch)
tree6f3e74e76a6da0984e3bcd6028f3bc25341f7ad2 /java/genrule.go
parent884363e782dbd15b980640a1071c8c271315f474 (diff)
Dedup java genrule module type registration
Test: m checkbuild Bug: 146540677 Change-Id: I17f24fe145b4bb453e82aabaecc9c251f2b9769b
Diffstat (limited to 'java/genrule.go')
-rw-r--r--java/genrule.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/java/genrule.go b/java/genrule.go
index 25494ec8a..e0a9c8faf 100644
--- a/java/genrule.go
+++ b/java/genrule.go
@@ -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.