Created kotlinAttributes struct

makes it clearer which attributes are kotlin specific
embedded within javaCommonAttributes since both
java_* and android_* use kotlin.

Change-Id: Ib7c9b912a9901cd1c3d150ab1e0a79011d8e07de
Test: go test ./bp2build
This commit is contained in:
Alix
2023-03-06 22:08:49 +00:00
parent 54d18347cf
commit 75db7840ab
3 changed files with 26 additions and 30 deletions

View File

@@ -1092,11 +1092,6 @@ func (a *AndroidLibrary) ConvertWithBp2build(ctx android.TopDownMutatorContext)
} else if !depLabels.Deps.IsEmpty() {
ctx.ModuleErrorf("Module has direct dependencies but no sources. Bazel will not allow this.")
}
if len(a.properties.Common_srcs) != 0 {
commonAttrs.Common_srcs = bazel.MakeLabelListAttribute(android.BazelLabelForModuleSrc(ctx, a.properties.Common_srcs))
}
name := a.Name()
props := bazel.BazelTargetModuleProperties{
Rule_class: "android_library",