diff options
author | 2021-03-22 15:00:28 +0000 | |
---|---|---|
committer | 2021-03-24 00:01:15 +0000 | |
commit | c029c43c997540632c115f7855ddde5f95c0c49b (patch) | |
tree | 653e03cfd1a1af3094c3717e14caa7a6591bdd7c | |
parent | dca349a7823e6efdfd15965342235077f0d77c60 (diff) |
Register java_plugin in PrepareForTestWithJavaBuildComponents
Bug: 182885307
Test: m nothing
Change-Id: I550d39ba46c548b6b099d8dc6a9c458ca931b2fa
-rw-r--r-- | java/java_test.go | 2 | ||||
-rw-r--r-- | java/plugin.go | 6 | ||||
-rw-r--r-- | java/testing.go | 1 |
3 files changed, 6 insertions, 3 deletions
diff --git a/java/java_test.go b/java/java_test.go index d27a73d30..19d800667 100644 --- a/java/java_test.go +++ b/java/java_test.go @@ -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, diff --git a/java/plugin.go b/java/plugin.go index 947c28626..297ac2cb8 100644 --- a/java/plugin.go +++ b/java/plugin.go @@ -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. diff --git a/java/testing.go b/java/testing.go index b0290dc3d..82a2103fd 100644 --- a/java/testing.go +++ b/java/testing.go @@ -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. |