bp2build for java_library with .kt srcs or common_srcs

java_library modules with .kt srcs or common_srcs will be converted into
module type kt_jvm_library

Test: m bp2build, manually inspected build files for allowlisted modules
Bug: 258688914
Change-Id: I8293a11c8247b4b76358d0991f82c6b61b58adc3
This commit is contained in:
Alix
2022-11-14 21:38:07 +00:00
parent 877336cc3a
commit 8062f4dee7
6 changed files with 99 additions and 17 deletions

View File

@@ -66,7 +66,8 @@ type pluginAttributes struct {
// ConvertWithBp2build is used to convert android_app to Bazel.
func (p *Plugin) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
pluginName := p.Name()
commonAttrs, depLabels := p.convertLibraryAttrsBp2Build(ctx)
commonAttrs, bp2BuildInfo := p.convertLibraryAttrsBp2Build(ctx)
depLabels := bp2BuildInfo.DepLabels
deps := depLabels.Deps
deps.Append(depLabels.StaticDeps)