From 5f83b491b4b14bf17b9dd7fbc3ec9d0b061190de Mon Sep 17 00:00:00 2001 From: Sam Delmerico Date: Mon, 28 Feb 2022 18:50:56 +0000 Subject: convert java_import_host with bp2build; enable jetifier Also, add java_imports that were blocked by jetifier binary. b/221082840 was blocking the build of jetifier which these java_imports depended on. That bug is now resolved, so we can unblock these targets. Bug: 220168131 Test: b build //packages/apps/Car/libs/car-ui-lib/car-ui-androidx/... Test: build/bazel/ci/bp2build.sh Change-Id: I89a32bde30c133a44aeb7826afa11d4140433f5d --- java/java.go | 1 + 1 file changed, 1 insertion(+) (limited to 'java/java.go') diff --git a/java/java.go b/java/java.go index 8ae14803f..831d60731 100644 --- a/java/java.go +++ b/java/java.go @@ -1725,6 +1725,7 @@ func ImportFactoryHost() android.Module { android.InitPrebuiltModule(module, &module.properties.Jars) android.InitApexModule(module) + android.InitBazelModule(module) InitJavaModule(module, android.HostSupported) return module } -- cgit v1.2.3 From 77267c7d9c998ebe8b651bfd0e82edbca21d16eb Mon Sep 17 00:00:00 2001 From: Sam Delmerico Date: Fri, 18 Mar 2022 14:11:07 +0000 Subject: add plugins to javaLibraryAttributes Test: go test ./bp2build Change-Id: I8e4c3f373c62c60ea5013cd8c585915a366c1f81 --- java/java.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'java/java.go') diff --git a/java/java.go b/java/java.go index 831d60731..1b6e559b3 100644 --- a/java/java.go +++ b/java/java.go @@ -2026,6 +2026,7 @@ func addCLCFromDep(ctx android.ModuleContext, depModule android.Module, type javaCommonAttributes struct { Srcs bazel.LabelListAttribute + Plugins bazel.LabelListAttribute Javacopts bazel.StringListAttribute } @@ -2061,6 +2062,9 @@ func (m *Library) convertLibraryAttrsBp2Build(ctx android.TopDownMutatorContext) commonAttrs := &javaCommonAttributes{ Srcs: srcPartitions[javaSrcPartition], + Plugins: bazel.MakeLabelListAttribute( + android.BazelLabelForModuleDeps(ctx, m.properties.Plugins), + ), } if m.properties.Javacflags != nil { -- cgit v1.2.3