add apex_defaults
apex_defaults is the default module for apex.
Bug: 124026431
Test: m (apex_test updated)
Change-Id: I09f63046e909e8eeb52ecec6bb07eb51e5490561
diff --git a/apex/apex.go b/apex/apex.go
index 06e6c78..092868e 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -137,6 +137,7 @@
pctx.HostBinToolVariable("zipalign", "zipalign")
android.RegisterModuleType("apex", ApexBundleFactory)
+ android.RegisterModuleType("apex_defaults", defaultsFactory)
android.PostDepsMutators(func(ctx android.RegisterMutatorsContext) {
ctx.TopDown("apex_deps", apexDepsMutator)
@@ -1103,3 +1104,31 @@
android.InitDefaultableModule(module)
return module
}
+
+//
+// Defaults
+//
+type Defaults struct {
+ android.ModuleBase
+ android.DefaultsModuleBase
+}
+
+func (*Defaults) GenerateAndroidBuildActions(ctx android.ModuleContext) {
+}
+
+func defaultsFactory() android.Module {
+ return DefaultsFactory()
+}
+
+func DefaultsFactory(props ...interface{}) android.Module {
+ module := &Defaults{}
+
+ module.AddProperties(props...)
+ module.AddProperties(
+ &apexBundleProperties{},
+ &apexTargetBundleProperties{},
+ )
+
+ android.InitDefaultsModule(module)
+ return module
+}