Disable full_api_surface_stubs for some java_api_library modules am: d30ac8a32a am: 7292538264

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2769782

Change-Id: I22f37cf976310c0cdd4f94c468035355e4cc701b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jihoon Kang
2023-10-16 17:07:31 +00:00
committed by Automerger Merge Worker

View File

@@ -1876,6 +1876,14 @@ func (module *SdkLibrary) createApiLibrary(mctx android.DefaultableHookContext,
props.Full_api_surface_stub = proptools.StringPtr(apiScope.kind.DefaultJavaLibraryName() + "_full.from-text")
}
// java_sdk_library modules that set sdk_version as none does not depend on other api
// domains. Therefore, java_api_library created from such modules should not depend on
// full_api_surface_stubs but create and compile stubs by the java_api_library module
// itself.
if module.SdkVersion(mctx).Kind == android.SdkNone {
props.Full_api_surface_stub = nil
}
props.System_modules = module.deviceProperties.System_modules
mctx.CreateModule(ApiLibraryFactory, &props)