Add the name of the sdk library to dynamically generated java modules
The name of the sdk library will be used in source vs prebuilt
selection. For soong modules that are not dynamically created from a
java_sdk_library, the value will be nil.
Bug: 308174768
Test: TH
Change-Id: Ic7e9889f00c6184992b663a7124967bb0794d475
diff --git a/java/droidstubs.go b/java/droidstubs.go
index a7e8eb6..c000ac3 100644
--- a/java/droidstubs.go
+++ b/java/droidstubs.go
@@ -48,6 +48,7 @@
// Droidstubs
type Droidstubs struct {
Javadoc
+ embeddableInModuleAndImport
properties DroidstubsProperties
apiFile android.Path
@@ -184,6 +185,7 @@
module.AddProperties(&module.properties,
&module.Javadoc.properties)
+ module.initModuleAndImport(module)
InitDroiddocModule(module, android.HostAndDeviceSupported)
@@ -930,6 +932,8 @@
type PrebuiltStubsSources struct {
android.ModuleBase
android.DefaultableModuleBase
+ embeddableInModuleAndImport
+
prebuilt android.Prebuilt
properties PrebuiltStubsSourcesProperties
@@ -1008,6 +1012,7 @@
module := &PrebuiltStubsSources{}
module.AddProperties(&module.properties)
+ module.initModuleAndImport(module)
android.InitPrebuiltModule(module, &module.properties.Srcs)
InitDroiddocModule(module, android.HostAndDeviceSupported)