Merge "Automatically export bootclasspath_fragment stubs from sdk" am: 59dc69c2c7
am: 510e829ea5
am: 92659f37b3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689068 Change-Id: Ie02075fd7521b5f1d4c10440157c0b79fa7d11f1
This commit is contained in:
commit
466563d5c9
|
@ -33,6 +33,21 @@ func (b hiddenAPIStubsDependencyTag) ReplaceSourceWithPrebuilt() bool {
|
|||
return false
|
||||
}
|
||||
|
||||
func (b hiddenAPIStubsDependencyTag) SdkMemberType(child android.Module) android.SdkMemberType {
|
||||
// If the module is a java_sdk_library then treat it as if it was specific in the java_sdk_libs
|
||||
// property, otherwise treat if it was specified in the java_header_libs property.
|
||||
if javaSdkLibrarySdkMemberType.IsInstance(child) {
|
||||
return javaSdkLibrarySdkMemberType
|
||||
}
|
||||
|
||||
return javaHeaderLibsSdkMemberType
|
||||
}
|
||||
|
||||
func (b hiddenAPIStubsDependencyTag) ExportMember() bool {
|
||||
// Export the module added via this dependency tag from the sdk.
|
||||
return true
|
||||
}
|
||||
|
||||
// Avoid having to make stubs content explicitly visible to dependent modules.
|
||||
//
|
||||
// This is a temporary workaround to make it easier to migrate to bootclasspath_fragment modules
|
||||
|
@ -44,6 +59,7 @@ func (b hiddenAPIStubsDependencyTag) ExcludeFromVisibilityEnforcement() {
|
|||
var _ android.ExcludeFromVisibilityEnforcementTag = hiddenAPIStubsDependencyTag{}
|
||||
var _ android.ReplaceSourceWithPrebuilt = hiddenAPIStubsDependencyTag{}
|
||||
var _ android.ExcludeFromApexContentsTag = hiddenAPIStubsDependencyTag{}
|
||||
var _ android.SdkMemberTypeDependencyTag = hiddenAPIStubsDependencyTag{}
|
||||
|
||||
// hiddenAPIRelevantSdkKinds lists all the android.SdkKind instances that are needed by the hidden
|
||||
// API processing.
|
||||
|
|
|
@ -339,12 +339,7 @@ func init() {
|
|||
})
|
||||
|
||||
// Register sdk member types.
|
||||
android.RegisterSdkMemberType(&sdkLibrarySdkMemberType{
|
||||
android.SdkMemberTypeBase{
|
||||
PropertyName: "java_sdk_libs",
|
||||
SupportsSdk: true,
|
||||
},
|
||||
})
|
||||
android.RegisterSdkMemberType(javaSdkLibrarySdkMemberType)
|
||||
}
|
||||
|
||||
func RegisterSdkLibraryBuildComponents(ctx android.RegistrationContext) {
|
||||
|
@ -2377,6 +2372,13 @@ func (s *sdkLibrarySdkMemberType) CreateVariantPropertiesStruct() android.SdkMem
|
|||
return &sdkLibrarySdkMemberProperties{}
|
||||
}
|
||||
|
||||
var javaSdkLibrarySdkMemberType = &sdkLibrarySdkMemberType{
|
||||
android.SdkMemberTypeBase{
|
||||
PropertyName: "java_sdk_libs",
|
||||
SupportsSdk: true,
|
||||
},
|
||||
}
|
||||
|
||||
type sdkLibrarySdkMemberProperties struct {
|
||||
android.SdkMemberPropertiesBase
|
||||
|
||||
|
|
Loading…
Reference in New Issue