Use LoadHook to create modules in java_sdk_library
Creating new modules in a mutator is dangerous, as other mutators that need to see the new modules may already have run, in this case the prebuilts mutator. Move SdkLibraryMutator to a LoadHook instead. Also moves registering the LoadHook mutator to testing.go so it is registered for all tests. Test: m checkbuild Change-Id: I08bd76a0e6205d2ca27861058067a1562c339eed
This commit is contained in:
@@ -94,7 +94,6 @@ func testContext(config android.Config, bp string,
|
||||
ctx.PreArchMutators(android.RegisterOverridePreArchMutators)
|
||||
ctx.PreArchMutators(func(ctx android.RegisterMutatorsContext) {
|
||||
ctx.TopDown("prebuilt_apis", PrebuiltApisMutator).Parallel()
|
||||
ctx.TopDown("java_sdk_library", SdkLibraryMutator).Parallel()
|
||||
})
|
||||
ctx.RegisterPreSingletonType("overlay", android.SingletonFactoryAdaptor(OverlaySingletonFactory))
|
||||
ctx.RegisterPreSingletonType("sdk", android.SingletonFactoryAdaptor(sdkSingletonFactory))
|
||||
|
Reference in New Issue
Block a user