Dedup prebuilt apis module type/mutator registration
Test: m checkbuild Bug: 146540677 Change-Id: If5d6fdace2574df6314fbcf6441838cd11df58ae
This commit is contained in:
@@ -74,13 +74,12 @@ func testContext() *android.TestContext {
|
||||
RegisterDocsBuildComponents(ctx)
|
||||
RegisterStubsBuildComponents(ctx)
|
||||
RegisterSdkLibraryBuildComponents(ctx)
|
||||
ctx.RegisterModuleType("prebuilt_apis", PrebuiltApisFactory)
|
||||
ctx.PreArchMutators(android.RegisterPrebuiltsPreArchMutators)
|
||||
ctx.PreArchMutators(android.RegisterPrebuiltsPostDepsMutators)
|
||||
ctx.PreArchMutators(android.RegisterDefaultsPreArchMutators)
|
||||
ctx.PreArchMutators(func(ctx android.RegisterMutatorsContext) {
|
||||
ctx.TopDown("prebuilt_apis", PrebuiltApisMutator).Parallel()
|
||||
})
|
||||
|
||||
RegisterPrebuiltApisBuildComponents(ctx)
|
||||
|
||||
ctx.PostDepsMutators(android.RegisterOverridePostDepsMutators)
|
||||
ctx.RegisterPreSingletonType("overlay", android.SingletonFactoryAdaptor(OverlaySingletonFactory))
|
||||
ctx.RegisterPreSingletonType("sdk_versions", android.SingletonFactoryAdaptor(sdkPreSingletonFactory))
|
||||
|
@@ -23,9 +23,13 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
android.RegisterModuleType("prebuilt_apis", PrebuiltApisFactory)
|
||||
RegisterPrebuiltApisBuildComponents(android.InitRegistrationContext)
|
||||
}
|
||||
|
||||
android.PreArchMutators(func(ctx android.RegisterMutatorsContext) {
|
||||
func RegisterPrebuiltApisBuildComponents(ctx android.RegistrationContext) {
|
||||
ctx.RegisterModuleType("prebuilt_apis", PrebuiltApisFactory)
|
||||
|
||||
ctx.PreArchMutators(func(ctx android.RegisterMutatorsContext) {
|
||||
ctx.TopDown("prebuilt_apis", PrebuiltApisMutator).Parallel()
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user