Register java_plugin in PrepareForTestWithJavaBuildComponents

Bug: 182885307
Test: m nothing
Change-Id: I550d39ba46c548b6b099d8dc6a9c458ca931b2fa
This commit is contained in:
Paul Duffin 2021-03-22 15:00:28 +00:00
parent dca349a782
commit c029c43c99
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.