bp2build support libs for *->android_library_import

Test: bp2build tests
Bug: 258688914
Change-Id: Ibeae04e4c006f84f902774821c92f463a7c709eb
This commit is contained in:
Alix
2023-01-06 03:42:07 +00:00
parent f02c7d882e
commit 14101de2e1
2 changed files with 16 additions and 0 deletions

View File

@@ -1041,6 +1041,21 @@ func (a *AARImport) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
},
)
neverlink := true
ctx.CreateBazelTargetModule(
bazel.BazelTargetModuleProperties{
Rule_class: "android_library",
Bzl_load_location: "//build/bazel/rules/android:rules.bzl",
},
android.CommonAttributes{Name: name + "-neverlink"},
&bazelAndroidLibrary{
javaLibraryAttributes: &javaLibraryAttributes{
Neverlink: bazel.BoolAttribute{Value: &neverlink},
Exports: bazel.MakeSingleLabelListAttribute(bazel.Label{Label: ":" + name}),
},
},
)
}
func (a *AndroidLibrary) ConvertWithBp2build(ctx android.TopDownMutatorContext) {