From 74c9a7758b632e3c44c69db36f48445b7d3561b0 Mon Sep 17 00:00:00 2001 From: Zi Wang Date: Mon, 9 Oct 2023 17:56:06 -0700 Subject: [PATCH] Address comments from aosp/2777928 Test: CI Change-Id: I0d8ee145d797e44338b7eca91fda4177464d7bdb --- android/bazel.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android/bazel.go b/android/bazel.go index 0c65945b0..2e16f3ea2 100644 --- a/android/bazel.go +++ b/android/bazel.go @@ -549,7 +549,8 @@ func (b *BazelModuleBase) shouldConvertWithBp2build(ctx shouldConvertModuleConte // the same name are both allowlisted. This cannot be applied to all the *_import // module types. For example, android_library_import has to use original module // name here otherwise the *-nodeps targets cannot be handled correctly. - if strings.HasPrefix(p.moduleType, "java_import") { + // TODO(b/304385140): remove this special casing + if p.moduleType == "java_import" || p.moduleType == "java_import_host" { moduleName = module.Name() }