Merge "Register java_plugin in PrepareForTestWithJavaBuildComponents" am: 5863c2ae65

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1649794

Change-Id: I4c191f302cc6529ea8d94d79b18defab3ac734d4
This commit is contained in:
Paul Duffin 2021-03-24 08:27:31 +00:00 committed by Automerger Merge Worker
commit 9c976257f7
3 changed files with 6 additions and 3 deletions

View File

@ -74,8 +74,6 @@ var prepareForJavaTest = android.GroupFixturePreparers(
PrepareForTestWithOverlayBuildComponents,
python.PrepareForTestWithPythonBuildComponents,
android.FixtureRegisterWithContext(func(ctx android.RegistrationContext) {
ctx.RegisterModuleType("java_plugin", PluginFactory)
ctx.RegisterPreSingletonType("sdk_versions", sdkPreSingletonFactory)
}),
dexpreopt.PrepareForTestWithDexpreopt,

View File

@ -17,7 +17,11 @@ package java
import "android/soong/android"
func init() {
android.RegisterModuleType("java_plugin", PluginFactory)
registerJavaPluginBuildComponents(android.InitRegistrationContext)
}
func registerJavaPluginBuildComponents(ctx android.RegistrationContext) {
ctx.RegisterModuleType("java_plugin", PluginFactory)
}
// A java_plugin module describes a host java library that will be used by javac as an annotation processor.

View File

@ -44,6 +44,7 @@ var PrepareForTestWithJavaBuildComponents = android.GroupFixturePreparers(
android.PrepareForTestWithAndroidBuildComponents,
// Make java build components available to the test.
android.FixtureRegisterWithContext(RegisterRequiredBuildComponentsForTest),
android.FixtureRegisterWithContext(registerJavaPluginBuildComponents),
)
// Test fixture preparer that will define default java modules, e.g. standard prebuilt modules.