Merge "[bp2build] android_test bp2build." into main

This commit is contained in:
Jingwen Chen
2023-09-18 23:27:14 +00:00
committed by Gerrit Code Review
5 changed files with 73 additions and 24 deletions

View File

@@ -1340,7 +1340,10 @@ func (a *AndroidLibrary) ConvertWithBp2build(ctx android.TopDownMutatorContext)
if !commonAttrs.Srcs.IsEmpty() {
deps.Append(depLabels.StaticDeps) // we should only append these if there are sources to use them
} else if !depLabels.Deps.IsEmpty() {
ctx.ModuleErrorf("Module has direct dependencies but no sources. Bazel will not allow this.")
ctx.MarkBp2buildUnconvertible(
bp2build_metrics_proto.UnconvertedReasonType_UNSUPPORTED,
"Module has direct dependencies but no sources. Bazel will not allow this.")
return
}
name := a.Name()
props := AndroidLibraryBazelTargetModuleProperties()