[bp2build] android_test bp2build.
android_test is just an android_app, but the test bits are handled
purely in Starlark (tradefed_test_impl).
This enables building HelloWorldTests (android_test) with Bazel.
Bug: 297030120
Bug: 297029612
Test: WIP
Change-Id: I6d287c94b31698ea247da48e4cd6b5a75bc71e11
diff --git a/java/aar.go b/java/aar.go
index 0216196..73f9ff1 100644
--- a/java/aar.go
+++ b/java/aar.go
@@ -1340,7 +1340,10 @@
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()