Add java_sdk_library in bootclasspath_fragment contents to sdk am: a10bd3c127 am: 94a452c768 am: 58fcebb1a7

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

Change-Id: I673fd870c37f11966c4914c033ab8f96b8ece825
This commit is contained in:
Paul Duffin
2021-05-13 23:23:42 +00:00
committed by Automerger Merge Worker
2 changed files with 76 additions and 9 deletions

View File

@@ -61,8 +61,14 @@ func (b bootclasspathFragmentContentDependencyTag) ReplaceSourceWithPrebuilt() b
}
// SdkMemberType causes dependencies added with this tag to be automatically added to the sdk as if
// they were specified using java_boot_libs.
func (b bootclasspathFragmentContentDependencyTag) SdkMemberType(_ android.Module) android.SdkMemberType {
// they were specified using java_boot_libs or java_sdk_libs.
func (b bootclasspathFragmentContentDependencyTag) SdkMemberType(child android.Module) android.SdkMemberType {
// If the module is a java_sdk_library then treat it as if it was specified in the java_sdk_libs
// property, otherwise treat if it was specified in the java_boot_libs property.
if javaSdkLibrarySdkMemberType.IsInstance(child) {
return javaSdkLibrarySdkMemberType
}
return javaBootLibsSdkMemberType
}