Merge "Add apex_available aidl + aidl&lang libraries" am: 8fdb210be2 am: 67c5d36be5 am: 663faa6f80

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

Change-Id: I3f3dc62bcd62e1a8901536ad4849285c00c86d50
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2023-03-25 02:18:12 +00:00
committed by Automerger Merge Worker
8 changed files with 55 additions and 14 deletions

View File

@@ -2624,10 +2624,12 @@ type eventLogTagsAttributes struct {
type aidlLibraryAttributes struct {
Srcs bazel.LabelListAttribute
Tags bazel.StringListAttribute
}
type javaAidlLibraryAttributes struct {
Deps bazel.LabelListAttribute
Tags bazel.StringListAttribute
}
// bp2BuildJavaInfo has information needed for the conversion of java*_modules
@@ -2699,6 +2701,8 @@ func (m *Library) convertLibraryAttrsBp2Build(ctx android.TopDownMutatorContext)
return android.IsConvertedToAidlLibrary(ctx, src.OriginalModuleName)
})
apexAvailableTags := android.ApexAvailableTags(ctx.Module())
if !aidlSrcs.IsEmpty() {
aidlLibName := m.Name() + "_aidl_library"
ctx.CreateBazelTargetModule(
@@ -2709,6 +2713,7 @@ func (m *Library) convertLibraryAttrsBp2Build(ctx android.TopDownMutatorContext)
android.CommonAttributes{Name: aidlLibName},
&aidlLibraryAttributes{
Srcs: aidlSrcs,
Tags: apexAvailableTags,
},
)
aidlLibs.Add(&bazel.LabelAttribute{Value: &bazel.Label{Label: ":" + aidlLibName}})
@@ -2723,6 +2728,7 @@ func (m *Library) convertLibraryAttrsBp2Build(ctx android.TopDownMutatorContext)
android.CommonAttributes{Name: javaAidlLibName},
&javaAidlLibraryAttributes{
Deps: aidlLibs,
Tags: apexAvailableTags,
},
)