From 2cc80ba1458c2c273fa495e20c3c9286a36373cc Mon Sep 17 00:00:00 2001 From: Spandan Das Date: Fri, 27 Oct 2023 17:21:52 +0000 Subject: 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 --- java/java.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'java/java.go') diff --git a/java/java.go b/java/java.go index bc240508b..ee58ee465 100644 --- a/java/java.go +++ b/java/java.go @@ -1612,6 +1612,7 @@ func BinaryHostFactory() android.Module { type JavaApiContribution struct { android.ModuleBase android.DefaultableModuleBase + embeddableInModuleAndImport properties struct { // name of the API surface @@ -1627,6 +1628,7 @@ func ApiContributionFactory() android.Module { android.InitAndroidModule(module) android.InitDefaultableModule(module) module.AddProperties(&module.properties) + module.initModuleAndImport(module) return module } @@ -1655,6 +1657,7 @@ type ApiLibrary struct { hiddenAPI dexer + embeddableInModuleAndImport properties JavaApiLibraryProperties @@ -1713,6 +1716,7 @@ func ApiLibraryFactory() android.Module { module := &ApiLibrary{} android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibCommon) module.AddProperties(&module.properties) + module.initModuleAndImport(module) android.InitDefaultableModule(module) return module } @@ -3512,6 +3516,7 @@ func ApiContributionImportFactory() android.Module { android.InitDefaultableModule(module) android.InitPrebuiltModule(module, &[]string{""}) module.AddProperties(&module.properties) + module.AddProperties(&module.sdkLibraryComponentProperties) return module } -- cgit v1.2.3-59-g8ed1b