Add back the api_srcs argument
This arg provides the ability to pass sources to the metalava invocations that are part of a java_sdk_library without affecting the runtime library. This is useful in various scenarios, e.g.: when javadoc in some source files affects the metalava behavior. For example, the javadoc-generation javadoc tags @paramDoc, @returnDoc etc. Passing these as a library does not work because class files do not contain javadoc. Bug: 186197911 Test: manually inspect module stub src for doc enhancements Merged-In: I2ce98f891283514e1896c52d9335550c1f5435fb Change-Id: I2ce98f891283514e1896c52d9335550c1f5435fb
This commit is contained in:
@@ -376,6 +376,9 @@ type ApiScopeProperties struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type sdkLibraryProperties struct {
|
type sdkLibraryProperties struct {
|
||||||
|
// List of source files that are needed to compile the API, but are not part of runtime library.
|
||||||
|
Api_srcs []string `android:"arch_variant"`
|
||||||
|
|
||||||
// Visibility for impl library module. If not specified then defaults to the
|
// Visibility for impl library module. If not specified then defaults to the
|
||||||
// visibility property.
|
// visibility property.
|
||||||
Impl_library_visibility []string
|
Impl_library_visibility []string
|
||||||
@@ -1438,6 +1441,7 @@ func (module *SdkLibrary) createStubsSourcesAndApi(mctx android.DefaultableHookC
|
|||||||
props.Name = proptools.StringPtr(name)
|
props.Name = proptools.StringPtr(name)
|
||||||
props.Visibility = childModuleVisibility(module.sdkLibraryProperties.Stubs_source_visibility)
|
props.Visibility = childModuleVisibility(module.sdkLibraryProperties.Stubs_source_visibility)
|
||||||
props.Srcs = append(props.Srcs, module.properties.Srcs...)
|
props.Srcs = append(props.Srcs, module.properties.Srcs...)
|
||||||
|
props.Srcs = append(props.Srcs, module.sdkLibraryProperties.Api_srcs...)
|
||||||
props.Sdk_version = module.deviceProperties.Sdk_version
|
props.Sdk_version = module.deviceProperties.Sdk_version
|
||||||
props.System_modules = module.deviceProperties.System_modules
|
props.System_modules = module.deviceProperties.System_modules
|
||||||
props.Installable = proptools.BoolPtr(false)
|
props.Installable = proptools.BoolPtr(false)
|
||||||
|
Reference in New Issue
Block a user