Merge "java_sdk_library: Remove requirement for api_packages to be specified" am: 36809d52ba am: 160434a8d7

Change-Id: Ief7a4816309df491204892b9ebc56a404eaf8f5e
This commit is contained in:
Automerger Merge Worker 2020-01-03 13:45:08 +00:00
commit 710c7d3d0e

View file

@ -97,7 +97,10 @@ type sdkLibraryProperties struct {
// List of Java libraries that will be in the classpath when building stubs
Stub_only_libs []string `android:"arch_variant"`
// list of package names that will be documented and publicized as API
// list of package names that will be documented and publicized as API.
// This allows the API to be restricted to a subset of the source files provided.
// If this is unspecified then all the source files will be treated as being part
// of the API.
Api_packages []string
// list of package names that must be hidden from the API
@ -707,11 +710,6 @@ func (module *SdkLibrary) CreateInternalModules(mctx android.LoadHookContext) {
return
}
if len(module.sdkLibraryProperties.Api_packages) == 0 {
mctx.PropertyErrorf("api_packages", "java_sdk_library must specify api_packages")
return
}
// If this builds against standard libraries (i.e. is not part of the core libraries)
// then assume it provides both system and test apis. Otherwise, assume it does not and
// also assume it does not contribute to the dist build.