Merge "Do not convert android_library_import with no aars." into main am: 832e131725 am: 51cab22f4e am: 2682639f03 am: f1037ec0eb am: 8d9d976c0d

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2760791

Change-Id: I039fd28954fbe6fa0b9900090d2d3fa29b6a9578
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Romain Jobredeaux
2023-09-27 00:26:56 +00:00
committed by Automerger Merge Worker
2 changed files with 30 additions and 11 deletions

View File

@@ -1278,6 +1278,10 @@ func (a *aapt) convertAaptAttrsWithBp2Build(ctx android.Bp2buildMutatorContext)
}
func (a *AARImport) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
if len(a.properties.Aars) == 0 {
ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_PROPERTY_UNSUPPORTED, "aars can't be empty")
return
}
aars := android.BazelLabelForModuleSrcExcludes(ctx, a.properties.Aars, []string{})
exportableStaticLibs := []string{}
// TODO(b/240716882): investigate and handle static_libs deps that are not imports. They are not supported for export by Bazel.