Remove ConvertWithBp2build implementations

Remove the ConvertWithBp2build implementations from all the module
types, along with the related code.

Bug: 315353489
Test: m blueprint_tests
Change-Id: I212672286686a318893bc7348ddd5a5ec51e77a7
diff --git a/aconfig/Android.bp b/aconfig/Android.bp
index 04de919..fed4190 100644
--- a/aconfig/Android.bp
+++ b/aconfig/Android.bp
@@ -11,7 +11,6 @@
         "sbox_proto",
         "soong",
         "soong-android",
-        "soong-bazel",
     ],
     srcs: [
         "aconfig_declarations.go",
diff --git a/aconfig/aconfig_declarations.go b/aconfig/aconfig_declarations.go
index 9bf7564..593ccc0 100644
--- a/aconfig/aconfig_declarations.go
+++ b/aconfig/aconfig_declarations.go
@@ -19,7 +19,6 @@
 	"strings"
 
 	"android/soong/android"
-	"android/soong/bazel"
 
 	"github.com/google/blueprint"
 )
@@ -27,7 +26,6 @@
 type DeclarationsModule struct {
 	android.ModuleBase
 	android.DefaultableModuleBase
-	android.BazelModuleBase
 
 	// Properties for "aconfig_declarations"
 	properties struct {
@@ -53,7 +51,6 @@
 	android.InitAndroidModule(module)
 	android.InitDefaultableModule(module)
 	module.AddProperties(&module.properties)
-	android.InitBazelModule(module)
 
 	return module
 }
@@ -232,26 +229,3 @@
 
 	return android.Paths{output}
 }
-
-type bazelAconfigDeclarationsAttributes struct {
-	Srcs    bazel.LabelListAttribute
-	Package string
-}
-
-func (module *DeclarationsModule) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	if ctx.ModuleType() != "aconfig_declarations" {
-		return
-	}
-	srcs := bazel.MakeLabelListAttribute(android.BazelLabelForModuleSrc(ctx, module.properties.Srcs))
-
-	attrs := bazelAconfigDeclarationsAttributes{
-		Srcs:    srcs,
-		Package: module.properties.Package,
-	}
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "aconfig_declarations",
-		Bzl_load_location: "//build/bazel/rules/aconfig:aconfig_declarations.bzl",
-	}
-
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: module.Name()}, &attrs)
-}
diff --git a/aconfig/aconfig_value_set.go b/aconfig/aconfig_value_set.go
index cd178d4..94c322a 100644
--- a/aconfig/aconfig_value_set.go
+++ b/aconfig/aconfig_value_set.go
@@ -16,7 +16,6 @@
 
 import (
 	"android/soong/android"
-	"android/soong/bazel"
 	"github.com/google/blueprint"
 )
 
@@ -24,7 +23,6 @@
 type ValueSetModule struct {
 	android.ModuleBase
 	android.DefaultableModuleBase
-	android.BazelModuleBase
 
 	properties struct {
 		// aconfig_values modules
@@ -38,7 +36,6 @@
 	android.InitAndroidModule(module)
 	android.InitDefaultableModule(module)
 	module.AddProperties(&module.properties)
-	android.InitBazelModule(module)
 
 	return module
 }
@@ -91,23 +88,3 @@
 		AvailablePackages: packages,
 	})
 }
-
-type bazelAconfigValueSetAttributes struct {
-	Values bazel.LabelListAttribute
-}
-
-func (module *ValueSetModule) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	if ctx.ModuleType() != "aconfig_value_set" {
-		return
-	}
-
-	attrs := bazelAconfigValueSetAttributes{
-		Values: bazel.MakeLabelListAttribute(android.BazelLabelForModuleDeps(ctx, module.properties.Values)),
-	}
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "aconfig_value_set",
-		Bzl_load_location: "//build/bazel/rules/aconfig:aconfig_value_set.bzl",
-	}
-
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: module.Name()}, &attrs)
-}
diff --git a/aconfig/aconfig_values.go b/aconfig/aconfig_values.go
index 03a930d..621aae8 100644
--- a/aconfig/aconfig_values.go
+++ b/aconfig/aconfig_values.go
@@ -16,7 +16,6 @@
 
 import (
 	"android/soong/android"
-	"android/soong/bazel"
 	"github.com/google/blueprint"
 )
 
@@ -24,7 +23,6 @@
 type ValuesModule struct {
 	android.ModuleBase
 	android.DefaultableModuleBase
-	android.BazelModuleBase
 
 	properties struct {
 		// aconfig files, relative to this Android.bp file
@@ -41,7 +39,6 @@
 	android.InitAndroidModule(module)
 	android.InitDefaultableModule(module)
 	module.AddProperties(&module.properties)
-	android.InitBazelModule(module)
 
 	return module
 }
@@ -69,27 +66,3 @@
 	}
 	ctx.SetProvider(valuesProviderKey, providerData)
 }
-
-type bazelAconfigValuesAttributes struct {
-	Srcs    bazel.LabelListAttribute
-	Package string
-}
-
-func (module *ValuesModule) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	if ctx.ModuleType() != "aconfig_values" {
-		return
-	}
-
-	srcs := bazel.MakeLabelListAttribute(android.BazelLabelForModuleSrc(ctx, module.properties.Srcs))
-
-	attrs := bazelAconfigValuesAttributes{
-		Srcs:    srcs,
-		Package: module.properties.Package,
-	}
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "aconfig_values",
-		Bzl_load_location: "//build/bazel/rules/aconfig:aconfig_values.bzl",
-	}
-
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: module.Name()}, &attrs)
-}
diff --git a/aconfig/codegen/cc_aconfig_library.go b/aconfig/codegen/cc_aconfig_library.go
index 6855118..30f6863 100644
--- a/aconfig/codegen/cc_aconfig_library.go
+++ b/aconfig/codegen/cc_aconfig_library.go
@@ -17,7 +17,6 @@
 import (
 	"android/soong/aconfig"
 	"android/soong/android"
-	"android/soong/bazel"
 	"android/soong/cc"
 
 	"github.com/google/blueprint"
@@ -144,41 +143,3 @@
 		},
 	})
 }
-
-type bazelCcAconfigLibraryAttributes struct {
-	cc.SdkAttributes
-	Aconfig_declarations bazel.LabelAttribute
-	Dynamic_deps         bazel.LabelListAttribute
-}
-
-// Convert the cc_aconfig_library module to bazel.
-//
-// This method is called from cc.ConvertWithBp2build to actually convert the
-// cc_aconfig_library module. This is necessary since the factory method of this
-// module type returns a cc library and the bp2build conversion is called on the
-// cc library type.
-
-func (this *CcAconfigLibraryCallbacks) GeneratorBp2build(ctx android.Bp2buildMutatorContext, module *cc.Module) bool {
-	if ctx.ModuleType() != "cc_aconfig_library" {
-		return false
-	}
-
-	attrs := bazelCcAconfigLibraryAttributes{
-		SdkAttributes:        cc.Bp2BuildParseSdkAttributes(module),
-		Aconfig_declarations: *bazel.MakeLabelAttribute(android.BazelLabelForModuleDepSingle(ctx, this.properties.Aconfig_declarations).Label),
-		Dynamic_deps:         bazel.MakeLabelListAttribute(android.BazelLabelForModuleDeps(ctx, []string{baseLibDep})),
-	}
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "cc_aconfig_library",
-		Bzl_load_location: "//build/bazel/rules/cc:cc_aconfig_library.bzl",
-	}
-
-	ctx.CreateBazelTargetModule(
-		props,
-		android.CommonAttributes{
-			Name: ctx.ModuleName(),
-			Tags: android.ApexAvailableTagsWithoutTestApexes(ctx, module),
-		},
-		&attrs)
-	return true
-}
diff --git a/aconfig/codegen/java_aconfig_library.go b/aconfig/codegen/java_aconfig_library.go
index 211bdce..202e358 100644
--- a/aconfig/codegen/java_aconfig_library.go
+++ b/aconfig/codegen/java_aconfig_library.go
@@ -19,7 +19,6 @@
 
 	"android/soong/aconfig"
 	"android/soong/android"
-	"android/soong/bazel"
 	"android/soong/java"
 
 	"github.com/google/blueprint"
@@ -101,56 +100,3 @@
 func isModeSupported(mode string) bool {
 	return android.InList(mode, aconfigSupportedModes)
 }
-
-type bazelJavaAconfigLibraryAttributes struct {
-	Aconfig_declarations bazel.LabelAttribute
-	Sdk_version          *string
-	Libs                 bazel.LabelListAttribute
-}
-
-func (callbacks *JavaAconfigDeclarationsLibraryCallbacks) Bp2build(ctx android.Bp2buildMutatorContext, module *java.GeneratedJavaLibraryModule) {
-	if ctx.ModuleType() != "java_aconfig_library" {
-		return
-	}
-
-	// By default, soong builds the aconfig java library with private_current, however
-	// bazel currently doesn't support it so we default it to system_current. One reason
-	// is that the dependency of all java_aconfig_library aconfig-annotations-lib is
-	// built with system_current. For the java aconfig library itself it doesn't really
-	// matter whether it uses private API or system API because the only module it uses
-	// is DeviceConfig which is in system, and the rdeps of the java aconfig library
-	// won't change its sdk version either, so this should be fine.
-	// Ideally we should only use the default value if it is not set by the user, but
-	// bazel only supports a limited sdk versions, for example, the java_aconfig_library
-	// modules in framework/base use core_platform which is not supported by bazel yet.
-	// TODO(b/302148527): change soong to default to system_current as well.
-	sdkVersion := "system_current"
-
-	var libs bazel.LabelListAttribute
-	archVariantProps := module.GetArchVariantProperties(ctx, &java.CommonProperties{})
-	for axis, configToProps := range archVariantProps {
-		for config, p := range configToProps {
-			if archProps, ok := p.(*java.CommonProperties); ok {
-				var libLabels []bazel.Label
-				for _, d := range archProps.Libs {
-					neverlinkLabel := android.BazelLabelForModuleDepSingle(ctx, d)
-					neverlinkLabel.Label = neverlinkLabel.Label + "-neverlink"
-					libLabels = append(libLabels, neverlinkLabel)
-				}
-				libs.SetSelectValue(axis, config, (bazel.MakeLabelList(libLabels)))
-			}
-		}
-	}
-
-	attrs := bazelJavaAconfigLibraryAttributes{
-		Aconfig_declarations: *bazel.MakeLabelAttribute(android.BazelLabelForModuleDepSingle(ctx, callbacks.properties.Aconfig_declarations).Label),
-		Sdk_version:          &sdkVersion,
-		Libs:                 libs,
-	}
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "java_aconfig_library",
-		Bzl_load_location: "//build/bazel/rules/java:java_aconfig_library.bzl",
-	}
-
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: ctx.ModuleName()}, &attrs)
-}
diff --git a/aidl_library/aidl_library.go b/aidl_library/aidl_library.go
index 2c0aef7..b49c516 100644
--- a/aidl_library/aidl_library.go
+++ b/aidl_library/aidl_library.go
@@ -16,8 +16,6 @@
 
 import (
 	"android/soong/android"
-	"android/soong/bazel"
-
 	"github.com/google/blueprint"
 	"github.com/google/blueprint/proptools"
 )
@@ -53,57 +51,9 @@
 
 type AidlLibrary struct {
 	android.ModuleBase
-	android.BazelModuleBase
 	properties aidlLibraryProperties
 }
 
-type bazelAidlLibraryAttributes struct {
-	Srcs                bazel.LabelListAttribute
-	Hdrs                bazel.LabelListAttribute
-	Strip_import_prefix *string
-	Deps                bazel.LabelListAttribute
-}
-
-func (lib *AidlLibrary) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	srcs := bazel.MakeLabelListAttribute(
-		android.BazelLabelForModuleSrc(
-			ctx,
-			lib.properties.Srcs,
-		),
-	)
-
-	hdrs := bazel.MakeLabelListAttribute(
-		android.BazelLabelForModuleSrc(
-			ctx,
-			lib.properties.Hdrs,
-		),
-	)
-
-	tags := []string{"apex_available=//apex_available:anyapex"}
-	deps := bazel.MakeLabelListAttribute(android.BazelLabelForModuleDeps(ctx, lib.properties.Deps))
-
-	attrs := &bazelAidlLibraryAttributes{
-		Srcs:                srcs,
-		Hdrs:                hdrs,
-		Strip_import_prefix: lib.properties.Strip_import_prefix,
-		Deps:                deps,
-	}
-
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "aidl_library",
-		Bzl_load_location: "//build/bazel/rules/aidl:aidl_library.bzl",
-	}
-
-	ctx.CreateBazelTargetModule(
-		props,
-		android.CommonAttributes{
-			Name: lib.Name(),
-			Tags: bazel.MakeStringListAttribute(tags),
-		},
-		attrs,
-	)
-}
-
 type AidlLibraryInfo struct {
 	// The direct aidl files of the module
 	Srcs android.Paths
@@ -170,7 +120,6 @@
 	module := &AidlLibrary{}
 	module.AddProperties(&module.properties)
 	android.InitAndroidModule(module)
-	android.InitBazelModule(module)
 	return module
 }
 
diff --git a/android/defaults.go b/android/defaults.go
index cc723f7..ff79002 100644
--- a/android/defaults.go
+++ b/android/defaults.go
@@ -17,7 +17,6 @@
 import (
 	"reflect"
 
-	"android/soong/ui/metrics/bp2build_metrics_proto"
 	"github.com/google/blueprint"
 	"github.com/google/blueprint/proptools"
 )
@@ -118,11 +117,6 @@
 
 type DefaultsModuleBase struct {
 	DefaultableModuleBase
-
-	// Included to support setting bazel_module.label for multiple Soong modules to the same Bazel
-	// target. This is primarily useful for modules that were architecture specific and instead are
-	// handled in Bazel as a select().
-	BazelModuleBase
 }
 
 // The common pattern for defaults modules is to register separate instances of
@@ -165,7 +159,6 @@
 type DefaultsModule interface {
 	Module
 	Defaults
-	Bazelable
 }
 
 func (d *DefaultsModuleBase) properties() []interface{} {
@@ -178,13 +171,6 @@
 
 func (d *DefaultsModuleBase) GenerateAndroidBuildActions(ctx ModuleContext) {}
 
-// ConvertWithBp2build to fulfill Bazelable interface; however, at this time defaults module are
-// *NOT* converted with bp2build
-func (defaultable *DefaultsModuleBase) ConvertWithBp2build(ctx Bp2buildMutatorContext) {
-	// Defaults types are never convertible.
-	ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_TYPE_UNSUPPORTED, "")
-}
-
 func InitDefaultsModule(module DefaultsModule) {
 	commonProperties := &commonProperties{}
 
@@ -194,8 +180,6 @@
 		&ApexProperties{},
 		&distProperties{})
 
-	// Bazel module must be initialized _before_ Defaults to be included in cc_defaults module.
-	InitBazelModule(module)
 	initAndroidModuleBase(module)
 	initProductVariableModule(module)
 	initArchModule(module)
@@ -225,60 +209,10 @@
 
 var _ Defaults = (*DefaultsModuleBase)(nil)
 
-// applyNamespacedVariableDefaults only runs in bp2build mode for
-// defaultable/defaults modules. Its purpose is to merge namespaced product
-// variable props from defaults deps, even if those defaults are custom module
-// types created from soong_config_module_type, e.g. one that's wrapping a
-// cc_defaults or java_defaults.
-func applyNamespacedVariableDefaults(defaultDep Defaults, ctx TopDownMutatorContext) {
-	var dep, b Bazelable
-
-	dep, ok := defaultDep.(Bazelable)
-	if !ok {
-		if depMod, ok := defaultDep.(Module); ok {
-			// Track that this dependency hasn't been converted to bp2build yet.
-			ctx.AddUnconvertedBp2buildDep(depMod.Name())
-			return
-		} else {
-			panic("Expected default dep to be a Module.")
-		}
-	}
-
-	b, ok = ctx.Module().(Bazelable)
-	if !ok {
-		return
-	}
-
-	// namespacedVariableProps is a map from namespaces (e.g. acme, android,
-	// vendor_foo) to a slice of soong_config_variable struct pointers,
-	// containing properties for that particular module.
-	src := dep.namespacedVariableProps()
-	dst := b.namespacedVariableProps()
-	if dst == nil {
-		dst = make(namespacedVariableProperties)
-	}
-
-	// Propagate all soong_config_variable structs from the dep. We'll merge the
-	// actual property values later in variable.go.
-	for namespace := range src {
-		if dst[namespace] == nil {
-			dst[namespace] = []interface{}{}
-		}
-		for _, i := range src[namespace] {
-			dst[namespace] = append(dst[namespace], i)
-		}
-	}
-
-	b.setNamespacedVariableProps(dst)
-}
-
 func (defaultable *DefaultableModuleBase) applyDefaults(ctx TopDownMutatorContext,
 	defaultsList []Defaults) {
 
 	for _, defaults := range defaultsList {
-		if ctx.Config().BuildMode == Bp2build {
-			applyNamespacedVariableDefaults(defaults, ctx)
-		}
 		for _, prop := range defaultable.defaultableProperties {
 			if prop == defaultable.defaultableVariableProperties {
 				defaultable.applyDefaultVariableProperties(ctx, defaults, prop)
diff --git a/android/filegroup.go b/android/filegroup.go
index c34a615..04bd8a8 100644
--- a/android/filegroup.go
+++ b/android/filegroup.go
@@ -15,15 +15,9 @@
 package android
 
 import (
-	"path/filepath"
-	"regexp"
 	"strings"
 
-	"android/soong/bazel"
-	"android/soong/bazel/cquery"
-	"android/soong/ui/metrics/bp2build_metrics_proto"
 	"github.com/google/blueprint"
-	"github.com/google/blueprint/proptools"
 )
 
 func init() {
@@ -39,181 +33,6 @@
 	ctx.RegisterModuleType("filegroup_defaults", FileGroupDefaultsFactory)
 }
 
-var convertedProtoLibrarySuffix = "_bp2build_converted"
-
-// IsFilegroup checks that a module is a filegroup type
-func IsFilegroup(ctx bazel.OtherModuleContext, m blueprint.Module) bool {
-	return ctx.OtherModuleType(m) == "filegroup"
-}
-
-var (
-	// ignoring case, checks for proto or protos as an independent word in the name, whether at the
-	// beginning, end, or middle. e.g. "proto.foo", "bar-protos", "baz_proto_srcs" would all match
-	filegroupLikelyProtoPattern = regexp.MustCompile("(?i)(^|[^a-z])proto(s)?([^a-z]|$)")
-	filegroupLikelyAidlPattern  = regexp.MustCompile("(?i)(^|[^a-z])aidl(s)?([^a-z]|$)")
-
-	ProtoSrcLabelPartition = bazel.LabelPartition{
-		Extensions:  []string{".proto"},
-		LabelMapper: isFilegroupWithPattern(filegroupLikelyProtoPattern),
-	}
-	AidlSrcLabelPartition = bazel.LabelPartition{
-		Extensions:  []string{".aidl"},
-		LabelMapper: isFilegroupWithPattern(filegroupLikelyAidlPattern),
-	}
-)
-
-func isFilegroupWithPattern(pattern *regexp.Regexp) bazel.LabelMapper {
-	return func(ctx bazel.OtherModuleContext, label bazel.Label) (string, bool) {
-		m, exists := ctx.ModuleFromName(label.OriginalModuleName)
-		labelStr := label.Label
-		if !exists || !IsFilegroup(ctx, m) {
-			return labelStr, false
-		}
-		likelyMatched := pattern.MatchString(label.OriginalModuleName)
-		return labelStr, likelyMatched
-	}
-}
-
-// https://docs.bazel.build/versions/master/be/general.html#filegroup
-type bazelFilegroupAttributes struct {
-	Srcs                bazel.LabelListAttribute
-	Applicable_licenses bazel.LabelListAttribute
-}
-
-type bazelAidlLibraryAttributes struct {
-	Srcs                bazel.LabelListAttribute
-	Strip_import_prefix *string
-}
-
-// ConvertWithBp2build performs bp2build conversion of filegroup
-func (fg *fileGroup) ConvertWithBp2build(ctx Bp2buildMutatorContext) {
-	srcs := bazel.MakeLabelListAttribute(
-		BazelLabelForModuleSrcExcludes(ctx, fg.properties.Srcs, fg.properties.Exclude_srcs))
-
-	// For Bazel compatibility, don't generate the filegroup if there is only 1
-	// source file, and that the source file is named the same as the module
-	// itself. In Bazel, eponymous filegroups like this would be an error.
-	//
-	// Instead, dependents on this single-file filegroup can just depend
-	// on the file target, instead of rule target, directly.
-	//
-	// You may ask: what if a filegroup has multiple files, and one of them
-	// shares the name? The answer: we haven't seen that in the wild, and
-	// should lock Soong itself down to prevent the behavior. For now,
-	// we raise an error if bp2build sees this problem.
-	for _, f := range srcs.Value.Includes {
-		if f.Label == fg.Name() {
-			if len(srcs.Value.Includes) > 1 {
-				ctx.ModuleErrorf("filegroup '%s' cannot contain a file with the same name", fg.Name())
-				ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_SRC_NAME_COLLISION, "")
-			} else {
-				panic("This situation should have been handled by FileGroupFactory's call to InitBazelModuleAsHandcrafted")
-			}
-			return
-		}
-	}
-
-	// Convert module that has only AIDL files to aidl_library
-	// If the module has a mixed bag of AIDL and non-AIDL files, split the filegroup manually
-	// and then convert
-	if fg.ShouldConvertToAidlLibrary(ctx) {
-		tags := []string{"apex_available=//apex_available:anyapex"}
-		attrs := &bazelAidlLibraryAttributes{
-			Srcs:                srcs,
-			Strip_import_prefix: fg.properties.Path,
-		}
-
-		props := bazel.BazelTargetModuleProperties{
-			Rule_class:        "aidl_library",
-			Bzl_load_location: "//build/bazel/rules/aidl:aidl_library.bzl",
-		}
-
-		ctx.CreateBazelTargetModule(
-			props,
-			CommonAttributes{
-				Name: fg.Name(),
-				Tags: bazel.MakeStringListAttribute(tags),
-			},
-			attrs)
-	} else {
-		if fg.ShouldConvertToProtoLibrary(ctx) {
-			pkgToSrcs := partitionSrcsByPackage(ctx.ModuleDir(), bazel.MakeLabelList(srcs.Value.Includes))
-			if len(pkgToSrcs) > 1 {
-				ctx.ModuleErrorf("TODO: Add bp2build support for multiple package .protosrcs in filegroup")
-				return
-			}
-			pkg := SortedKeys(pkgToSrcs)[0]
-			attrs := &ProtoAttrs{
-				Srcs:                bazel.MakeLabelListAttribute(pkgToSrcs[pkg]),
-				Strip_import_prefix: fg.properties.Path,
-			}
-
-			tags := []string{
-				"apex_available=//apex_available:anyapex",
-				// TODO(b/246997908): we can remove this tag if we could figure out a solution for this bug.
-				"manual",
-			}
-			if pkg != ctx.ModuleDir() {
-				// Since we are creating the proto_library in a subpackage, create an import_prefix relative to the current package
-				if rel, err := filepath.Rel(ctx.ModuleDir(), pkg); err != nil {
-					ctx.ModuleErrorf("Could not get relative path for %v %v", pkg, err)
-				} else if rel != "." {
-					attrs.Import_prefix = &rel
-					// Strip the package prefix
-					attrs.Strip_import_prefix = proptools.StringPtr("")
-				}
-			}
-
-			ctx.CreateBazelTargetModule(
-				bazel.BazelTargetModuleProperties{Rule_class: "proto_library"},
-				CommonAttributes{
-					Name: fg.Name() + "_proto",
-					Dir:  proptools.StringPtr(pkg),
-					Tags: bazel.MakeStringListAttribute(tags),
-				},
-				attrs)
-
-			// Create an alias in the current dir. The actual target might exist in a different package, but rdeps
-			// can reliabily use this alias
-			ctx.CreateBazelTargetModule(
-				bazel.BazelTargetModuleProperties{Rule_class: "alias"},
-				CommonAttributes{
-					Name: fg.Name() + convertedProtoLibrarySuffix,
-					// TODO(b/246997908): we can remove this tag if we could figure out a solution for this bug.
-					Tags: bazel.MakeStringListAttribute(tags),
-				},
-				&bazelAliasAttributes{
-					Actual: bazel.MakeLabelAttribute("//" + pkg + ":" + fg.Name() + "_proto"),
-				},
-			)
-		}
-
-		// TODO(b/242847534): Still convert to a filegroup because other unconverted
-		// modules may depend on the filegroup
-		attrs := &bazelFilegroupAttributes{
-			Srcs: srcs,
-		}
-
-		props := bazel.BazelTargetModuleProperties{
-			Rule_class:        "filegroup",
-			Bzl_load_location: "//build/bazel/rules:filegroup.bzl",
-		}
-
-		ctx.CreateBazelTargetModule(props, CommonAttributes{Name: fg.Name()}, attrs)
-	}
-}
-
-type FileGroupPath interface {
-	GetPath(ctx Bp2buildMutatorContext) string
-}
-
-func (fg *fileGroup) GetPath(ctx Bp2buildMutatorContext) string {
-	if fg.properties.Path != nil {
-		return *fg.properties.Path
-	}
-	return ""
-}
-
 type fileGroupProperties struct {
 	// srcs lists files that will be included in this filegroup
 	Srcs []string `android:"path"`
@@ -233,18 +52,12 @@
 
 type fileGroup struct {
 	ModuleBase
-	BazelModuleBase
 	DefaultableModuleBase
-	FileGroupAsLibrary
-	FileGroupPath
 	properties fileGroupProperties
 	srcs       Paths
 }
 
-var _ MixedBuildBuildable = (*fileGroup)(nil)
 var _ SourceFileProducer = (*fileGroup)(nil)
-var _ FileGroupAsLibrary = (*fileGroup)(nil)
-var _ FileGroupPath = (*fileGroup)(nil)
 
 // filegroup contains a list of files that are referenced by other modules
 // properties (such as "srcs") using the syntax ":<name>". filegroup are
@@ -253,17 +66,6 @@
 	module := &fileGroup{}
 	module.AddProperties(&module.properties)
 	InitAndroidModule(module)
-	InitBazelModule(module)
-	AddBazelHandcraftedHook(module, func(ctx LoadHookContext) string {
-		// If there is a single src with the same name as the filegroup module name,
-		// then don't generate this filegroup. It will be OK for other targets
-		// to depend on this source file by name directly.
-		fg := ctx.Module().(*fileGroup)
-		if len(fg.properties.Srcs) == 1 && fg.Name() == fg.properties.Srcs[0] {
-			return fg.Name()
-		}
-		return ""
-	})
 	InitDefaultableModule(module)
 	return module
 }
@@ -303,101 +105,6 @@
 	}
 }
 
-func (fg *fileGroup) QueueBazelCall(ctx BaseModuleContext) {
-	bazelCtx := ctx.Config().BazelContext
-
-	bazelCtx.QueueBazelRequest(
-		fg.GetBazelLabel(ctx, fg),
-		cquery.GetOutputFiles,
-		configKey{arch: Common.String(), osType: CommonOS})
-}
-
-func (fg *fileGroup) IsMixedBuildSupported(ctx BaseModuleContext) bool {
-	// TODO(b/247782695), TODO(b/242847534) Fix mixed builds for filegroups
-	return false
-}
-
-func (fg *fileGroup) ProcessBazelQueryResponse(ctx ModuleContext) {
-	bazelCtx := ctx.Config().BazelContext
-	// This is a short-term solution because we rely on info from Android.bp to handle
-	// a converted module. This will block when we want to remove Android.bp for all
-	// converted modules at some point.
-	// TODO(b/242847534): Implement a long-term solution in which we don't need to rely
-	// on info form Android.bp for modules that are already converted to Bazel
-	relativeRoot := ctx.ModuleDir()
-	if fg.properties.Path != nil {
-		relativeRoot = filepath.Join(relativeRoot, *fg.properties.Path)
-	}
-
-	filePaths, err := bazelCtx.GetOutputFiles(fg.GetBazelLabel(ctx, fg), configKey{arch: Common.String(), osType: CommonOS})
-	if err != nil {
-		ctx.ModuleErrorf(err.Error())
-		return
-	}
-
-	bazelOuts := make(Paths, 0, len(filePaths))
-	for _, p := range filePaths {
-		bazelOuts = append(bazelOuts, PathForBazelOutRelative(ctx, relativeRoot, p))
-	}
-	fg.srcs = bazelOuts
-}
-
-func (fg *fileGroup) ShouldConvertToAidlLibrary(ctx BazelConversionPathContext) bool {
-	return fg.shouldConvertToLibrary(ctx, ".aidl")
-}
-
-func (fg *fileGroup) ShouldConvertToProtoLibrary(ctx BazelConversionPathContext) bool {
-	return fg.shouldConvertToLibrary(ctx, ".proto")
-}
-
-func (fg *fileGroup) shouldConvertToLibrary(ctx BazelConversionPathContext, suffix string) bool {
-	if len(fg.properties.Srcs) == 0 || !fg.ShouldConvertWithBp2build(ctx) {
-		return false
-	}
-	for _, src := range fg.properties.Srcs {
-		if !strings.HasSuffix(src, suffix) {
-			return false
-		}
-	}
-	return true
-}
-
-func (fg *fileGroup) GetAidlLibraryLabel(ctx BazelConversionPathContext) string {
-	return fg.getFileGroupAsLibraryLabel(ctx)
-}
-
-func (fg *fileGroup) GetProtoLibraryLabel(ctx BazelConversionPathContext) string {
-	return fg.getFileGroupAsLibraryLabel(ctx) + convertedProtoLibrarySuffix
-}
-
-func (fg *fileGroup) getFileGroupAsLibraryLabel(ctx BazelConversionPathContext) string {
-	if ctx.OtherModuleDir(fg.module) == ctx.ModuleDir() {
-		return ":" + fg.Name()
-	} else {
-		return fg.GetBazelLabel(ctx, fg)
-	}
-}
-
-// Given a name in srcs prop, check to see if the name references a filegroup
-// and the filegroup is converted to aidl_library
-func IsConvertedToAidlLibrary(ctx BazelConversionPathContext, name string) bool {
-	if fg, ok := ToFileGroupAsLibrary(ctx, name); ok {
-		return fg.ShouldConvertToAidlLibrary(ctx)
-	}
-	return false
-}
-
-func ToFileGroupAsLibrary(ctx BazelConversionPathContext, name string) (FileGroupAsLibrary, bool) {
-	if module, ok := ctx.ModuleFromName(name); ok {
-		if IsFilegroup(ctx, module) {
-			if fg, ok := module.(FileGroupAsLibrary); ok {
-				return fg, true
-			}
-		}
-	}
-	return nil, false
-}
-
 // Defaults
 type FileGroupDefaults struct {
 	ModuleBase
diff --git a/android/filegroup_test.go b/android/filegroup_test.go
index 893da57..14e9368 100644
--- a/android/filegroup_test.go
+++ b/android/filegroup_test.go
@@ -40,17 +40,8 @@
 	}
 
 	for _, testCase := range testCases {
-		outBaseDir := "outputbase"
 		result := GroupFixturePreparers(
 			PrepareForTestWithFilegroup,
-			FixtureModifyConfig(func(config Config) {
-				config.BazelContext = MockBazelContext{
-					OutputBaseDir: outBaseDir,
-					LabelToOutputFiles: map[string][]string{
-						"//:baz": []string{"a/b/c/d/test.aidl"},
-					},
-				}
-			}),
 		).RunTestWithBp(t, testCase.bp)
 
 		fg := result.Module("baz", "").(*fileGroup)
diff --git a/android/license.go b/android/license.go
index 76f5115..5bffc25 100644
--- a/android/license.go
+++ b/android/license.go
@@ -15,12 +15,7 @@
 package android
 
 import (
-	"fmt"
-	"os"
-
 	"github.com/google/blueprint"
-
-	"android/soong/bazel"
 )
 
 type licenseKindDependencyTag struct {
@@ -53,54 +48,13 @@
 	Visibility []string
 }
 
-var _ Bazelable = &licenseModule{}
-
 type licenseModule struct {
 	ModuleBase
 	DefaultableModuleBase
-	BazelModuleBase
 
 	properties licenseProperties
 }
 
-type bazelLicenseAttributes struct {
-	License_kinds    []string
-	Copyright_notice *string
-	License_text     bazel.LabelAttribute
-	Package_name     *string
-	Visibility       []string
-}
-
-func (m *licenseModule) ConvertWithBp2build(ctx Bp2buildMutatorContext) {
-	attrs := &bazelLicenseAttributes{
-		License_kinds:    m.properties.License_kinds,
-		Copyright_notice: m.properties.Copyright_notice,
-		Package_name:     m.properties.Package_name,
-		Visibility:       m.properties.Visibility,
-	}
-
-	// TODO(asmundak): Soong supports multiple license texts while Bazel's license
-	// rule does not. Have android_license create a genrule to concatenate multiple
-	// license texts.
-	if len(m.properties.License_text) > 1 && ctx.Config().IsEnvTrue("BP2BUILD_VERBOSE") {
-		fmt.Fprintf(os.Stderr, "warning: using only the first license_text item from //%s:%s\n",
-			ctx.ModuleDir(), m.Name())
-	}
-	if len(m.properties.License_text) >= 1 {
-		attrs.License_text.SetValue(BazelLabelForModuleSrcSingle(ctx, m.properties.License_text[0]))
-	}
-
-	ctx.CreateBazelTargetModule(
-		bazel.BazelTargetModuleProperties{
-			Rule_class:        "android_license",
-			Bzl_load_location: "//build/bazel/rules/license:license.bzl",
-		},
-		CommonAttributes{
-			Name: m.Name(),
-		},
-		attrs)
-}
-
 func (m *licenseModule) DepsMutator(ctx BottomUpMutatorContext) {
 	for i, license := range m.properties.License_kinds {
 		for j := i + 1; j < len(m.properties.License_kinds); j++ {
@@ -131,14 +85,13 @@
 	module := &licenseModule{}
 
 	base := module.base()
-	module.AddProperties(&base.nameProperties, &module.properties, &base.commonProperties.BazelConversionStatus)
+	module.AddProperties(&base.nameProperties, &module.properties)
 
 	// The visibility property needs to be checked and parsed by the visibility module.
 	setPrimaryVisibilityProperty(module, "visibility", &module.properties.Visibility)
 
 	initAndroidModuleBase(module)
 	InitDefaultableModule(module)
-	InitBazelModule(module)
 
 	return module
 }
diff --git a/android/license_kind.go b/android/license_kind.go
index 78df938..838dedd 100644
--- a/android/license_kind.go
+++ b/android/license_kind.go
@@ -14,8 +14,6 @@
 
 package android
 
-import "android/soong/bazel"
-
 func init() {
 	RegisterLicenseKindBuildComponents(InitRegistrationContext)
 }
@@ -34,39 +32,13 @@
 	Visibility []string
 }
 
-var _ Bazelable = &licenseKindModule{}
-
 type licenseKindModule struct {
 	ModuleBase
 	DefaultableModuleBase
-	BazelModuleBase
 
 	properties licenseKindProperties
 }
 
-type bazelLicenseKindAttributes struct {
-	Conditions []string
-	Url        string
-	Visibility []string
-}
-
-func (m *licenseKindModule) ConvertWithBp2build(ctx Bp2buildMutatorContext) {
-	attrs := &bazelLicenseKindAttributes{
-		Conditions: m.properties.Conditions,
-		Url:        m.properties.Url,
-		Visibility: m.properties.Visibility,
-	}
-	ctx.CreateBazelTargetModule(
-		bazel.BazelTargetModuleProperties{
-			Rule_class:        "license_kind",
-			Bzl_load_location: "@rules_license//rules:license_kind.bzl",
-		},
-		CommonAttributes{
-			Name: m.Name(),
-		},
-		attrs)
-}
-
 func (m *licenseKindModule) DepsMutator(ctx BottomUpMutatorContext) {
 	// Nothing to do.
 }
@@ -79,14 +51,13 @@
 	module := &licenseKindModule{}
 
 	base := module.base()
-	module.AddProperties(&base.nameProperties, &module.properties, &base.commonProperties.BazelConversionStatus)
+	module.AddProperties(&base.nameProperties, &module.properties)
 
 	// The visibility property needs to be checked and parsed by the visibility module.
 	setPrimaryVisibilityProperty(module, "visibility", &module.properties.Visibility)
 
 	initAndroidModuleBase(module)
 	InitDefaultableModule(module)
-	InitBazelModule(module)
 
 	return module
 }
diff --git a/android/package.go b/android/package.go
index ce0b150..878e4c4 100644
--- a/android/package.go
+++ b/android/package.go
@@ -15,9 +15,6 @@
 package android
 
 import (
-	"path/filepath"
-
-	"android/soong/bazel"
 	"github.com/google/blueprint"
 	"github.com/google/blueprint/proptools"
 )
@@ -40,52 +37,12 @@
 	Default_applicable_licenses []string
 }
 
-type bazelPackageAttributes struct {
-	Default_visibility       []string
-	Default_package_metadata bazel.LabelListAttribute
-}
-
 type packageModule struct {
 	ModuleBase
-	BazelModuleBase
 
 	properties packageProperties
 }
 
-var _ Bazelable = &packageModule{}
-
-func (p *packageModule) ConvertWithBp2build(ctx Bp2buildMutatorContext) {
-	defaultPackageMetadata := bazel.MakeLabelListAttribute(BazelLabelForModuleDeps(ctx, p.properties.Default_applicable_licenses))
-	// If METADATA file exists in the package, add it to package(default_package_metadata=) using a
-	// filegroup(name="default_metadata_file") which can be accessed later on each module in Bazel
-	// using attribute "applicable_licenses".
-	// Attribute applicable_licenses of filegroup "default_metadata_file" has to be set to [],
-	// otherwise Bazel reports cyclic reference error.
-	if existed, _, _ := ctx.Config().fs.Exists(filepath.Join(ctx.ModuleDir(), "METADATA")); existed {
-		ctx.CreateBazelTargetModule(
-			bazel.BazelTargetModuleProperties{
-				Rule_class: "filegroup",
-			},
-			CommonAttributes{Name: "default_metadata_file"},
-			&bazelFilegroupAttributes{
-				Srcs:                bazel.MakeLabelListAttribute(BazelLabelForModuleSrc(ctx, []string{"METADATA"})),
-				Applicable_licenses: bazel.LabelListAttribute{Value: bazel.LabelList{Includes: []bazel.Label{}}, EmitEmptyList: true},
-			})
-		defaultPackageMetadata.Value.Add(&bazel.Label{Label: ":default_metadata_file"})
-	}
-
-	ctx.CreateBazelTargetModule(
-		bazel.BazelTargetModuleProperties{
-			Rule_class: "package",
-		},
-		CommonAttributes{},
-		&bazelPackageAttributes{
-			Default_package_metadata: defaultPackageMetadata,
-			// FIXME(asmundak): once b/221436821 is resolved
-			Default_visibility: []string{"//visibility:public"},
-		})
-}
-
 func (p *packageModule) GenerateAndroidBuildActions(ModuleContext) {
 	// Nothing to do.
 }
@@ -102,7 +59,7 @@
 func PackageFactory() Module {
 	module := &packageModule{}
 
-	module.AddProperties(&module.properties, &module.commonProperties.BazelConversionStatus)
+	module.AddProperties(&module.properties)
 
 	// The name is the relative path from build root to the directory containing this
 	// module. Set that name at the earliest possible moment that information is available
@@ -119,7 +76,5 @@
 	// its checking and parsing phases so make it the primary licenses property.
 	setPrimaryLicensesProperty(module, "default_applicable_licenses", &module.properties.Default_applicable_licenses)
 
-	InitBazelModule(module)
-
 	return module
 }
diff --git a/android/proto.go b/android/proto.go
index c449a87..0d8e097 100644
--- a/android/proto.go
+++ b/android/proto.go
@@ -15,11 +15,7 @@
 package android
 
 import (
-	"path/filepath"
 	"strings"
-	"sync"
-
-	"android/soong/bazel"
 
 	"github.com/google/blueprint"
 	"github.com/google/blueprint/proptools"
@@ -154,278 +150,3 @@
 	rule.Command().
 		BuiltTool("dep_fixer").Flag(depFile.String())
 }
-
-// Bp2buildProtoInfo contains information necessary to pass on to language specific conversion.
-type Bp2buildProtoInfo struct {
-	Type                  *string
-	Proto_libs            bazel.LabelList
-	Transitive_proto_libs bazel.LabelList
-}
-
-type ProtoAttrs struct {
-	Srcs                bazel.LabelListAttribute
-	Import_prefix       *string
-	Strip_import_prefix *string
-	Deps                bazel.LabelListAttribute
-}
-
-// For each package in the include_dirs property a proto_library target should
-// be added to the BUILD file in that package and a mapping should be added here
-var includeDirsToProtoDeps = map[string]string{
-	"external/protobuf/src": "//external/protobuf:libprotobuf-proto",
-}
-
-// Partitions srcs by the pkg it is in
-// srcs has been created using `TransformSubpackagePaths`
-// This function uses existence of Android.bp/BUILD files to create a label that is compatible with the package structure of bp2build workspace
-func partitionSrcsByPackage(currentDir string, srcs bazel.LabelList) map[string]bazel.LabelList {
-	getPackageFromLabel := func(label string) string {
-		// Remove any preceding //
-		label = strings.TrimPrefix(label, "//")
-		split := strings.Split(label, ":")
-		if len(split) == 1 {
-			// e.g. foo.proto
-			return currentDir
-		} else if split[0] == "" {
-			// e.g. :foo.proto
-			return currentDir
-		} else {
-			return split[0]
-		}
-	}
-
-	pkgToSrcs := map[string]bazel.LabelList{}
-	for _, src := range srcs.Includes {
-		pkg := getPackageFromLabel(src.Label)
-		list := pkgToSrcs[pkg]
-		list.Add(&src)
-		pkgToSrcs[pkg] = list
-	}
-	return pkgToSrcs
-}
-
-// Bp2buildProtoProperties converts proto properties, creating a proto_library and returning the
-// information necessary for language-specific handling.
-func Bp2buildProtoProperties(ctx Bp2buildMutatorContext, m *ModuleBase, srcs bazel.LabelListAttribute) (Bp2buildProtoInfo, bool) {
-	var info Bp2buildProtoInfo
-	if srcs.IsEmpty() {
-		return info, false
-	}
-
-	var protoLibraries bazel.LabelList
-	var transitiveProtoLibraries bazel.LabelList
-	var directProtoSrcs bazel.LabelList
-
-	// For filegroups that should be converted to proto_library just collect the
-	// labels of converted proto_library targets.
-	for _, protoSrc := range srcs.Value.Includes {
-		src := protoSrc.OriginalModuleName
-		if fg, ok := ToFileGroupAsLibrary(ctx, src); ok &&
-			fg.ShouldConvertToProtoLibrary(ctx) {
-			protoLibraries.Add(&bazel.Label{
-				Label: fg.GetProtoLibraryLabel(ctx),
-			})
-		} else {
-			directProtoSrcs.Add(&protoSrc)
-		}
-	}
-
-	name := m.Name() + "_proto"
-
-	depsFromFilegroup := protoLibraries
-	var canonicalPathFromRoot bool
-
-	if len(directProtoSrcs.Includes) > 0 {
-		pkgToSrcs := partitionSrcsByPackage(ctx.ModuleDir(), directProtoSrcs)
-		protoIncludeDirs := []string{}
-		for _, pkg := range SortedStringKeys(pkgToSrcs) {
-			srcs := pkgToSrcs[pkg]
-			attrs := ProtoAttrs{
-				Srcs: bazel.MakeLabelListAttribute(srcs),
-			}
-			attrs.Deps.Append(bazel.MakeLabelListAttribute(depsFromFilegroup))
-
-			for axis, configToProps := range m.GetArchVariantProperties(ctx, &ProtoProperties{}) {
-				for _, rawProps := range configToProps {
-					var props *ProtoProperties
-					var ok bool
-					if props, ok = rawProps.(*ProtoProperties); !ok {
-						ctx.ModuleErrorf("Could not cast ProtoProperties to expected type")
-					}
-					if axis == bazel.NoConfigAxis {
-						info.Type = props.Proto.Type
-
-						canonicalPathFromRoot = proptools.BoolDefault(props.Proto.Canonical_path_from_root, canonicalPathFromRootDefault)
-						if !canonicalPathFromRoot {
-							// an empty string indicates to strips the package path
-							path := ""
-							attrs.Strip_import_prefix = &path
-						}
-
-						for _, dir := range props.Proto.Include_dirs {
-							if dep, ok := includeDirsToProtoDeps[dir]; ok {
-								attrs.Deps.Add(bazel.MakeLabelAttribute(dep))
-							} else {
-								protoIncludeDirs = append(protoIncludeDirs, dir)
-							}
-						}
-
-						// proto.local_include_dirs are similar to proto.include_dirs, except that it is relative to the module directory
-						for _, dir := range props.Proto.Local_include_dirs {
-							relativeToTop := pathForModuleSrc(ctx, dir).String()
-							protoIncludeDirs = append(protoIncludeDirs, relativeToTop)
-						}
-
-					} else if props.Proto.Type != info.Type && props.Proto.Type != nil {
-						ctx.ModuleErrorf("Cannot handle arch-variant types for protos at this time.")
-					}
-				}
-			}
-
-			if p, ok := m.module.(PkgPathInterface); ok && p.PkgPath(ctx) != nil {
-				// python_library with pkg_path
-				// proto_library for this module should have the pkg_path as the import_prefix
-				attrs.Import_prefix = p.PkgPath(ctx)
-				attrs.Strip_import_prefix = proptools.StringPtr("")
-			}
-
-			tags := ApexAvailableTagsWithoutTestApexes(ctx, ctx.Module())
-
-			moduleDir := ctx.ModuleDir()
-			if !canonicalPathFromRoot {
-				// Since we are creating the proto_library in a subpackage, set the import_prefix relative to the current package
-				if rel, err := filepath.Rel(moduleDir, pkg); err != nil {
-					ctx.ModuleErrorf("Could not get relative path for %v %v", pkg, err)
-				} else if rel != "." {
-					attrs.Import_prefix = &rel
-				}
-			}
-
-			// TODO - b/246997908: Handle potential orphaned proto_library targets
-			// To create proto_library targets in the same package, we split the .proto files
-			// This means that if a proto_library in a subpackage imports another proto_library from the parent package
-			// (or a different subpackage), it will not find it.
-			// The CcProtoGen action itself runs fine because we construct the correct ProtoInfo,
-			// but the FileDescriptorSet of each proto_library might not be compile-able
-			//
-			// Add manual tag if either
-			// 1. .proto files are in more than one package
-			// 2. proto.include_dirs is not empty
-			if len(SortedStringKeys(pkgToSrcs)) > 1 || len(protoIncludeDirs) > 0 {
-				tags.Append(bazel.MakeStringListAttribute([]string{"manual"}))
-			}
-
-			ctx.CreateBazelTargetModule(
-				bazel.BazelTargetModuleProperties{Rule_class: "proto_library"},
-				CommonAttributes{Name: name, Dir: proptools.StringPtr(pkg), Tags: tags},
-				&attrs,
-			)
-
-			l := ""
-			if pkg == moduleDir { // same package that the original module lives in
-				l = ":" + name
-			} else {
-				l = "//" + pkg + ":" + name
-			}
-			protoLibraries.Add(&bazel.Label{
-				Label: l,
-			})
-		}
-		// Partitioning by packages can create dupes of protoIncludeDirs, so dedupe it first.
-		protoLibrariesInIncludeDir := createProtoLibraryTargetsForIncludeDirs(ctx, SortedUniqueStrings(protoIncludeDirs))
-		transitiveProtoLibraries.Append(protoLibrariesInIncludeDir)
-	}
-
-	info.Proto_libs = protoLibraries
-	info.Transitive_proto_libs = transitiveProtoLibraries
-
-	return info, true
-}
-
-// PkgPathInterface is used as a type assertion in bp2build to get pkg_path property of python_library_host
-type PkgPathInterface interface {
-	PkgPath(ctx BazelConversionContext) *string
-}
-
-var (
-	protoIncludeDirGeneratedSuffix = ".include_dir_bp2build_generated_proto"
-	protoIncludeDirsBp2buildKey    = NewOnceKey("protoIncludeDirsBp2build")
-)
-
-func getProtoIncludeDirsBp2build(config Config) *sync.Map {
-	return config.Once(protoIncludeDirsBp2buildKey, func() interface{} {
-		return &sync.Map{}
-	}).(*sync.Map)
-}
-
-// key for dynamically creating proto_library per proto.include_dirs
-type protoIncludeDirKey struct {
-	dir            string
-	subpackgeInDir string
-}
-
-// createProtoLibraryTargetsForIncludeDirs creates additional proto_library targets for .proto files in includeDirs
-// Since Bazel imposes a constratint that the proto_library must be in the same package as the .proto file, this function
-// might create the targets in a subdirectory of `includeDir`
-// Returns the labels of the proto_library targets
-func createProtoLibraryTargetsForIncludeDirs(ctx Bp2buildMutatorContext, includeDirs []string) bazel.LabelList {
-	var ret bazel.LabelList
-	for _, dir := range includeDirs {
-		if exists, _, _ := ctx.Config().fs.Exists(filepath.Join(dir, "Android.bp")); !exists {
-			ctx.ModuleErrorf("TODO: Add support for proto.include_dir: %v. This directory does not contain an Android.bp file", dir)
-		}
-		dirMap := getProtoIncludeDirsBp2build(ctx.Config())
-		// Find all proto file targets in this dir
-		protoLabelsInDir := BazelLabelForSrcPatternExcludes(ctx, dir, "**/*.proto", []string{})
-		// Partition the labels by package and subpackage(s)
-		protoLabelelsPartitionedByPkg := partitionSrcsByPackage(dir, protoLabelsInDir)
-		for _, pkg := range SortedStringKeys(protoLabelelsPartitionedByPkg) {
-			label := strings.ReplaceAll(dir, "/", ".") + protoIncludeDirGeneratedSuffix
-			ret.Add(&bazel.Label{
-				Label: "//" + pkg + ":" + label,
-			})
-			key := protoIncludeDirKey{dir: dir, subpackgeInDir: pkg}
-			if _, exists := dirMap.LoadOrStore(key, true); exists {
-				// A proto_library has already been created for this package relative to this include dir
-				continue
-			}
-			srcs := protoLabelelsPartitionedByPkg[pkg]
-			rel, err := filepath.Rel(dir, pkg)
-			if err != nil {
-				ctx.ModuleErrorf("Could not create a proto_library in pkg %v due to %v\n", pkg, err)
-			}
-			// Create proto_library
-			attrs := ProtoAttrs{
-				Srcs:                bazel.MakeLabelListAttribute(srcs),
-				Strip_import_prefix: proptools.StringPtr(""),
-			}
-			if rel != "." {
-				attrs.Import_prefix = proptools.StringPtr(rel)
-			}
-
-			// If a specific directory is listed in proto.include_dirs of two separate modules (one host-specific and another device-specific),
-			// we do not want to create the proto_library with target_compatible_with of the first visited of these two modules
-			// As a workarounds, delete `target_compatible_with`
-			alwaysEnabled := bazel.BoolAttribute{}
-			alwaysEnabled.Value = proptools.BoolPtr(true)
-			// Add android and linux explicitly so that fillcommonbp2buildmoduleattrs can override these configs
-			// When we extend b support for other os'es (darwin/windows), we should add those configs here as well
-			alwaysEnabled.SetSelectValue(bazel.OsConfigurationAxis, bazel.OsAndroid, proptools.BoolPtr(true))
-			alwaysEnabled.SetSelectValue(bazel.OsConfigurationAxis, bazel.OsLinux, proptools.BoolPtr(true))
-
-			ctx.CreateBazelTargetModuleWithRestrictions(
-				bazel.BazelTargetModuleProperties{Rule_class: "proto_library"},
-				CommonAttributes{
-					Name: label,
-					Dir:  proptools.StringPtr(pkg),
-					// This proto_library is used to construct a ProtoInfo
-					// But it might not be buildable on its own
-					Tags: bazel.MakeStringListAttribute([]string{"manual"}),
-				},
-				&attrs,
-				alwaysEnabled,
-			)
-		}
-	}
-	return ret
-}
diff --git a/android/soong_config_modules.go b/android/soong_config_modules.go
index 0246a08..ec0edfd 100644
--- a/android/soong_config_modules.go
+++ b/android/soong_config_modules.go
@@ -187,7 +187,6 @@
 
 type soongConfigModuleTypeModule struct {
 	ModuleBase
-	BazelModuleBase
 	properties soongconfig.ModuleTypeProperties
 }
 
@@ -395,10 +394,6 @@
 			return (map[string]blueprint.ModuleFactory)(nil)
 		}
 
-		if ctx.Config().BuildMode == Bp2build {
-			ctx.Config().Bp2buildSoongConfigDefinitions.AddVars(mtDef)
-		}
-
 		globalModuleTypes := ctx.moduleFactories()
 
 		factories := make(map[string]blueprint.ModuleFactory)
@@ -406,7 +401,7 @@
 		for name, moduleType := range mtDef.ModuleTypes {
 			factory := globalModuleTypes[moduleType.BaseModuleType]
 			if factory != nil {
-				factories[name] = configModuleFactory(factory, moduleType, ctx.Config().BuildMode == Bp2build)
+				factories[name] = configModuleFactory(factory, moduleType)
 			} else {
 				reportErrors(ctx, from,
 					fmt.Errorf("missing global module type factory for %q", moduleType.BaseModuleType))
@@ -474,7 +469,7 @@
 
 // configModuleFactory takes an existing soongConfigModuleFactory and a
 // ModuleType to create a new ModuleFactory that uses a custom loadhook.
-func configModuleFactory(factory blueprint.ModuleFactory, moduleType *soongconfig.ModuleType, bp2build bool) blueprint.ModuleFactory {
+func configModuleFactory(factory blueprint.ModuleFactory, moduleType *soongconfig.ModuleType) blueprint.ModuleFactory {
 	// Defer creation of conditional properties struct until the first call from the factory
 	// method. That avoids having to make a special call to the factory to create the properties
 	// structs from which the conditional properties struct is created. This is needed in order to
@@ -515,40 +510,22 @@
 		conditionalProps := proptools.CloneEmptyProperties(conditionalFactoryProps)
 		props = append(props, conditionalProps.Interface())
 
-		if bp2build {
-			// The loadhook is different for bp2build, since we don't want to set a specific
-			// set of property values based on a vendor var -- we want __all of them__ to
-			// generate select statements, so we put the entire soong_config_variables
-			// struct, together with the namespace representing those variables, while
-			// creating the custom module with the factory.
-			AddLoadHook(module, func(ctx LoadHookContext) {
-				if m, ok := module.(Bazelable); ok {
-					m.SetBaseModuleType(moduleType.BaseModuleType)
-					// Instead of applying all properties, keep the entire conditionalProps struct as
-					// part of the custom module so dependent modules can create the selects accordingly
-					m.setNamespacedVariableProps(namespacedVariableProperties{
-						moduleType.ConfigNamespace: []interface{}{conditionalProps.Interface()},
-					})
-				}
-			})
-		} else {
-			// Regular Soong operation wraps the existing module factory with a
-			// conditional on Soong config variables by reading the product
-			// config variables from Make.
-			AddLoadHook(module, func(ctx LoadHookContext) {
-				tracingConfig := newTracingConfig(ctx.Config().VendorConfig(moduleType.ConfigNamespace))
-				newProps, err := soongconfig.PropertiesToApply(moduleType, conditionalProps, tracingConfig)
-				if err != nil {
-					ctx.ModuleErrorf("%s", err)
-					return
-				}
-				for _, ps := range newProps {
-					ctx.AppendProperties(ps)
-				}
+		// Regular Soong operation wraps the existing module factory with a
+		// conditional on Soong config variables by reading the product
+		// config variables from Make.
+		AddLoadHook(module, func(ctx LoadHookContext) {
+			tracingConfig := newTracingConfig(ctx.Config().VendorConfig(moduleType.ConfigNamespace))
+			newProps, err := soongconfig.PropertiesToApply(moduleType, conditionalProps, tracingConfig)
+			if err != nil {
+				ctx.ModuleErrorf("%s", err)
+				return
+			}
+			for _, ps := range newProps {
+				ctx.AppendProperties(ps)
+			}
 
-				module.(Module).base().commonProperties.SoongConfigTrace = tracingConfig.getTrace()
-			})
-		}
+			module.(Module).base().commonProperties.SoongConfigTrace = tracingConfig.getTrace()
+		})
 		return module, props
 	}
 }
diff --git a/apex/Android.bp b/apex/Android.bp
index 0a5063f..27017ae 100644
--- a/apex/Android.bp
+++ b/apex/Android.bp
@@ -11,7 +11,6 @@
         "soong-aconfig",
         "soong-aconfig-codegen",
         "soong-android",
-        "soong-bazel",
         "soong-bpf",
         "soong-cc",
         "soong-filesystem",
@@ -28,7 +27,6 @@
         "apex_sdk_member.go",
         "apex_singleton.go",
         "builder.go",
-        "bp2build.go",
         "deapexer.go",
         "key.go",
         "prebuilt.go",
diff --git a/apex/androidmk.go b/apex/androidmk.go
index 4e968ea..bc68ad3 100644
--- a/apex/androidmk.go
+++ b/apex/androidmk.go
@@ -139,9 +139,6 @@
 				archStr := fi.module.Target().Arch.ArchType.String()
 				fmt.Fprintln(w, "LOCAL_MODULE_TARGET_ARCH :=", archStr)
 			}
-		} else if fi.isBazelPrebuilt && fi.arch != "" {
-			// This apexFile comes from Bazel
-			fmt.Fprintln(w, "LOCAL_MODULE_TARGET_ARCH :=", fi.arch)
 		}
 		if fi.jacocoReportClassesFile != nil {
 			fmt.Fprintln(w, "LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR :=", fi.jacocoReportClassesFile.String())
@@ -185,21 +182,17 @@
 			fmt.Fprintln(w, "include $(BUILD_SYSTEM)/soong_android_app_set.mk")
 		case nativeSharedLib, nativeExecutable, nativeTest:
 			fmt.Fprintln(w, "LOCAL_MODULE_STEM :=", fi.stem())
-			if fi.isBazelPrebuilt {
-				fmt.Fprintln(w, "LOCAL_SOONG_UNSTRIPPED_BINARY :=", fi.unstrippedBuiltFile)
-			} else {
-				if ccMod, ok := fi.module.(*cc.Module); ok {
-					if ccMod.UnstrippedOutputFile() != nil {
-						fmt.Fprintln(w, "LOCAL_SOONG_UNSTRIPPED_BINARY :=", ccMod.UnstrippedOutputFile().String())
-					}
-					ccMod.AndroidMkWriteAdditionalDependenciesForSourceAbiDiff(w)
-					if ccMod.CoverageOutputFile().Valid() {
-						fmt.Fprintln(w, "LOCAL_PREBUILT_COVERAGE_ARCHIVE :=", ccMod.CoverageOutputFile().String())
-					}
-				} else if rustMod, ok := fi.module.(*rust.Module); ok {
-					if rustMod.UnstrippedOutputFile() != nil {
-						fmt.Fprintln(w, "LOCAL_SOONG_UNSTRIPPED_BINARY :=", rustMod.UnstrippedOutputFile().String())
-					}
+			if ccMod, ok := fi.module.(*cc.Module); ok {
+				if ccMod.UnstrippedOutputFile() != nil {
+					fmt.Fprintln(w, "LOCAL_SOONG_UNSTRIPPED_BINARY :=", ccMod.UnstrippedOutputFile().String())
+				}
+				ccMod.AndroidMkWriteAdditionalDependenciesForSourceAbiDiff(w)
+				if ccMod.CoverageOutputFile().Valid() {
+					fmt.Fprintln(w, "LOCAL_PREBUILT_COVERAGE_ARCHIVE :=", ccMod.CoverageOutputFile().String())
+				}
+			} else if rustMod, ok := fi.module.(*rust.Module); ok {
+				if rustMod.UnstrippedOutputFile() != nil {
+					fmt.Fprintln(w, "LOCAL_SOONG_UNSTRIPPED_BINARY :=", rustMod.UnstrippedOutputFile().String())
 				}
 			}
 			fmt.Fprintln(w, "include $(BUILD_SYSTEM)/soong_cc_rust_prebuilt.mk")
diff --git a/apex/apex.go b/apex/apex.go
index 7ddb3e6..a4dc7f1 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -25,13 +25,10 @@
 	"strings"
 
 	"android/soong/aconfig"
-	"android/soong/bazel/cquery"
-
 	"github.com/google/blueprint"
 	"github.com/google/blueprint/proptools"
 
 	"android/soong/android"
-	"android/soong/bazel"
 	"android/soong/bpf"
 	"android/soong/cc"
 	prebuilt_etc "android/soong/etc"
@@ -389,7 +386,6 @@
 	android.ModuleBase
 	android.DefaultableModuleBase
 	android.OverridableModuleBase
-	android.BazelModuleBase
 	multitree.ExportableModuleBase
 
 	// Properties
@@ -547,10 +543,6 @@
 
 	multilib string
 
-	isBazelPrebuilt     bool
-	unstrippedBuiltFile android.Path
-	arch                string
-
 	// TODO(jiyong): remove this
 	module android.Module
 }
@@ -1821,119 +1813,6 @@
 	}
 }
 
-var _ android.MixedBuildBuildable = (*apexBundle)(nil)
-
-func (a *apexBundle) IsMixedBuildSupported(ctx android.BaseModuleContext) bool {
-	return true
-}
-
-func (a *apexBundle) QueueBazelCall(ctx android.BaseModuleContext) {
-	bazelCtx := ctx.Config().BazelContext
-	bazelCtx.QueueBazelRequest(a.GetBazelLabel(ctx, a), cquery.GetApexInfo, android.GetConfigKey(ctx))
-}
-
-// GetBazelLabel returns the bazel label of this apexBundle, or the label of the
-// override_apex module overriding this apexBundle. An apexBundle can be
-// overridden by different override_apex modules (e.g. Google or Go variants),
-// which is handled by the overrides mutators.
-func (a *apexBundle) GetBazelLabel(ctx android.BazelConversionPathContext, module blueprint.Module) string {
-	return a.BazelModuleBase.GetBazelLabel(ctx, a)
-}
-
-func (a *apexBundle) ProcessBazelQueryResponse(ctx android.ModuleContext) {
-	if !a.commonBuildActions(ctx) {
-		return
-	}
-
-	a.setPayloadFsType(ctx)
-	a.setSystemLibLink(ctx)
-	a.compatSymlinks = makeCompatSymlinks(a.BaseModuleName(), ctx)
-
-	bazelCtx := ctx.Config().BazelContext
-	outputs, err := bazelCtx.GetApexInfo(a.GetBazelLabel(ctx, a), android.GetConfigKey(ctx))
-	if err != nil {
-		ctx.ModuleErrorf(err.Error())
-		return
-	}
-	a.installDir = android.PathForModuleInstall(ctx, "apex")
-
-	// Set the output file to .apex or .capex depending on the compression configuration.
-	a.setCompression(ctx)
-	if a.isCompressed {
-		a.outputApexFile = android.PathForBazelOutRelative(ctx, ctx.ModuleDir(), outputs.SignedCompressedOutput)
-	} else {
-		a.outputApexFile = android.PathForBazelOutRelative(ctx, ctx.ModuleDir(), outputs.SignedOutput)
-	}
-	a.outputFile = a.outputApexFile
-
-	if len(outputs.TidyFiles) > 0 {
-		tidyFiles := android.PathsForBazelOut(ctx, outputs.TidyFiles)
-		a.outputFile = android.AttachValidationActions(ctx, a.outputFile, tidyFiles)
-	}
-
-	// TODO(b/257829940): These are used by the apex_keys_text singleton; would probably be a clearer
-	// interface if these were set in a provider rather than the module itself
-	a.publicKeyFile = android.PathForBazelOut(ctx, outputs.BundleKeyInfo[0])
-	a.privateKeyFile = android.PathForBazelOut(ctx, outputs.BundleKeyInfo[1])
-	a.containerCertificateFile = android.PathForBazelOut(ctx, outputs.ContainerKeyInfo[0])
-	a.containerPrivateKeyFile = android.PathForBazelOut(ctx, outputs.ContainerKeyInfo[1])
-
-	// Ensure ApexMkInfo.install_to_system make module names are installed as
-	// part of a bundled build.
-	a.makeModulesToInstall = append(a.makeModulesToInstall, outputs.MakeModulesToInstall...)
-
-	a.bundleModuleFile = android.PathForBazelOut(ctx, outputs.BundleFile)
-	a.nativeApisUsedByModuleFile = android.ModuleOutPath(android.PathForBazelOut(ctx, outputs.SymbolsUsedByApex))
-	a.nativeApisBackedByModuleFile = android.ModuleOutPath(android.PathForBazelOut(ctx, outputs.BackingLibs))
-	// TODO(b/239084755): Generate the java api using.xml file from Bazel.
-	a.javaApisUsedByModuleFile = android.ModuleOutPath(android.PathForBazelOut(ctx, outputs.JavaSymbolsUsedByApex))
-	a.installedFilesFile = android.ModuleOutPath(android.PathForBazelOut(ctx, outputs.InstalledFiles))
-	installSuffix := imageApexSuffix
-	if a.isCompressed {
-		installSuffix = imageCapexSuffix
-	}
-	a.installedFile = ctx.InstallFile(a.installDir, a.Name()+installSuffix, a.outputFile,
-		a.compatSymlinks...)
-
-	// filesInfo in mixed mode must retrieve all information about the apex's
-	// contents completely from the Starlark providers. It should never rely on
-	// Android.bp information, as they might not exist for fully migrated
-	// dependencies.
-	//
-	// Prevent accidental writes to filesInfo in the earlier parts Soong by
-	// asserting it to be nil.
-	if a.filesInfo != nil {
-		panic(
-			fmt.Errorf("internal error: filesInfo must be nil for an apex handled by Bazel. " +
-				"Did something else set filesInfo before this line of code?"))
-	}
-	for _, f := range outputs.PayloadFilesInfo {
-		fileInfo := apexFile{
-			isBazelPrebuilt: true,
-
-			builtFile:           android.PathForBazelOut(ctx, f["built_file"]),
-			unstrippedBuiltFile: android.PathForBazelOut(ctx, f["unstripped_built_file"]),
-			androidMkModuleName: f["make_module_name"],
-			installDir:          f["install_dir"],
-			class:               classes[f["class"]],
-			customStem:          f["basename"],
-			moduleDir:           f["package"],
-		}
-
-		arch := f["arch"]
-		fileInfo.arch = arch
-		if len(arch) > 0 {
-			fileInfo.multilib = "lib32"
-			if strings.HasSuffix(arch, "64") {
-				fileInfo.multilib = "lib64"
-			}
-		}
-
-		a.filesInfo = append(a.filesInfo, fileInfo)
-	}
-	a.apexKeysPath = writeApexKeys(ctx, a)
-}
-
 func (a *apexBundle) setCompression(ctx android.ModuleContext) {
 	if a.testOnlyShouldForceCompression() {
 		a.isCompressed = true
@@ -2587,7 +2466,6 @@
 	android.InitAndroidMultiTargetsArchModule(module, android.DeviceSupported, android.MultilibCommon)
 	android.InitDefaultableModule(module)
 	android.InitOverridableModule(module, &module.overridableProperties.Overrides)
-	android.InitBazelModule(module)
 	multitree.InitExportableModule(module)
 	return module
 }
@@ -2635,7 +2513,6 @@
 type OverrideApex struct {
 	android.ModuleBase
 	android.OverrideModuleBase
-	android.BazelModuleBase
 }
 
 func (o *OverrideApex) GenerateAndroidBuildActions(_ android.ModuleContext) {
@@ -2651,104 +2528,9 @@
 
 	android.InitAndroidMultiTargetsArchModule(m, android.DeviceSupported, android.MultilibCommon)
 	android.InitOverrideModule(m)
-	android.InitBazelModule(m)
 	return m
 }
 
-func (o *OverrideApex) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	if ctx.ModuleType() != "override_apex" {
-		return
-	}
-
-	baseApexModuleName := o.OverrideModuleBase.GetOverriddenModuleName()
-	baseModule, baseApexExists := ctx.ModuleFromName(baseApexModuleName)
-	if !baseApexExists {
-		panic(fmt.Errorf("Base apex module doesn't exist: %s", baseApexModuleName))
-	}
-
-	a, baseModuleIsApex := baseModule.(*apexBundle)
-	if !baseModuleIsApex {
-		panic(fmt.Errorf("Base module is not apex module: %s", baseApexModuleName))
-	}
-	attrs, props, commonAttrs := convertWithBp2build(a, ctx)
-
-	// We just want the name, not module reference.
-	baseApexName := strings.TrimPrefix(baseApexModuleName, ":")
-	attrs.Base_apex_name = &baseApexName
-
-	for _, p := range o.GetProperties() {
-		overridableProperties, ok := p.(*overridableProperties)
-		if !ok {
-			continue
-		}
-
-		// Manifest is either empty or a file in the directory of base APEX and is not overridable.
-		// After it is converted in convertWithBp2build(baseApex, ctx),
-		// the attrs.Manifest.Value.Label is the file path relative to the directory
-		// of base apex. So the following code converts it to a label that looks like
-		// <package of base apex>:<path of manifest file> if base apex and override
-		// apex are not in the same package.
-		baseApexPackage := ctx.OtherModuleDir(a)
-		overrideApexPackage := ctx.ModuleDir()
-		if baseApexPackage != overrideApexPackage {
-			attrs.Manifest.Value.Label = "//" + baseApexPackage + ":" + attrs.Manifest.Value.Label
-		}
-
-		// Key
-		if overridableProperties.Key != nil {
-			attrs.Key = bazel.LabelAttribute{}
-			attrs.Key.SetValue(android.BazelLabelForModuleDepSingle(ctx, *overridableProperties.Key))
-		}
-
-		// Certificate
-		if overridableProperties.Certificate == nil {
-			// If overridableProperties.Certificate is nil, clear this out as
-			// well with zeroed structs, so the override_apex does not use the
-			// base apex's certificate.
-			attrs.Certificate = bazel.LabelAttribute{}
-			attrs.Certificate_name = bazel.StringAttribute{}
-		} else {
-			attrs.Certificate, attrs.Certificate_name = android.BazelStringOrLabelFromProp(ctx, overridableProperties.Certificate)
-		}
-
-		// Prebuilts
-		if overridableProperties.Prebuilts != nil {
-			prebuiltsLabelList := android.BazelLabelForModuleDeps(ctx, overridableProperties.Prebuilts)
-			attrs.Prebuilts = bazel.MakeLabelListAttribute(prebuiltsLabelList)
-		}
-
-		// Compressible
-		if overridableProperties.Compressible != nil {
-			attrs.Compressible = bazel.BoolAttribute{Value: overridableProperties.Compressible}
-		}
-
-		// Package name
-		//
-		// e.g. com.android.adbd's package name is com.android.adbd, but
-		// com.google.android.adbd overrides the package name to com.google.android.adbd
-		//
-		// TODO: this can be overridden from the product configuration, see
-		// getOverrideManifestPackageName and
-		// PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES.
-		//
-		// Instead of generating the BUILD files differently based on the product config
-		// at the point of conversion, this should be handled by the BUILD file loading
-		// from the soong_injection's product_vars, so product config is decoupled from bp2build.
-		if overridableProperties.Package_name != "" {
-			attrs.Package_name = &overridableProperties.Package_name
-		}
-
-		// Logging parent
-		if overridableProperties.Logging_parent != "" {
-			attrs.Logging_parent = &overridableProperties.Logging_parent
-		}
-	}
-
-	commonAttrs.Name = o.Name()
-
-	ctx.CreateBazelTargetModule(props, commonAttrs, &attrs)
-}
-
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // Vality check routines
 //
@@ -3203,306 +2985,6 @@
 	}
 }
 
-// For Bazel / bp2build
-
-type bazelApexBundleAttributes struct {
-	Manifest              bazel.LabelAttribute
-	Android_manifest      bazel.LabelAttribute
-	File_contexts         bazel.LabelAttribute
-	Canned_fs_config      bazel.LabelAttribute
-	Key                   bazel.LabelAttribute
-	Certificate           bazel.LabelAttribute  // used when the certificate prop is a module
-	Certificate_name      bazel.StringAttribute // used when the certificate prop is a string
-	Min_sdk_version       bazel.StringAttribute
-	Updatable             bazel.BoolAttribute
-	Installable           bazel.BoolAttribute
-	Binaries              bazel.LabelListAttribute
-	Prebuilts             bazel.LabelListAttribute
-	Native_shared_libs_32 bazel.LabelListAttribute
-	Native_shared_libs_64 bazel.LabelListAttribute
-	Compressible          bazel.BoolAttribute
-	Package_name          *string
-	Logging_parent        *string
-	Tests                 bazel.LabelListAttribute
-	Base_apex_name        *string
-	Apex_available_name   *string
-	Variant_version       *string
-}
-
-type convertedNativeSharedLibs struct {
-	Native_shared_libs_32 bazel.LabelListAttribute
-	Native_shared_libs_64 bazel.LabelListAttribute
-}
-
-const (
-	minSdkVersionPropName = "Min_sdk_version"
-)
-
-// ConvertWithBp2build performs bp2build conversion of an apex
-func (a *apexBundle) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	// We only convert apex and apex_test modules at this time
-	if ctx.ModuleType() != "apex" && ctx.ModuleType() != "apex_test" {
-		return
-	}
-
-	attrs, props, commonAttrs := convertWithBp2build(a, ctx)
-	commonAttrs.Name = a.Name()
-	ctx.CreateBazelTargetModule(props, commonAttrs, &attrs)
-}
-
-func convertWithBp2build(a *apexBundle, ctx android.Bp2buildMutatorContext) (bazelApexBundleAttributes, bazel.BazelTargetModuleProperties, android.CommonAttributes) {
-	var manifestLabelAttribute bazel.LabelAttribute
-	manifestLabelAttribute.SetValue(android.BazelLabelForModuleSrcSingle(ctx, proptools.StringDefault(a.properties.Manifest, "apex_manifest.json")))
-
-	var androidManifestLabelAttribute bazel.LabelAttribute
-	if a.properties.AndroidManifest != nil {
-		androidManifestLabelAttribute.SetValue(android.BazelLabelForModuleSrcSingle(ctx, *a.properties.AndroidManifest))
-	}
-
-	var fileContextsLabelAttribute bazel.LabelAttribute
-	if a.properties.File_contexts == nil {
-		// See buildFileContexts(), if file_contexts is not specified the default one is used, which is //system/sepolicy/apex:<module name>-file_contexts
-		fileContextsLabelAttribute.SetValue(android.BazelLabelForModuleDepSingle(ctx, a.Name()+"-file_contexts"))
-	} else if strings.HasPrefix(*a.properties.File_contexts, ":") {
-		// File_contexts is a module
-		fileContextsLabelAttribute.SetValue(android.BazelLabelForModuleDepSingle(ctx, *a.properties.File_contexts))
-	} else {
-		// File_contexts is a file
-		fileContextsLabelAttribute.SetValue(android.BazelLabelForModuleSrcSingle(ctx, *a.properties.File_contexts))
-	}
-
-	var cannedFsConfigAttribute bazel.LabelAttribute
-	if a.properties.Canned_fs_config != nil {
-		cannedFsConfigAttribute.SetValue(android.BazelLabelForModuleSrcSingle(ctx, *a.properties.Canned_fs_config))
-	}
-
-	productVariableProps, errs := android.ProductVariableProperties(ctx, a)
-	for _, err := range errs {
-		ctx.ModuleErrorf("ProductVariableProperties error: %s", err)
-	}
-	// TODO(b/219503907) this would need to be set to a.MinSdkVersionValue(ctx) but
-	// given it's coming via config, we probably don't want to put it in here.
-	var minSdkVersion bazel.StringAttribute
-	if a.properties.Min_sdk_version != nil {
-		minSdkVersion.SetValue(*a.properties.Min_sdk_version)
-	}
-	if props, ok := productVariableProps[minSdkVersionPropName]; ok {
-		for c, p := range props {
-			if val, ok := p.(*string); ok {
-				minSdkVersion.SetSelectValue(c.ConfigurationAxis(), c.SelectKey(), val)
-			}
-		}
-	}
-
-	var keyLabelAttribute bazel.LabelAttribute
-	if a.overridableProperties.Key != nil {
-		keyLabelAttribute.SetValue(android.BazelLabelForModuleDepSingle(ctx, *a.overridableProperties.Key))
-	}
-
-	// Certificate
-	certificate, certificateName := android.BazelStringOrLabelFromProp(ctx, a.overridableProperties.Certificate)
-
-	nativeSharedLibs := &convertedNativeSharedLibs{
-		Native_shared_libs_32: bazel.LabelListAttribute{},
-		Native_shared_libs_64: bazel.LabelListAttribute{},
-	}
-
-	// https://cs.android.com/android/platform/superproject/+/master:build/soong/android/arch.go;l=698;drc=f05b0d35d2fbe51be9961ce8ce8031f840295c68
-	// https://cs.android.com/android/platform/superproject/+/master:build/soong/apex/apex.go;l=2549;drc=ec731a83e3e2d80a1254e32fd4ad7ef85e262669
-	// In Soong, decodeMultilib, used to get multilib, return "first" if defaultMultilib is set to "common".
-	// Since apex sets defaultMultilib to be "common", equivalent compileMultilib in bp2build for apex should be "first"
-	compileMultilib := "first"
-	if a.CompileMultilib() != nil {
-		compileMultilib = *a.CompileMultilib()
-	}
-
-	// properties.Native_shared_libs is treated as "both"
-	convertBothLibs(ctx, compileMultilib, a.properties.Native_shared_libs, nativeSharedLibs)
-	convertBothLibs(ctx, compileMultilib, a.properties.Multilib.Both.Native_shared_libs, nativeSharedLibs)
-	convert32Libs(ctx, compileMultilib, a.properties.Multilib.Lib32.Native_shared_libs, nativeSharedLibs)
-	convert64Libs(ctx, compileMultilib, a.properties.Multilib.Lib64.Native_shared_libs, nativeSharedLibs)
-	convertFirstLibs(ctx, compileMultilib, a.properties.Multilib.First.Native_shared_libs, nativeSharedLibs)
-
-	prebuilts := a.overridableProperties.Prebuilts
-	prebuiltsLabelList := android.BazelLabelForModuleDeps(ctx, prebuilts)
-	prebuiltsLabelListAttribute := bazel.MakeLabelListAttribute(prebuiltsLabelList)
-
-	binaries := android.BazelLabelForModuleDeps(ctx, a.properties.ApexNativeDependencies.Binaries)
-	binariesLabelListAttribute := bazel.MakeLabelListAttribute(binaries)
-
-	var testsAttrs bazel.LabelListAttribute
-	if a.testApex && len(a.properties.ApexNativeDependencies.Tests) > 0 {
-		tests := android.BazelLabelForModuleDeps(ctx, a.properties.ApexNativeDependencies.Tests)
-		testsAttrs = bazel.MakeLabelListAttribute(tests)
-	}
-
-	var updatableAttribute bazel.BoolAttribute
-	if a.properties.Updatable != nil {
-		updatableAttribute.Value = a.properties.Updatable
-	}
-
-	var installableAttribute bazel.BoolAttribute
-	if a.properties.Installable != nil {
-		installableAttribute.Value = a.properties.Installable
-	}
-
-	var compressibleAttribute bazel.BoolAttribute
-	if a.overridableProperties.Compressible != nil {
-		compressibleAttribute.Value = a.overridableProperties.Compressible
-	}
-
-	var packageName *string
-	if a.overridableProperties.Package_name != "" {
-		packageName = &a.overridableProperties.Package_name
-	}
-
-	var loggingParent *string
-	if a.overridableProperties.Logging_parent != "" {
-		loggingParent = &a.overridableProperties.Logging_parent
-	}
-
-	attrs := bazelApexBundleAttributes{
-		Manifest:              manifestLabelAttribute,
-		Android_manifest:      androidManifestLabelAttribute,
-		File_contexts:         fileContextsLabelAttribute,
-		Canned_fs_config:      cannedFsConfigAttribute,
-		Min_sdk_version:       minSdkVersion,
-		Key:                   keyLabelAttribute,
-		Certificate:           certificate,
-		Certificate_name:      certificateName,
-		Updatable:             updatableAttribute,
-		Installable:           installableAttribute,
-		Native_shared_libs_32: nativeSharedLibs.Native_shared_libs_32,
-		Native_shared_libs_64: nativeSharedLibs.Native_shared_libs_64,
-		Binaries:              binariesLabelListAttribute,
-		Prebuilts:             prebuiltsLabelListAttribute,
-		Compressible:          compressibleAttribute,
-		Package_name:          packageName,
-		Logging_parent:        loggingParent,
-		Tests:                 testsAttrs,
-		Apex_available_name:   a.properties.Apex_available_name,
-		Variant_version:       a.properties.Variant_version,
-	}
-
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "apex",
-		Bzl_load_location: "//build/bazel/rules/apex:apex.bzl",
-	}
-
-	commonAttrs := android.CommonAttributes{}
-	if a.testApex {
-		commonAttrs.Testonly = proptools.BoolPtr(true)
-		// Set the api_domain of the test apex
-		attrs.Base_apex_name = proptools.StringPtr(cc.GetApiDomain(a.Name()))
-	}
-
-	return attrs, props, commonAttrs
-}
-
-// The following conversions are based on this table where the rows are the compile_multilib
-// values and the columns are the properties.Multilib.*.Native_shared_libs. Each cell
-// represents how the libs should be compiled for a 64-bit/32-bit device: 32 means it
-// should be compiled as 32-bit, 64 means it should be compiled as 64-bit, none means it
-// should not be compiled.
-// multib/compile_multilib, 32,        64,        both,     first
-// 32,                      32/32,     none/none, 32/32,    none/32
-// 64,                      none/none, 64/none,   64/none,  64/none
-// both,                    32/32,     64/none,   32&64/32, 64/32
-// first,                   32/32,     64/none,   64/32,    64/32
-
-func convert32Libs(ctx android.Bp2buildMutatorContext, compileMultilb string,
-	libs []string, nativeSharedLibs *convertedNativeSharedLibs) {
-	libsLabelList := android.BazelLabelForModuleDeps(ctx, libs)
-	switch compileMultilb {
-	case "both", "32":
-		makeNoConfig32SharedLibsAttributes(libsLabelList, nativeSharedLibs)
-	case "first":
-		make32SharedLibsAttributes(libsLabelList, nativeSharedLibs)
-	case "64":
-		// Incompatible, ignore
-	default:
-		invalidCompileMultilib(ctx, compileMultilb)
-	}
-}
-
-func convert64Libs(ctx android.Bp2buildMutatorContext, compileMultilb string,
-	libs []string, nativeSharedLibs *convertedNativeSharedLibs) {
-	libsLabelList := android.BazelLabelForModuleDeps(ctx, libs)
-	switch compileMultilb {
-	case "both", "64", "first":
-		make64SharedLibsAttributes(libsLabelList, nativeSharedLibs)
-	case "32":
-		// Incompatible, ignore
-	default:
-		invalidCompileMultilib(ctx, compileMultilb)
-	}
-}
-
-func convertBothLibs(ctx android.Bp2buildMutatorContext, compileMultilb string,
-	libs []string, nativeSharedLibs *convertedNativeSharedLibs) {
-	libsLabelList := android.BazelLabelForModuleDeps(ctx, libs)
-	switch compileMultilb {
-	case "both":
-		makeNoConfig32SharedLibsAttributes(libsLabelList, nativeSharedLibs)
-		make64SharedLibsAttributes(libsLabelList, nativeSharedLibs)
-	case "first":
-		makeFirstSharedLibsAttributes(libsLabelList, nativeSharedLibs)
-	case "32":
-		makeNoConfig32SharedLibsAttributes(libsLabelList, nativeSharedLibs)
-	case "64":
-		make64SharedLibsAttributes(libsLabelList, nativeSharedLibs)
-	default:
-		invalidCompileMultilib(ctx, compileMultilb)
-	}
-}
-
-func convertFirstLibs(ctx android.Bp2buildMutatorContext, compileMultilb string,
-	libs []string, nativeSharedLibs *convertedNativeSharedLibs) {
-	libsLabelList := android.BazelLabelForModuleDeps(ctx, libs)
-	switch compileMultilb {
-	case "both", "first":
-		makeFirstSharedLibsAttributes(libsLabelList, nativeSharedLibs)
-	case "32":
-		make32SharedLibsAttributes(libsLabelList, nativeSharedLibs)
-	case "64":
-		make64SharedLibsAttributes(libsLabelList, nativeSharedLibs)
-	default:
-		invalidCompileMultilib(ctx, compileMultilb)
-	}
-}
-
-func makeFirstSharedLibsAttributes(libsLabelList bazel.LabelList, nativeSharedLibs *convertedNativeSharedLibs) {
-	make32SharedLibsAttributes(libsLabelList, nativeSharedLibs)
-	make64SharedLibsAttributes(libsLabelList, nativeSharedLibs)
-}
-
-func makeNoConfig32SharedLibsAttributes(libsLabelList bazel.LabelList, nativeSharedLibs *convertedNativeSharedLibs) {
-	list := bazel.LabelListAttribute{}
-	list.SetSelectValue(bazel.NoConfigAxis, "", libsLabelList)
-	nativeSharedLibs.Native_shared_libs_32.Append(list)
-}
-
-func make32SharedLibsAttributes(libsLabelList bazel.LabelList, nativeSharedLibs *convertedNativeSharedLibs) {
-	makeSharedLibsAttributes("x86", libsLabelList, &nativeSharedLibs.Native_shared_libs_32)
-	makeSharedLibsAttributes("arm", libsLabelList, &nativeSharedLibs.Native_shared_libs_32)
-}
-
-func make64SharedLibsAttributes(libsLabelList bazel.LabelList, nativeSharedLibs *convertedNativeSharedLibs) {
-	makeSharedLibsAttributes("x86_64", libsLabelList, &nativeSharedLibs.Native_shared_libs_64)
-	makeSharedLibsAttributes("arm64", libsLabelList, &nativeSharedLibs.Native_shared_libs_64)
-}
-
-func makeSharedLibsAttributes(config string, libsLabelList bazel.LabelList,
-	labelListAttr *bazel.LabelListAttribute) {
-	list := bazel.LabelListAttribute{}
-	list.SetSelectValue(bazel.ArchConfigurationAxis, config, libsLabelList)
-	labelListAttr.Append(list)
-}
-
-func invalidCompileMultilib(ctx android.Bp2buildMutatorContext, value string) {
-	ctx.PropertyErrorf("compile_multilib", "Invalid value: %s", value)
-}
-
 func (a *apexBundle) IsTestApex() bool {
 	return a.testApex
 }
diff --git a/apex/bp2build.go b/apex/bp2build.go
deleted file mode 100644
index a3dda83..0000000
--- a/apex/bp2build.go
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (C) 2022 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//	http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-package apex
-
-import (
-	"android/soong/android"
-	"encoding/json"
-	"strings"
-)
-
-// This file contains the bp2build integration for the apex package.
-
-// Export constants as Starlark using bp2build to Bazel.
-func BazelApexToolchainVars() (string, error) {
-	marshalled, err := json.Marshal(apexAvailBaseline)
-	if err != nil {
-		return "", err
-	}
-	content := []string{
-		"# GENERATED BY SOONG. DO NOT EDIT.",
-		"default_manifest_version = " + android.DefaultUpdatableModuleVersion, // constants.go is different in every branch.
-		"apex_available_baseline = json.decode('''" + string(marshalled) + "''')",
-	}
-	return strings.Join(content, "\n"), nil
-}
diff --git a/apex/bp2build_test.go b/apex/bp2build_test.go
deleted file mode 100644
index 6bab67d..0000000
--- a/apex/bp2build_test.go
+++ /dev/null
@@ -1,545 +0,0 @@
-// Copyright 2022 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//	http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-package apex
-
-import (
-	"android/soong/android"
-	"android/soong/android/allowlists"
-	"android/soong/bazel/cquery"
-	"fmt"
-	"path/filepath"
-	"strings"
-	"testing"
-)
-
-func TestApexImageInMixedBuilds(t *testing.T) {
-	bp := `
-apex_key{
-	name: "foo_key",
-}
-
-apex {
-	name: "foo",
-	key: "foo_key",
-	updatable: true,
-	min_sdk_version: "31",
-	file_contexts: ":myapex-file_contexts",
-	bazel_module: { label: "//:foo" },
-}`
-
-	outputBaseDir := "out/bazel"
-	result := android.GroupFixturePreparers(
-		prepareForApexTest,
-		android.FixtureModifyConfig(func(config android.Config) {
-			config.BazelContext = android.MockBazelContext{
-				OutputBaseDir: outputBaseDir,
-				LabelToApexInfo: map[string]cquery.ApexInfo{
-					"//:foo": cquery.ApexInfo{
-						// ApexInfo Starlark provider.
-						SignedOutput:           "signed_out.apex",
-						SignedCompressedOutput: "signed_out.capex",
-						UnsignedOutput:         "unsigned_out.apex",
-						BundleKeyInfo:          []string{"public_key", "private_key"},
-						ContainerKeyInfo:       []string{"container_cert", "container_private"},
-						SymbolsUsedByApex:      "foo_using.txt",
-						JavaSymbolsUsedByApex:  "foo_using.xml",
-						BundleFile:             "apex_bundle.zip",
-						InstalledFiles:         "installed-files.txt",
-						RequiresLibs:           []string{"//path/c:c", "//path/d:d"},
-
-						// unused
-						PackageName:  "pkg_name",
-						ProvidesLibs: []string{"a", "b"},
-
-						// ApexMkInfo Starlark provider
-						PayloadFilesInfo: []map[string]string{
-							{
-								"built_file":       "bazel-out/adbd",
-								"install_dir":      "bin",
-								"class":            "nativeExecutable",
-								"make_module_name": "adbd",
-								"basename":         "adbd",
-								"package":          "foo",
-							},
-						},
-						MakeModulesToInstall: []string{"c"}, // d deliberately omitted
-					},
-				},
-			}
-		}),
-	).RunTestWithBp(t, bp)
-
-	m := result.ModuleForTests("foo", "android_common_foo").Module()
-	ab, ok := m.(*apexBundle)
-
-	if !ok {
-		t.Fatalf("Expected module to be an apexBundle, was not")
-	}
-
-	// TODO: refactor to android.AssertStringEquals
-	if w, g := "out/bazel/execroot/__main__/public_key", ab.publicKeyFile.String(); w != g {
-		t.Errorf("Expected public key %q, got %q", w, g)
-	}
-
-	if w, g := "out/bazel/execroot/__main__/private_key", ab.privateKeyFile.String(); w != g {
-		t.Errorf("Expected private key %q, got %q", w, g)
-	}
-
-	if w, g := "out/bazel/execroot/__main__/container_cert", ab.containerCertificateFile.String(); w != g {
-		t.Errorf("Expected public container key %q, got %q", w, g)
-	}
-
-	if w, g := "out/bazel/execroot/__main__/container_private", ab.containerPrivateKeyFile.String(); w != g {
-		t.Errorf("Expected private container key %q, got %q", w, g)
-	}
-
-	if w, g := "out/bazel/execroot/__main__/signed_out.apex", ab.outputFile.String(); w != g {
-		t.Errorf("Expected output file %q, got %q", w, g)
-	}
-
-	if w, g := "out/bazel/execroot/__main__/foo_using.txt", ab.nativeApisUsedByModuleFile.String(); w != g {
-		t.Errorf("Expected output file %q, got %q", w, g)
-	}
-
-	if w, g := "out/bazel/execroot/__main__/foo_using.xml", ab.javaApisUsedByModuleFile.String(); w != g {
-		t.Errorf("Expected output file %q, got %q", w, g)
-	}
-
-	if w, g := "out/bazel/execroot/__main__/installed-files.txt", ab.installedFilesFile.String(); w != g {
-		t.Errorf("Expected installed-files.txt %q, got %q", w, g)
-	}
-
-	mkData := android.AndroidMkDataForTest(t, result.TestContext, m)
-	var builder strings.Builder
-	mkData.Custom(&builder, "foo", "BAZEL_TARGET_", "", mkData)
-
-	data := builder.String()
-	if w := "ALL_MODULES.$(my_register_name).BUNDLE := out/bazel/execroot/__main__/apex_bundle.zip"; !strings.Contains(data, w) {
-		t.Errorf("Expected %q in androidmk data, but did not find %q", w, data)
-	}
-	if w := "$(call dist-for-goals,checkbuild,out/bazel/execroot/__main__/installed-files.txt:foo-installed-files.txt)"; !strings.Contains(data, w) {
-		t.Errorf("Expected %q in androidmk data, but did not find %q", w, data)
-	}
-
-	// make modules to be installed to system
-	if len(ab.makeModulesToInstall) != 1 && ab.makeModulesToInstall[0] != "c" {
-		t.Errorf("Expected makeModulesToInstall slice to only contain 'c', got %q", ab.makeModulesToInstall)
-	}
-	if w := "LOCAL_REQUIRED_MODULES := adbd.foo c"; !strings.Contains(data, w) {
-		t.Errorf("Expected %q in androidmk data, but did not find it in %q", w, data)
-	}
-}
-
-func TestApexImageCreatesFilesInfoForMake(t *testing.T) {
-	bp := `
-apex_key{
-	name: "foo_key",
-}
-
-apex {
-	name: "foo",
-	key: "foo_key",
-	updatable: true,
-	min_sdk_version: "31",
-	file_contexts: ":myapex-file_contexts",
-	bazel_module: { label: "//:foo" },
-}`
-
-	outputBaseDir := "out/bazel"
-	result := android.GroupFixturePreparers(
-		prepareForApexTest,
-		android.FixtureModifyConfig(func(config android.Config) {
-			config.BazelContext = android.MockBazelContext{
-				OutputBaseDir: outputBaseDir,
-				LabelToApexInfo: map[string]cquery.ApexInfo{
-					"//:foo": {
-						// ApexInfo Starlark provider. Necessary for the test.
-						SignedOutput:     "signed_out.apex",
-						BundleKeyInfo:    []string{"public_key", "private_key"},
-						ContainerKeyInfo: []string{"container_cert", "container_private"},
-
-						// ApexMkInfo Starlark provider
-						PayloadFilesInfo: []map[string]string{
-							{
-								"arch":                  "arm64",
-								"basename":              "libcrypto.so",
-								"built_file":            "bazel-out/64/libcrypto.so",
-								"class":                 "nativeSharedLib",
-								"install_dir":           "lib64",
-								"make_module_name":      "libcrypto",
-								"package":               "foo/bar",
-								"unstripped_built_file": "bazel-out/64/unstripped_libcrypto.so",
-							},
-							{
-								"arch":             "arm",
-								"basename":         "libcrypto.so",
-								"built_file":       "bazel-out/32/libcrypto.so",
-								"class":            "nativeSharedLib",
-								"install_dir":      "lib",
-								"make_module_name": "libcrypto",
-								"package":          "foo/bar",
-							},
-							{
-								"arch":             "arm64",
-								"basename":         "adbd",
-								"built_file":       "bazel-out/adbd",
-								"class":            "nativeExecutable",
-								"install_dir":      "bin",
-								"make_module_name": "adbd",
-								"package":          "foo",
-							},
-						},
-					},
-				},
-			}
-		}),
-	).RunTestWithBp(t, bp)
-
-	m := result.ModuleForTests("foo", "android_common_foo").Module()
-	ab, ok := m.(*apexBundle)
-
-	if !ok {
-		t.Fatalf("Expected module to be an apexBundle, was not")
-	}
-
-	expectedFilesInfo := []apexFile{
-		{
-			androidMkModuleName: "libcrypto",
-			builtFile:           android.PathForTesting("out/bazel/execroot/__main__/bazel-out/64/libcrypto.so"),
-			class:               nativeSharedLib,
-			customStem:          "libcrypto.so",
-			installDir:          "lib64",
-			moduleDir:           "foo/bar",
-			arch:                "arm64",
-			unstrippedBuiltFile: android.PathForTesting("out/bazel/execroot/__main__/bazel-out/64/unstripped_libcrypto.so"),
-		},
-		{
-			androidMkModuleName: "libcrypto",
-			builtFile:           android.PathForTesting("out/bazel/execroot/__main__/bazel-out/32/libcrypto.so"),
-			class:               nativeSharedLib,
-			customStem:          "libcrypto.so",
-			installDir:          "lib",
-			moduleDir:           "foo/bar",
-			arch:                "arm",
-		},
-		{
-			androidMkModuleName: "adbd",
-			builtFile:           android.PathForTesting("out/bazel/execroot/__main__/bazel-out/adbd"),
-			class:               nativeExecutable,
-			customStem:          "adbd",
-			installDir:          "bin",
-			moduleDir:           "foo",
-			arch:                "arm64",
-		},
-	}
-
-	if len(ab.filesInfo) != len(expectedFilesInfo) {
-		t.Errorf("Expected %d entries in ab.filesInfo, but got %d", len(ab.filesInfo), len(expectedFilesInfo))
-	}
-
-	for idx, f := range ab.filesInfo {
-		expected := expectedFilesInfo[idx]
-		android.AssertSame(t, "different class", expected.class, f.class)
-		android.AssertStringEquals(t, "different built file", expected.builtFile.String(), f.builtFile.String())
-		android.AssertStringEquals(t, "different custom stem", expected.customStem, f.customStem)
-		android.AssertStringEquals(t, "different install dir", expected.installDir, f.installDir)
-		android.AssertStringEquals(t, "different make module name", expected.androidMkModuleName, f.androidMkModuleName)
-		android.AssertStringEquals(t, "different moduleDir", expected.moduleDir, f.moduleDir)
-		android.AssertStringEquals(t, "different arch", expected.arch, f.arch)
-		if expected.unstrippedBuiltFile != nil {
-			if f.unstrippedBuiltFile == nil {
-				t.Errorf("expected an unstripped built file path.")
-			}
-			android.AssertStringEquals(t, "different unstripped built file", expected.unstrippedBuiltFile.String(), f.unstrippedBuiltFile.String())
-		}
-	}
-}
-
-func TestCompressedApexImageInMixedBuilds(t *testing.T) {
-	bp := `
-apex_key{
-	name: "foo_key",
-}
-apex {
-	name: "foo",
-	key: "foo_key",
-	updatable: true,
-	min_sdk_version: "31",
-	file_contexts: ":myapex-file_contexts",
-	bazel_module: { label: "//:foo" },
-	test_only_force_compression: true, // force compression
-}`
-
-	outputBaseDir := "out/bazel"
-	result := android.GroupFixturePreparers(
-		prepareForApexTest,
-		android.FixtureModifyConfig(func(config android.Config) {
-			config.BazelContext = android.MockBazelContext{
-				OutputBaseDir: outputBaseDir,
-				LabelToApexInfo: map[string]cquery.ApexInfo{
-					"//:foo": cquery.ApexInfo{
-						SignedOutput:           "signed_out.apex",
-						SignedCompressedOutput: "signed_out.capex",
-						BundleKeyInfo:          []string{"public_key", "private_key"},
-						ContainerKeyInfo:       []string{"container_cert", "container_private"},
-					},
-				},
-			}
-		}),
-	).RunTestWithBp(t, bp)
-
-	m := result.ModuleForTests("foo", "android_common_foo").Module()
-	ab, ok := m.(*apexBundle)
-	if !ok {
-		t.Fatalf("Expected module to be an apexBundle, was not")
-	}
-
-	if w, g := "out/bazel/execroot/__main__/signed_out.capex", ab.outputFile.String(); w != g {
-		t.Errorf("Expected output file to be compressed apex %q, got %q", w, g)
-	}
-
-	mkData := android.AndroidMkDataForTest(t, result.TestContext, m)
-	var builder strings.Builder
-	mkData.Custom(&builder, "foo", "BAZEL_TARGET_", "", mkData)
-
-	data := builder.String()
-
-	expectedAndroidMk := []string{
-		"LOCAL_PREBUILT_MODULE_FILE := out/bazel/execroot/__main__/signed_out.capex",
-
-		// Check that the source install file is the capex. The dest is not important.
-		"LOCAL_SOONG_INSTALL_PAIRS := out/bazel/execroot/__main__/signed_out.capex:",
-	}
-	for _, androidMk := range expectedAndroidMk {
-		if !strings.Contains(data, androidMk) {
-			t.Errorf("Expected %q in androidmk data, but did not find %q", androidMk, data)
-		}
-	}
-}
-
-func TestOverrideApexImageInMixedBuilds(t *testing.T) {
-	originalBp := `
-apex_key{
-	name: "foo_key",
-}
-apex_key{
-	name: "override_foo_key",
-}
-apex {
-	name: "foo",
-	key: "foo_key",
-	updatable: true,
-	min_sdk_version: "31",
-	package_name: "pkg_name",
-	file_contexts: ":myapex-file_contexts",
-	%s
-}`
-	overrideBp := `
-override_apex {
-	name: "override_foo",
-	key: "override_foo_key",
-	package_name: "override_pkg_name",
-	base: "foo",
-	%s
-}
-`
-
-	originalApexBpDir := "original"
-	originalApexName := "foo"
-	overrideApexBpDir := "override"
-	overrideApexName := "override_foo"
-
-	defaultApexLabel := fmt.Sprintf("//%s:%s", originalApexBpDir, originalApexName)
-	defaultOverrideApexLabel := fmt.Sprintf("//%s:%s", overrideApexBpDir, overrideApexName)
-
-	testCases := []struct {
-		desc                    string
-		bazelModuleProp         string
-		apexLabel               string
-		overrideBazelModuleProp string
-		overrideApexLabel       string
-		bp2buildConfiguration   android.Bp2BuildConversionAllowlist
-	}{
-		{
-			desc:                    "both explicit labels",
-			bazelModuleProp:         `bazel_module: { label: "//:foo" },`,
-			apexLabel:               "//:foo",
-			overrideBazelModuleProp: `bazel_module: { label: "//:override_foo" },`,
-			overrideApexLabel:       "//:override_foo",
-			bp2buildConfiguration:   android.NewBp2BuildAllowlist(),
-		},
-		{
-			desc:                    "both explicitly allowed",
-			bazelModuleProp:         `bazel_module: { bp2build_available: true },`,
-			apexLabel:               defaultApexLabel,
-			overrideBazelModuleProp: `bazel_module: { bp2build_available: true },`,
-			overrideApexLabel:       defaultOverrideApexLabel,
-			bp2buildConfiguration:   android.NewBp2BuildAllowlist(),
-		},
-		{
-			desc:              "original allowed by dir, override allowed by name",
-			apexLabel:         defaultApexLabel,
-			overrideApexLabel: defaultOverrideApexLabel,
-			bp2buildConfiguration: android.NewBp2BuildAllowlist().SetDefaultConfig(
-				map[string]allowlists.BazelConversionConfigEntry{
-					originalApexBpDir: allowlists.Bp2BuildDefaultTrue,
-				}).SetModuleAlwaysConvertList([]string{
-				overrideApexName,
-			}),
-		},
-		{
-			desc:              "both allowed by name",
-			apexLabel:         defaultApexLabel,
-			overrideApexLabel: defaultOverrideApexLabel,
-			bp2buildConfiguration: android.NewBp2BuildAllowlist().SetModuleAlwaysConvertList([]string{
-				originalApexName,
-				overrideApexName,
-			}),
-		},
-		{
-			desc:              "override allowed by name",
-			apexLabel:         defaultApexLabel,
-			overrideApexLabel: defaultOverrideApexLabel,
-			bp2buildConfiguration: android.NewBp2BuildAllowlist().SetModuleAlwaysConvertList([]string{
-				overrideApexName,
-			}),
-		},
-		{
-			desc:              "override allowed by dir",
-			apexLabel:         defaultApexLabel,
-			overrideApexLabel: defaultOverrideApexLabel,
-			bp2buildConfiguration: android.NewBp2BuildAllowlist().SetDefaultConfig(
-				map[string]allowlists.BazelConversionConfigEntry{
-					overrideApexBpDir: allowlists.Bp2BuildDefaultTrue,
-				}).SetModuleAlwaysConvertList([]string{}),
-		},
-	}
-
-	for _, tc := range testCases {
-		t.Run(tc.desc, func(t *testing.T) {
-			outputBaseDir := "out/bazel"
-			result := android.GroupFixturePreparers(
-				prepareForApexTest,
-				android.FixtureAddTextFile(filepath.Join(originalApexBpDir, "Android.bp"), fmt.Sprintf(originalBp, tc.bazelModuleProp)),
-				android.FixtureAddTextFile(filepath.Join(overrideApexBpDir, "Android.bp"), fmt.Sprintf(overrideBp, tc.overrideBazelModuleProp)),
-				android.FixtureModifyContext(func(ctx *android.TestContext) {
-					ctx.RegisterBp2BuildConfig(tc.bp2buildConfiguration)
-				}),
-				android.FixtureModifyConfig(func(config android.Config) {
-					config.BazelContext = android.MockBazelContext{
-						OutputBaseDir: outputBaseDir,
-						LabelToApexInfo: map[string]cquery.ApexInfo{
-							tc.apexLabel: cquery.ApexInfo{
-								// ApexInfo Starlark provider
-								SignedOutput:          "signed_out.apex",
-								UnsignedOutput:        "unsigned_out.apex",
-								BundleKeyInfo:         []string{"public_key", "private_key"},
-								ContainerKeyInfo:      []string{"container_cert", "container_private"},
-								SymbolsUsedByApex:     "foo_using.txt",
-								JavaSymbolsUsedByApex: "foo_using.xml",
-								BundleFile:            "apex_bundle.zip",
-								InstalledFiles:        "installed-files.txt",
-								RequiresLibs:          []string{"//path/c:c", "//path/d:d"},
-
-								// unused
-								PackageName:  "pkg_name",
-								ProvidesLibs: []string{"a", "b"},
-
-								// ApexMkInfo Starlark provider
-								MakeModulesToInstall: []string{"c"}, // d deliberately omitted
-							},
-							tc.overrideApexLabel: cquery.ApexInfo{
-								// ApexInfo Starlark provider
-								SignedOutput:          "override_signed_out.apex",
-								UnsignedOutput:        "override_unsigned_out.apex",
-								BundleKeyInfo:         []string{"override_public_key", "override_private_key"},
-								ContainerKeyInfo:      []string{"override_container_cert", "override_container_private"},
-								SymbolsUsedByApex:     "override_foo_using.txt",
-								JavaSymbolsUsedByApex: "override_foo_using.xml",
-								BundleFile:            "override_apex_bundle.zip",
-								InstalledFiles:        "override_installed-files.txt",
-								RequiresLibs:          []string{"//path/c:c", "//path/d:d"},
-
-								// unused
-								PackageName:  "override_pkg_name",
-								ProvidesLibs: []string{"a", "b"},
-
-								// ApexMkInfo Starlark provider
-								MakeModulesToInstall: []string{"c"}, // d deliberately omitted
-							},
-						},
-					}
-				}),
-			).RunTest(t)
-
-			m := result.ModuleForTests("foo", "android_common_override_foo_foo").Module()
-			ab, ok := m.(*apexBundle)
-			if !ok {
-				t.Fatalf("Expected module to be an apexBundle, was not")
-			}
-
-			if w, g := "out/bazel/execroot/__main__/override_public_key", ab.publicKeyFile.String(); w != g {
-				t.Errorf("Expected public key %q, got %q", w, g)
-			}
-
-			if w, g := "out/bazel/execroot/__main__/override_private_key", ab.privateKeyFile.String(); w != g {
-				t.Errorf("Expected private key %q, got %q", w, g)
-			}
-
-			if w, g := "out/bazel/execroot/__main__/override_container_cert", ab.containerCertificateFile; g != nil && w != g.String() {
-				t.Errorf("Expected public container key %q, got %q", w, g)
-			}
-
-			if w, g := "out/bazel/execroot/__main__/override_container_private", ab.containerPrivateKeyFile; g != nil && w != g.String() {
-				t.Errorf("Expected private container key %q, got %q", w, g)
-			}
-
-			if w, g := "out/bazel/execroot/__main__/override_signed_out.apex", ab.outputFile.String(); w != g {
-				t.Errorf("Expected output file %q, got %q", w, g)
-			}
-
-			if w, g := "out/bazel/execroot/__main__/override_foo_using.txt", ab.nativeApisUsedByModuleFile.String(); w != g {
-				t.Errorf("Expected output file %q, got %q", w, g)
-			}
-
-			if w, g := "out/bazel/execroot/__main__/override_foo_using.xml", ab.javaApisUsedByModuleFile.String(); w != g {
-				t.Errorf("Expected output file %q, got %q", w, g)
-			}
-
-			if w, g := "out/bazel/execroot/__main__/override_installed-files.txt", ab.installedFilesFile.String(); w != g {
-				t.Errorf("Expected installed-files.txt %q, got %q", w, g)
-			}
-
-			mkData := android.AndroidMkDataForTest(t, result.TestContext, m)
-			var builder strings.Builder
-			mkData.Custom(&builder, "override_foo", "BAZEL_TARGET_", "", mkData)
-
-			data := builder.String()
-			if w := "ALL_MODULES.$(my_register_name).BUNDLE := out/bazel/execroot/__main__/override_apex_bundle.zip"; !strings.Contains(data, w) {
-				t.Errorf("Expected %q in androidmk data, but did not find %q", w, data)
-			}
-			if w := "$(call dist-for-goals,checkbuild,out/bazel/execroot/__main__/override_installed-files.txt:override_foo-installed-files.txt)"; !strings.Contains(data, w) {
-				t.Errorf("Expected %q in androidmk data, but did not find %q", w, data)
-			}
-
-			// make modules to be installed to system
-			if len(ab.makeModulesToInstall) != 1 || ab.makeModulesToInstall[0] != "c" {
-				t.Errorf("Expected makeModulestoInstall slice to only contain 'c', got %q", ab.makeModulesToInstall)
-			}
-			if w := "LOCAL_REQUIRED_MODULES := c"; !strings.Contains(data, w) {
-				t.Errorf("Expected %q in androidmk data, but did not find it in %q", w, data)
-			}
-		})
-	}
-}
diff --git a/apex/key.go b/apex/key.go
index 2405e98..e4214f0 100644
--- a/apex/key.go
+++ b/apex/key.go
@@ -18,8 +18,6 @@
 	"fmt"
 
 	"android/soong/android"
-	"android/soong/bazel"
-
 	"github.com/google/blueprint/proptools"
 )
 
@@ -35,7 +33,6 @@
 
 type apexKey struct {
 	android.ModuleBase
-	android.BazelModuleBase
 
 	properties apexKeyProperties
 
@@ -58,7 +55,6 @@
 	module := &apexKey{}
 	module.AddProperties(&module.properties)
 	android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibCommon)
-	android.InitBazelModule(module)
 	return module
 }
 
@@ -159,41 +155,3 @@
 	android.WriteFileRuleVerbatim(ctx, path, entry.String())
 	return path
 }
-
-// For Bazel / bp2build
-
-type bazelApexKeyAttributes struct {
-	Public_key      bazel.LabelAttribute
-	Public_key_name bazel.StringAttribute
-
-	Private_key      bazel.LabelAttribute
-	Private_key_name bazel.StringAttribute
-}
-
-// ConvertWithBp2build performs conversion apexKey for bp2build
-func (m *apexKey) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	apexKeyBp2BuildInternal(ctx, m)
-}
-
-func apexKeyBp2BuildInternal(ctx android.Bp2buildMutatorContext, module *apexKey) {
-	privateKeyLabelAttribute, privateKeyNameAttribute :=
-		android.BazelStringOrLabelFromProp(ctx, module.properties.Private_key)
-
-	publicKeyLabelAttribute, publicKeyNameAttribute :=
-		android.BazelStringOrLabelFromProp(ctx, module.properties.Public_key)
-
-	attrs := &bazelApexKeyAttributes{
-		Private_key:      privateKeyLabelAttribute,
-		Private_key_name: privateKeyNameAttribute,
-
-		Public_key:      publicKeyLabelAttribute,
-		Public_key_name: publicKeyNameAttribute,
-	}
-
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "apex_key",
-		Bzl_load_location: "//build/bazel/rules/apex:apex_key.bzl",
-	}
-
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: module.Name()}, attrs)
-}
diff --git a/bp2build/Android.bp b/bp2build/Android.bp
index c998074..aff703d 100644
--- a/bp2build/Android.bp
+++ b/bp2build/Android.bp
@@ -40,64 +40,8 @@
         "soong-ui-metrics",
     ],
     testSrcs: [
-        "go_conversion_test.go",
-        "aar_conversion_test.go",
-        "aconfig_conversion_test.go",
-        "aidl_library_conversion_test.go",
-        "android_app_certificate_conversion_test.go",
-        "android_app_conversion_test.go",
-        "android_test_conversion_test.go",
-        "apex_conversion_test.go",
-        "apex_key_conversion_test.go",
-        "build_conversion_test.go",
-        "bp2build_product_config_test.go",
-        "bzl_conversion_test.go",
-        "cc_binary_conversion_test.go",
-        "cc_library_conversion_test.go",
-        "cc_library_headers_conversion_test.go",
-        "cc_library_shared_conversion_test.go",
-        "cc_library_static_conversion_test.go",
-        "cc_object_conversion_test.go",
-        "cc_prebuilt_library_conversion_test.go",
-        "cc_prebuilt_library_shared_test.go",
-        "cc_prebuilt_library_static_test.go",
-        "cc_prebuilt_object_conversion_test.go",
-        "cc_test_conversion_test.go",
-        "cc_yasm_conversion_test.go",
         "conversion_test.go",
-        "droiddoc_exported_dir_conversion_test.go",
-        "fdo_profile_conversion_test.go",
-        "filegroup_conversion_test.go",
-        "genrule_conversion_test.go",
-        "gensrcs_conversion_test.go",
-        "java_binary_host_conversion_test.go",
-        "java_host_for_device_conversion_test.go",
-        "java_import_conversion_test.go",
-        "java_library_conversion_test.go",
-        "java_library_host_conversion_test.go",
-        "java_plugin_conversion_test.go",
-        "java_proto_conversion_test.go",
-        "java_sdk_library_conversion_test.go",
-        "java_sdk_library_import_conversion_test.go",
-        "java_test_host_conversion_test.go",
-        "license_conversion_test.go",
-        "license_kind_conversion_test.go",
-        "linker_config_conversion_test.go",
-        "package_conversion_test.go",
         "performance_test.go",
-        "platform_compat_config_conversion_test.go",
-        "prebuilt_etc_conversion_test.go",
-        "python_binary_conversion_test.go",
-        "python_library_conversion_test.go",
-        "python_test_conversion_test.go",
-        "rust_binary_conversion_test.go",
-        "rust_ffi_conversion_test.go",
-        "rust_library_conversion_test.go",
-        "rust_proc_macro_conversion_test.go",
-        "rust_protobuf_conversion_test.go",
-        "sh_conversion_test.go",
-        "sh_test_conversion_test.go",
-        "soong_config_module_type_conversion_test.go",
     ],
     pluginFor: [
         "soong_build",
diff --git a/bp2build/aar_conversion_test.go b/bp2build/aar_conversion_test.go
deleted file mode 100644
index bdad1f4..0000000
--- a/bp2build/aar_conversion_test.go
+++ /dev/null
@@ -1,249 +0,0 @@
-// Copyright 2022 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"testing"
-
-	"android/soong/android"
-	"android/soong/java"
-)
-
-func runAndroidLibraryImportTestWithRegistrationCtxFunc(t *testing.T, registrationCtxFunc func(ctx android.RegistrationContext), tc Bp2buildTestCase) {
-	t.Helper()
-	(&tc).ModuleTypeUnderTest = "android_library_import"
-	(&tc).ModuleTypeUnderTestFactory = java.AARImportFactory
-	RunBp2BuildTestCase(t, registrationCtxFunc, tc)
-}
-
-func runAndroidLibraryImportTest(t *testing.T, tc Bp2buildTestCase) {
-	runAndroidLibraryImportTestWithRegistrationCtxFunc(t, func(ctx android.RegistrationContext) {}, tc)
-}
-
-func TestConvertAndroidLibrary(t *testing.T) {
-	t.Helper()
-	RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {}, Bp2buildTestCase{
-		Description:                "Android Library - simple example",
-		ModuleTypeUnderTest:        "android_library",
-		ModuleTypeUnderTestFactory: java.AndroidLibraryFactory,
-		Filesystem: map[string]string{
-			"lib.java":                     "",
-			"arm.java":                     "",
-			"x86.java":                     "",
-			"res/res.png":                  "",
-			"manifest/AndroidManifest.xml": "",
-		},
-		StubbedBuildDefinitions: []string{"static_lib_dep"},
-		Blueprint: simpleModule("android_library", "static_lib_dep") + `
-android_library {
-	name: "TestLib",
-	srcs: ["lib.java"],
-	arch: {
-		arm: {
-			srcs: ["arm.java"],
-		},
-		x86: {
-			srcs: ["x86.java"],
-		}
-	},
-	manifest: "manifest/AndroidManifest.xml",
-	static_libs: ["static_lib_dep"],
-	sdk_version: "current",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget(
-				"android_library",
-				"TestLib",
-				AttrNameToString{
-					"srcs": `["lib.java"] + select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["arm.java"],
-        "//build/bazel_common_rules/platforms/arch:x86": ["x86.java"],
-        "//conditions:default": [],
-    })`,
-					"manifest":       `"manifest/AndroidManifest.xml"`,
-					"resource_files": `["res/res.png"]`,
-					"deps":           `[":static_lib_dep"]`,
-					"exports":        `[":static_lib_dep"]`,
-					"sdk_version":    `"current"`, // use as default
-				}),
-			MakeNeverlinkDuplicateTarget("android_library", "TestLib"),
-		}})
-}
-
-func TestConvertAndroidLibraryWithNoSources(t *testing.T) {
-	t.Helper()
-	RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {}, Bp2buildTestCase{
-		Description:                "Android Library - modules will deps when there are no sources",
-		ModuleTypeUnderTest:        "android_library",
-		ModuleTypeUnderTestFactory: java.AndroidLibraryFactory,
-		Filesystem: map[string]string{
-			"res/res.png":         "",
-			"AndroidManifest.xml": "",
-		},
-		Blueprint: simpleModule("android_library", "lib_dep") + `
-android_library {
-	name: "TestLib",
-	srcs: [],
-	manifest: "AndroidManifest.xml",
-	libs: ["lib_dep"],
-	sdk_version: "current",
-}
-`,
-		StubbedBuildDefinitions: []string{"lib_dep"},
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget(
-				"android_library",
-				"TestLib",
-				AttrNameToString{
-					"manifest":       `"AndroidManifest.xml"`,
-					"resource_files": `["res/res.png"]`,
-					"sdk_version":    `"current"`, // use as default
-				},
-			),
-			MakeNeverlinkDuplicateTarget("android_library", "TestLib"),
-		},
-	})
-}
-
-func TestConvertAndroidLibraryImport(t *testing.T) {
-	runAndroidLibraryImportTestWithRegistrationCtxFunc(t,
-		func(ctx android.RegistrationContext) {
-			ctx.RegisterModuleType("android_library", java.AndroidLibraryFactory)
-		},
-		Bp2buildTestCase{
-			Description:             "Android Library Import",
-			StubbedBuildDefinitions: []string{"static_lib_dep", "static_import_dep", "static_import_dep-neverlink"},
-			// Bazel's aar_import can only export *_import targets, so we expect
-			// only "static_import_dep" in exports, but both "static_lib_dep" and
-			// "static_import_dep" in deps
-			Blueprint: simpleModule("android_library", "static_lib_dep") + `
-android_library_import {
-        name: "TestImport",
-        aars: ["import.aar"],
-        static_libs: ["static_lib_dep", "static_import_dep"],
-    sdk_version: "current",
-}
-
-android_library_import {
-        name: "static_import_dep",
-        aars: ["import.aar"],
-}
-`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget(
-					"aar_import",
-					"TestImport",
-					AttrNameToString{
-						"aar": `"import.aar"`,
-						"deps": `[
-        ":static_lib_dep",
-        ":static_import_dep",
-    ]`,
-						"exports":     `[":static_import_dep"]`,
-						"sdk_version": `"current"`, // use as default
-					},
-				),
-				MakeNeverlinkDuplicateTarget("android_library", "TestImport"),
-			},
-		},
-	)
-}
-
-func TestConvertAndroidLibraryKotlin(t *testing.T) {
-	t.Helper()
-	RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {}, Bp2buildTestCase{
-		Description:                "Android Library with .kt srcs and common_srcs attribute",
-		ModuleTypeUnderTest:        "android_library",
-		ModuleTypeUnderTestFactory: java.AndroidLibraryFactory,
-		Filesystem: map[string]string{
-			"AndroidManifest.xml": "",
-		},
-		Blueprint: `
-android_library {
-	name: "TestLib",
-	srcs: ["a.java", "b.kt"],
-	common_srcs: ["c.kt"],
-	sdk_version: "current",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget(
-				"android_library",
-				"TestLib",
-				AttrNameToString{
-					"srcs": `[
-        "a.java",
-        "b.kt",
-    ]`,
-					"common_srcs":    `["c.kt"]`,
-					"manifest":       `"AndroidManifest.xml"`,
-					"resource_files": `[]`,
-					"sdk_version":    `"current"`, // use as default
-				}),
-			MakeNeverlinkDuplicateTarget("android_library", "TestLib"),
-		}})
-}
-
-func TestConvertAndroidLibraryKotlinCflags(t *testing.T) {
-	t.Helper()
-	RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {}, Bp2buildTestCase{
-		Description:                "Android Library with .kt srcs and kotlincflags ",
-		ModuleTypeUnderTest:        "android_library",
-		ModuleTypeUnderTestFactory: java.AndroidLibraryFactory,
-		Filesystem: map[string]string{
-			"AndroidManifest.xml": "",
-		},
-		Blueprint: `
-android_library {
-	name: "TestLib",
-	srcs: ["a.java", "b.kt"],
-	kotlincflags: ["-flag1", "-flag2"],
-	sdk_version: "current",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget(
-				"android_library",
-				"TestLib",
-				AttrNameToString{
-					"srcs": `[
-        "a.java",
-        "b.kt",
-    ]`,
-					"kotlincflags": `[
-        "-flag1",
-        "-flag2",
-    ]`,
-					"manifest":       `"AndroidManifest.xml"`,
-					"resource_files": `[]`,
-					"sdk_version":    `"current"`, // use as default
-				}),
-			MakeNeverlinkDuplicateTarget("android_library", "TestLib"),
-		}})
-}
-
-func TestAarImportFailsToConvertNoAars(t *testing.T) {
-	runAndroidLibraryImportTest(t,
-		Bp2buildTestCase{
-			Description: "Android Library Import with no aars does not convert.",
-			Blueprint: `
-android_library_import {
-        name: "no_aar_import",
-}
-`,
-			ExpectedBazelTargets: []string{},
-		})
-}
diff --git a/bp2build/aconfig_conversion_test.go b/bp2build/aconfig_conversion_test.go
deleted file mode 100644
index ac830c6..0000000
--- a/bp2build/aconfig_conversion_test.go
+++ /dev/null
@@ -1,254 +0,0 @@
-// Copyright 2023 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"android/soong/aconfig/codegen"
-	"testing"
-
-	"android/soong/aconfig"
-	"android/soong/android"
-	"android/soong/cc"
-	"android/soong/java"
-)
-
-func registerAconfigModuleTypes(ctx android.RegistrationContext) {
-	aconfig.RegisterBuildComponents(ctx)
-	codegen.RegisterBuildComponents(ctx)
-	ctx.RegisterModuleType("cc_library", cc.LibraryFactory)
-	ctx.RegisterModuleType("java_library", java.LibraryFactory)
-}
-
-func TestAconfigDeclarations(t *testing.T) {
-	bp := `
-	aconfig_declarations {
-		name: "foo",
-		srcs: [
-			"foo1.aconfig",
-			"test/foo2.aconfig",
-		],
-		package: "com.android.foo",
-	}
-	`
-	expectedBazelTarget := MakeBazelTargetNoRestrictions(
-		"aconfig_declarations",
-		"foo",
-		AttrNameToString{
-			"srcs": `[
-        "foo1.aconfig",
-        "test/foo2.aconfig",
-    ]`,
-			"package": `"com.android.foo"`,
-		},
-	)
-	RunBp2BuildTestCase(t, registerAconfigModuleTypes, Bp2buildTestCase{
-		Blueprint:            bp,
-		ExpectedBazelTargets: []string{expectedBazelTarget},
-	})
-}
-
-func TestAconfigValues(t *testing.T) {
-	bp := `
-	aconfig_values {
-		name: "foo",
-		srcs: [
-			"foo1.textproto",
-		],
-		package: "com.android.foo",
-	}
-	aconfig_value_set {
-    name: "bar",
-    values: [
-        "foo"
-    ]
-	}
-	`
-	expectedBazelTargets := []string{
-		MakeBazelTargetNoRestrictions(
-			"aconfig_values",
-			"foo",
-			AttrNameToString{
-				"srcs":    `["foo1.textproto"]`,
-				"package": `"com.android.foo"`,
-			},
-		),
-		MakeBazelTargetNoRestrictions(
-			"aconfig_value_set",
-			"bar",
-			AttrNameToString{
-				"values": `[":foo"]`,
-			},
-		)}
-	RunBp2BuildTestCase(t, registerAconfigModuleTypes, Bp2buildTestCase{
-		Blueprint:            bp,
-		ExpectedBazelTargets: expectedBazelTargets,
-	})
-}
-
-func TestCcAconfigLibrary(t *testing.T) {
-	bp := `
-	aconfig_declarations {
-		name: "foo_aconfig_declarations",
-		srcs: [
-			"foo1.aconfig",
-		],
-		package: "com.android.foo",
-	}
-	cc_library {
-			name: "server_configurable_flags",
-			srcs: ["bar.cc"],
-	}
-	cc_aconfig_library {
-			name: "foo",
-			aconfig_declarations: "foo_aconfig_declarations",
-	}
-	`
-	expectedBazelTargets := []string{
-		MakeBazelTargetNoRestrictions(
-			"aconfig_declarations",
-			"foo_aconfig_declarations",
-			AttrNameToString{
-				"srcs":    `["foo1.aconfig"]`,
-				"package": `"com.android.foo"`,
-			},
-		),
-		MakeBazelTargetNoRestrictions(
-			"cc_aconfig_library",
-			"foo",
-			AttrNameToString{
-				"aconfig_declarations":   `":foo_aconfig_declarations"`,
-				"dynamic_deps":           `[":server_configurable_flags"]`,
-				"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
-			},
-		)}
-	RunBp2BuildTestCase(t, registerAconfigModuleTypes, Bp2buildTestCase{
-		Blueprint:               bp,
-		ExpectedBazelTargets:    expectedBazelTargets,
-		StubbedBuildDefinitions: []string{"server_configurable_flags"},
-	})
-}
-
-func TestJavaAconfigLibrary(t *testing.T) {
-	bp := `
-	aconfig_declarations {
-		name: "foo_aconfig_declarations",
-		srcs: [
-			"foo1.aconfig",
-		],
-		package: "com.android.foo",
-	}
-	java_library {
-			name: "foo_java_library",
-			srcs: ["foo.java"],
-			sdk_version: "current",
-	}
-	java_aconfig_library {
-			name: "foo",
-			aconfig_declarations: "foo_aconfig_declarations",
-			libs: ["foo_java_library"],
-			mode: "test",
-	}
-	`
-	expectedBazelTargets := []string{
-		MakeBazelTargetNoRestrictions(
-			"aconfig_declarations",
-			"foo_aconfig_declarations",
-			AttrNameToString{
-				"srcs":    `["foo1.aconfig"]`,
-				"package": `"com.android.foo"`,
-			},
-		),
-		MakeBazelTargetNoRestrictions(
-			"java_library",
-			"foo_java_library",
-			AttrNameToString{
-				"srcs":                   `["foo.java"]`,
-				"sdk_version":            `"current"`,
-				"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
-			},
-		),
-		MakeNeverlinkDuplicateTarget("java_library", "foo_java_library"),
-		MakeBazelTargetNoRestrictions(
-			"java_aconfig_library",
-			"foo",
-			AttrNameToString{
-				"aconfig_declarations":   `":foo_aconfig_declarations"`,
-				"libs":                   `[":foo_java_library-neverlink"]`,
-				"sdk_version":            `"system_current"`,
-				"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
-			},
-		)}
-	RunBp2BuildTestCase(t, registerAconfigModuleTypes, Bp2buildTestCase{
-		Blueprint:            bp,
-		ExpectedBazelTargets: expectedBazelTargets,
-	})
-}
-
-func TestJavaAconfigLibraryAsTaggedOutput(t *testing.T) {
-	bp := `
-	aconfig_declarations {
-		name: "foo_aconfig_declarations",
-		srcs: [
-			"foo.aconfig",
-		],
-		package: "com.android.foo",
-	}
-	java_library {
-			name: "foo_library",
-			srcs: [":foo_aconfig_library{.generated_srcjars}"],
-			sdk_version: "current",
-			bazel_module: { bp2build_available: true },
-	}
-	java_aconfig_library {
-			name: "foo_aconfig_library",
-			aconfig_declarations: "foo_aconfig_declarations",
-			mode: "test",
-	}
-	`
-	expectedBazelTargets := []string{
-		MakeBazelTargetNoRestrictions(
-			"aconfig_declarations",
-			"foo_aconfig_declarations",
-			AttrNameToString{
-				"srcs":    `["foo.aconfig"]`,
-				"package": `"com.android.foo"`,
-			},
-		),
-		MakeBazelTargetNoRestrictions(
-			"java_aconfig_library",
-			"foo_aconfig_library",
-			AttrNameToString{
-				"aconfig_declarations":   `":foo_aconfig_declarations"`,
-				"sdk_version":            `"system_current"`,
-				"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
-			},
-		),
-		MakeBazelTargetNoRestrictions(
-			"java_library",
-			"foo_library",
-			AttrNameToString{
-				"srcs":                   `[":foo_aconfig_library.generated_srcjars"]`,
-				"sdk_version":            `"current"`,
-				"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
-			},
-		),
-		MakeNeverlinkDuplicateTarget("java_library", "foo_library"),
-	}
-
-	RunBp2BuildTestCase(t, registerAconfigModuleTypes, Bp2buildTestCase{
-		Blueprint:            bp,
-		ExpectedBazelTargets: expectedBazelTargets,
-	})
-}
diff --git a/bp2build/aidl_library_conversion_test.go b/bp2build/aidl_library_conversion_test.go
deleted file mode 100644
index 0522da4..0000000
--- a/bp2build/aidl_library_conversion_test.go
+++ /dev/null
@@ -1,119 +0,0 @@
-// Copyright 2023 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"testing"
-
-	"android/soong/aidl_library"
-	"android/soong/android"
-)
-
-func runAidlLibraryTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	(&tc).ModuleTypeUnderTest = "aidl_library"
-	(&tc).ModuleTypeUnderTestFactory = aidl_library.AidlLibraryFactory
-	RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {}, tc)
-}
-
-func TestAidlLibrary(t *testing.T) {
-	testcases := []struct {
-		name               string
-		bp                 string
-		expectedBazelAttrs AttrNameToString
-	}{
-		{
-			name: "aidl_library with strip_import_prefix",
-			bp: `
-	aidl_library {
-		name: "foo",
-		srcs: ["aidl/foo.aidl"],
-		hdrs: ["aidl/header.aidl"],
-		strip_import_prefix: "aidl",
-	}`,
-			expectedBazelAttrs: AttrNameToString{
-				"srcs":                `["aidl/foo.aidl"]`,
-				"hdrs":                `["aidl/header.aidl"]`,
-				"strip_import_prefix": `"aidl"`,
-				"tags":                `["apex_available=//apex_available:anyapex"]`,
-			},
-		},
-		{
-			name: "aidl_library without strip_import_prefix",
-			bp: `
-	aidl_library {
-		name: "foo",
-		srcs: ["aidl/foo.aidl"],
-		hdrs: ["aidl/header.aidl"],
-	}`,
-			expectedBazelAttrs: AttrNameToString{
-				"srcs": `["aidl/foo.aidl"]`,
-				"hdrs": `["aidl/header.aidl"]`,
-				"tags": `["apex_available=//apex_available:anyapex"]`,
-			},
-		},
-	}
-
-	for _, test := range testcases {
-		t.Run(test.name, func(t *testing.T) {
-			expectedBazelTargets := []string{
-				MakeBazelTargetNoRestrictions("aidl_library", "foo", test.expectedBazelAttrs),
-			}
-			runAidlLibraryTestCase(t, Bp2buildTestCase{
-				Description:          test.name,
-				Blueprint:            test.bp,
-				ExpectedBazelTargets: expectedBazelTargets,
-			})
-		})
-	}
-}
-
-func TestAidlLibraryWithDeps(t *testing.T) {
-	bp := `
-	aidl_library {
-		name: "bar",
-		srcs: ["Bar.aidl"],
-		hdrs: ["aidl/BarHeader.aidl"],
-	}
-	aidl_library {
-		name: "foo",
-		srcs: ["aidl/Foo.aidl"],
-		hdrs: ["aidl/FooHeader.aidl"],
-		strip_import_prefix: "aidl",
-		deps: ["bar"],
-	}`
-
-	t.Run("aidl_library with deps", func(t *testing.T) {
-		expectedBazelTargets := []string{
-			MakeBazelTargetNoRestrictions("aidl_library", "bar", AttrNameToString{
-				"srcs": `["Bar.aidl"]`,
-				"hdrs": `["aidl/BarHeader.aidl"]`,
-				"tags": `["apex_available=//apex_available:anyapex"]`,
-			}),
-			MakeBazelTargetNoRestrictions("aidl_library", "foo", AttrNameToString{
-				"srcs":                `["aidl/Foo.aidl"]`,
-				"hdrs":                `["aidl/FooHeader.aidl"]`,
-				"strip_import_prefix": `"aidl"`,
-				"deps":                `[":bar"]`,
-				"tags":                `["apex_available=//apex_available:anyapex"]`,
-			}),
-		}
-		runAidlLibraryTestCase(t, Bp2buildTestCase{
-			Description:          "aidl_library with deps",
-			Blueprint:            bp,
-			ExpectedBazelTargets: expectedBazelTargets,
-		})
-	})
-}
diff --git a/bp2build/android_app_certificate_conversion_test.go b/bp2build/android_app_certificate_conversion_test.go
deleted file mode 100644
index 0104513..0000000
--- a/bp2build/android_app_certificate_conversion_test.go
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2021 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"android/soong/android"
-	"android/soong/java"
-
-	"testing"
-)
-
-func runAndroidAppCertificateTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	RunBp2BuildTestCase(t, registerAndroidAppCertificateModuleTypes, tc)
-}
-
-func registerAndroidAppCertificateModuleTypes(ctx android.RegistrationContext) {
-}
-
-func TestAndroidAppCertificateSimple(t *testing.T) {
-	runAndroidAppCertificateTestCase(t, Bp2buildTestCase{
-		Description:                "Android app certificate - simple example",
-		ModuleTypeUnderTest:        "android_app_certificate",
-		ModuleTypeUnderTestFactory: java.AndroidAppCertificateFactory,
-		Filesystem:                 map[string]string{},
-		Blueprint: `
-android_app_certificate {
-        name: "com.android.apogee.cert",
-        certificate: "chamber_of_secrets_dir",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTargetNoRestrictions("android_app_certificate", "com.android.apogee.cert", AttrNameToString{
-				"certificate": `"chamber_of_secrets_dir"`,
-			}),
-		}})
-}
diff --git a/bp2build/android_app_conversion_test.go b/bp2build/android_app_conversion_test.go
deleted file mode 100644
index 33d1a04..0000000
--- a/bp2build/android_app_conversion_test.go
+++ /dev/null
@@ -1,518 +0,0 @@
-// Copyright 2021 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"android/soong/android"
-	"android/soong/cc"
-	"android/soong/java"
-
-	"testing"
-)
-
-func runAndroidAppTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	RunBp2BuildTestCase(t, registerAndroidAppModuleTypes, tc)
-}
-
-func registerAndroidAppModuleTypes(ctx android.RegistrationContext) {
-	ctx.RegisterModuleType("filegroup", android.FileGroupFactory)
-	ctx.RegisterModuleType("java_library", java.LibraryFactory)
-	ctx.RegisterModuleType("cc_library_shared", cc.LibrarySharedFactory)
-}
-
-func TestMinimalAndroidApp(t *testing.T) {
-	runAndroidAppTestCase(t, Bp2buildTestCase{
-		Description:                "Android app - simple example",
-		ModuleTypeUnderTest:        "android_app",
-		ModuleTypeUnderTestFactory: java.AndroidAppFactory,
-		Filesystem: map[string]string{
-			"app.java":            "",
-			"res/res.png":         "",
-			"AndroidManifest.xml": "",
-			"assets/asset.png":    "",
-		},
-		Blueprint: `
-android_app {
-		name: "TestApp",
-		srcs: ["app.java"],
-		sdk_version: "current",
-		optimize: {
-			shrink: true,
-			optimize: true,
-			obfuscate: true,
-		},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("android_binary", "TestApp", AttrNameToString{
-				"srcs":           `["app.java"]`,
-				"manifest":       `"AndroidManifest.xml"`,
-				"resource_files": `["res/res.png"]`,
-				"sdk_version":    `"current"`,
-				"assets":         `["assets/asset.png"]`,
-				"assets_dir":     `"assets"`,
-			}),
-		}})
-}
-
-func TestAndroidAppAllSupportedFields(t *testing.T) {
-	runAndroidAppTestCase(t, Bp2buildTestCase{
-		Description:                "Android app - all supported fields",
-		ModuleTypeUnderTest:        "android_app",
-		ModuleTypeUnderTestFactory: java.AndroidAppFactory,
-		Filesystem: map[string]string{
-			"app.java":                     "",
-			"resa/res.png":                 "",
-			"resb/res.png":                 "",
-			"manifest/AndroidManifest.xml": "",
-			"assets_/asset.png":            "",
-		},
-		StubbedBuildDefinitions: []string{"static_lib_dep", "jni_lib"},
-		Blueprint: simpleModule("android_app", "static_lib_dep") +
-			simpleModule("cc_library_shared", "jni_lib") + `
-android_app {
-	name: "TestApp",
-	srcs: ["app.java"],
-	sdk_version: "current",
-	package_name: "com.google",
-	resource_dirs: ["resa", "resb"],
-	manifest: "manifest/AndroidManifest.xml",
-	static_libs: ["static_lib_dep"],
-	java_version: "7",
-	certificate: "foocert",
-	required: ["static_lib_dep"],
-	asset_dirs: ["assets_"],
-	optimize: {
-		enabled: true,
-		optimize: false,
-		proguard_flags_files: ["proguard.flags"],
-		shrink: false,
-		obfuscate: false,
-		ignore_warnings: true,
-	},
-	jni_libs: ["jni_lib"],
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("android_binary", "TestApp", AttrNameToString{
-				"srcs":     `["app.java"]`,
-				"manifest": `"manifest/AndroidManifest.xml"`,
-				"resource_files": `[
-        "resa/res.png",
-        "resb/res.png",
-    ]`,
-				"assets":         `["assets_/asset.png"]`,
-				"assets_dir":     `"assets_"`,
-				"custom_package": `"com.google"`,
-				"deps": `[
-        ":static_lib_dep",
-        ":jni_lib",
-    ]`,
-				"java_version":     `"7"`,
-				"sdk_version":      `"current"`,
-				"certificate_name": `"foocert"`,
-				"proguard_specs": `[
-        "proguard.flags",
-        ":TestApp_proguard_flags",
-    ]`,
-			}),
-			MakeBazelTarget("genrule", "TestApp_proguard_flags", AttrNameToString{
-				"outs": `["TestApp_proguard.flags"]`,
-				"cmd":  `"echo -ignorewarning -dontshrink -dontoptimize -dontobfuscate > $(OUTS)"`,
-			}),
-		}})
-}
-
-func TestAndroidAppArchVariantSrcs(t *testing.T) {
-	runAndroidAppTestCase(t, Bp2buildTestCase{
-		Description:                "Android app - arch variant srcs",
-		ModuleTypeUnderTest:        "android_app",
-		ModuleTypeUnderTestFactory: java.AndroidAppFactory,
-		Filesystem: map[string]string{
-			"arm.java":            "",
-			"x86.java":            "",
-			"res/res.png":         "",
-			"AndroidManifest.xml": "",
-		},
-		Blueprint: `
-android_app {
-	name: "TestApp",
-	sdk_version: "current",
-	arch: {
-		arm: {
-			srcs: ["arm.java"],
-		},
-		x86: {
-			srcs: ["x86.java"],
-		}
-	},
-	optimize: {
-		enabled: false,
-	},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("android_binary", "TestApp", AttrNameToString{
-				"srcs": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["arm.java"],
-        "//build/bazel_common_rules/platforms/arch:x86": ["x86.java"],
-        "//conditions:default": [],
-    })`,
-				"manifest":       `"AndroidManifest.xml"`,
-				"resource_files": `["res/res.png"]`,
-				"sdk_version":    `"current"`,
-				"optimize":       `False`,
-			}),
-		}})
-}
-
-func TestAndroidAppCertIsModule(t *testing.T) {
-	runAndroidAppTestCase(t, Bp2buildTestCase{
-		Description:                "Android app - cert is module",
-		ModuleTypeUnderTest:        "android_app",
-		ModuleTypeUnderTestFactory: java.AndroidAppFactory,
-		Filesystem:                 map[string]string{},
-		StubbedBuildDefinitions:    []string{"foocert"},
-		Blueprint: simpleModule("filegroup", "foocert") + `
-android_app {
-	name: "TestApp",
-	certificate: ":foocert",
-	sdk_version: "current",
-	optimize: {
-		enabled: false,
-	},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("android_binary", "TestApp", AttrNameToString{
-				"certificate":    `":foocert"`,
-				"manifest":       `"AndroidManifest.xml"`,
-				"resource_files": `[]`,
-				"sdk_version":    `"current"`, // use as default
-				"optimize":       `False`,
-			}),
-		}})
-}
-
-func TestAndroidAppCertIsSrcFile(t *testing.T) {
-	runAndroidAppTestCase(t, Bp2buildTestCase{
-		Description:                "Android app - cert is src file",
-		ModuleTypeUnderTest:        "android_app",
-		ModuleTypeUnderTestFactory: java.AndroidAppFactory,
-		Filesystem: map[string]string{
-			"foocert": "",
-		},
-		Blueprint: `
-android_app {
-	name: "TestApp",
-	certificate: "foocert",
-	sdk_version: "current",
-	optimize: {
-		enabled: false,
-	},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("android_binary", "TestApp", AttrNameToString{
-				"certificate":    `"foocert"`,
-				"manifest":       `"AndroidManifest.xml"`,
-				"resource_files": `[]`,
-				"sdk_version":    `"current"`, // use as default
-				"optimize":       `False`,
-			}),
-		}})
-}
-
-func TestAndroidAppCertIsNotSrcOrModule(t *testing.T) {
-	runAndroidAppTestCase(t, Bp2buildTestCase{
-		Description:                "Android app - cert is not src or module",
-		ModuleTypeUnderTest:        "android_app",
-		ModuleTypeUnderTestFactory: java.AndroidAppFactory,
-		Filesystem:                 map[string]string{
-			// deliberate empty
-		},
-		Blueprint: `
-android_app {
-	name: "TestApp",
-	certificate: "foocert",
-	sdk_version: "current",
-	optimize: {
-		enabled: false,
-	},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("android_binary", "TestApp", AttrNameToString{
-				"certificate_name": `"foocert"`,
-				"manifest":         `"AndroidManifest.xml"`,
-				"resource_files":   `[]`,
-				"sdk_version":      `"current"`, // use as default
-				"optimize":         `False`,
-			}),
-		}})
-}
-
-func TestAndroidAppLibs(t *testing.T) {
-	runAndroidAppTestCase(t, Bp2buildTestCase{
-		Description:                "Android app with libs",
-		ModuleTypeUnderTest:        "android_app",
-		ModuleTypeUnderTestFactory: java.AndroidAppFactory,
-		Filesystem:                 map[string]string{},
-		StubbedBuildDefinitions:    []string{"barLib"},
-		Blueprint: simpleModule("java_library", "barLib") + `
-android_app {
-	name: "foo",
-	libs: ["barLib"],
-	sdk_version: "current",
-	optimize: {
-		enabled: false,
-	},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("android_binary", "foo", AttrNameToString{
-				"manifest":       `"AndroidManifest.xml"`,
-				"resource_files": `[]`,
-				"deps":           `[":barLib-neverlink"]`,
-				"sdk_version":    `"current"`, // use as default
-				"optimize":       `False`,
-			}),
-		}})
-}
-
-func TestAndroidAppKotlinSrcs(t *testing.T) {
-	runAndroidAppTestCase(t, Bp2buildTestCase{
-		Description:                "Android app with kotlin sources and common_srcs",
-		ModuleTypeUnderTest:        "android_app",
-		ModuleTypeUnderTestFactory: java.AndroidAppFactory,
-		Filesystem: map[string]string{
-			"res/res.png": "",
-		},
-		StubbedBuildDefinitions: []string{"foocert", "barLib"},
-		Blueprint: simpleModule("filegroup", "foocert") +
-			simpleModule("java_library", "barLib") + `
-android_app {
-	name: "foo",
-	srcs: ["a.java", "b.kt"],
-	certificate: ":foocert",
-	manifest: "fooManifest.xml",
-	libs: ["barLib"],
-	sdk_version: "current",
-	optimize: {
-		enabled: false,
-	},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("android_library", "foo_kt", AttrNameToString{
-				"srcs": `[
-        "a.java",
-        "b.kt",
-    ]`,
-				"manifest":       `"fooManifest.xml"`,
-				"resource_files": `["res/res.png"]`,
-				"deps":           `[":barLib-neverlink"]`,
-				"sdk_version":    `"current"`, // use as default
-			}),
-			MakeBazelTarget("android_binary", "foo", AttrNameToString{
-				"deps":        `[":foo_kt"]`,
-				"certificate": `":foocert"`,
-				"manifest":    `"fooManifest.xml"`,
-				"sdk_version": `"current"`, // use as default
-				"optimize":    `False`,
-			}),
-		}})
-}
-
-func TestAndroidAppCommonSrcs(t *testing.T) {
-	runAndroidAppTestCase(t, Bp2buildTestCase{
-		Description:                "Android app with common_srcs",
-		ModuleTypeUnderTest:        "android_app",
-		ModuleTypeUnderTestFactory: java.AndroidAppFactory,
-		Filesystem: map[string]string{
-			"res/res.png": "",
-		},
-		StubbedBuildDefinitions: []string{"barLib"},
-		Blueprint: `
-android_app {
-	name: "foo",
-	srcs: ["a.java"],
-	common_srcs: ["b.kt"],
-	manifest: "fooManifest.xml",
-	libs:        ["barLib"],
-	sdk_version: "current",
-	optimize: {
-		enabled: false,
-	},
-}
-java_library{
-	name:   "barLib",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("android_library", "foo_kt", AttrNameToString{
-				"srcs":           `["a.java"]`,
-				"common_srcs":    `["b.kt"]`,
-				"manifest":       `"fooManifest.xml"`,
-				"resource_files": `["res/res.png"]`,
-				"deps":           `[":barLib-neverlink"]`,
-				"sdk_version":    `"current"`, // use as default
-			}),
-			MakeBazelTarget("android_binary", "foo", AttrNameToString{
-				"deps":        `[":foo_kt"]`,
-				"manifest":    `"fooManifest.xml"`,
-				"sdk_version": `"current"`, // use as default
-				"optimize":    `False`,
-			}),
-		}})
-}
-
-func TestAndroidAppKotlinCflags(t *testing.T) {
-	runAndroidAppTestCase(t, Bp2buildTestCase{
-		Description:                "Android app with kotlincflags",
-		ModuleTypeUnderTest:        "android_app",
-		ModuleTypeUnderTestFactory: java.AndroidAppFactory,
-		Filesystem: map[string]string{
-			"res/res.png": "",
-		},
-		Blueprint: `
-android_app {
-	name: "foo",
-	srcs: ["a.java", "b.kt"],
-	manifest: "fooManifest.xml",
-	kotlincflags: ["-flag1", "-flag2"],
-	sdk_version: "current",
-	optimize: {
-		enabled: false,
-	},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("android_library", "foo_kt", AttrNameToString{
-				"srcs": `[
-        "a.java",
-        "b.kt",
-    ]`,
-				"manifest":       `"fooManifest.xml"`,
-				"resource_files": `["res/res.png"]`,
-				"kotlincflags": `[
-        "-flag1",
-        "-flag2",
-    ]`,
-				"sdk_version": `"current"`, // use as default
-			}),
-			MakeBazelTarget("android_binary", "foo", AttrNameToString{
-				"deps":        `[":foo_kt"]`,
-				"manifest":    `"fooManifest.xml"`,
-				"sdk_version": `"current"`,
-				"optimize":    `False`,
-			}),
-		}})
-}
-
-func TestAndroidAppManifestSdkVersionsProvided(t *testing.T) {
-	runAndroidAppTestCase(t, Bp2buildTestCase{
-		Description:                "Android app with value for min_sdk_version",
-		ModuleTypeUnderTest:        "android_app",
-		ModuleTypeUnderTestFactory: java.AndroidAppFactory,
-		Filesystem:                 map[string]string{},
-		Blueprint: `
-android_app {
-	name: "foo",
-	sdk_version: "current",
-	min_sdk_version: "24",
-	target_sdk_version: "29",
-	optimize: {
-		enabled: false,
-	},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("android_binary", "foo", AttrNameToString{
-				"manifest":       `"AndroidManifest.xml"`,
-				"resource_files": `[]`,
-				"manifest_values": `{
-        "minSdkVersion": "24",
-        "targetSdkVersion": "29",
-    }`,
-				"sdk_version": `"current"`,
-				"optimize":    `False`,
-			}),
-		}})
-}
-
-func TestAndroidAppMinAndTargetSdkDefaultToSdkVersion(t *testing.T) {
-	runAndroidAppTestCase(t, Bp2buildTestCase{
-		Description:                "Android app with value for sdk_version",
-		ModuleTypeUnderTest:        "android_app",
-		ModuleTypeUnderTestFactory: java.AndroidAppFactory,
-		Filesystem:                 map[string]string{},
-		Blueprint: `
-android_app {
-	name: "foo",
-	sdk_version: "30",
-	optimize: {
-		enabled: false,
-	},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("android_binary", "foo", AttrNameToString{
-				"manifest":       `"AndroidManifest.xml"`,
-				"resource_files": `[]`,
-				"sdk_version":    `"30"`,
-				"optimize":       `False`,
-			}),
-		}})
-}
-
-func TestFrameworkResConversion(t *testing.T) {
-	runAndroidAppTestCase(t, Bp2buildTestCase{
-		Description:                "Framework Res custom conversion",
-		ModuleTypeUnderTest:        "android_app",
-		ModuleTypeUnderTestFactory: java.AndroidAppFactory,
-		Filesystem: map[string]string{
-			"res/values/attrs.xml": "",
-			"resource_zip.zip":     "",
-		},
-		Blueprint: `
-android_app {
-	name: "framework-res",
-	resource_zips: [
-		"resource_zip.zip",
-	],
-	certificate: "platform",
-}
-
-filegroup {
-	name: "framework-res-package-jar",
-	srcs: [":framework-res{.export-package.apk}"],
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("framework_resources", "framework-res", AttrNameToString{
-				"certificate_name":       `"platform"`,
-				"manifest":               `"AndroidManifest.xml"`,
-				"resource_files":         `["res/values/attrs.xml"]`,
-				"resource_zips":          `["resource_zip.zip"]`,
-				"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
-			}),
-			MakeBazelTargetNoRestrictions("filegroup", "framework-res-package-jar", AttrNameToString{
-				"srcs": `[":framework-res.export-package.apk"]`,
-			}),
-		}})
-
-}
diff --git a/bp2build/android_test_conversion_test.go b/bp2build/android_test_conversion_test.go
deleted file mode 100644
index 486f154..0000000
--- a/bp2build/android_test_conversion_test.go
+++ /dev/null
@@ -1,178 +0,0 @@
-// Copyright 2023 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"android/soong/android"
-	"android/soong/java"
-
-	"testing"
-)
-
-func runAndroidTestTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	RunBp2BuildTestCase(t, registerAndroidTestModuleTypes, tc)
-}
-
-func registerAndroidTestModuleTypes(ctx android.RegistrationContext) {
-	ctx.RegisterModuleType("filegroup", android.FileGroupFactory)
-	ctx.RegisterModuleType("java_library", java.LibraryFactory)
-}
-
-func TestMinimalAndroidTest(t *testing.T) {
-	runAndroidAppTestCase(t, Bp2buildTestCase{
-		Description:                "Android test - simple example",
-		ModuleTypeUnderTest:        "android_test",
-		ModuleTypeUnderTestFactory: java.AndroidTestFactory,
-		Filesystem: map[string]string{
-			"app.java":            "",
-			"res/res.png":         "",
-			"AndroidManifest.xml": "",
-			"assets/asset.png":    "",
-		},
-		Blueprint: `
-android_test {
-		name: "TestApp",
-		srcs: ["app.java"],
-		sdk_version: "current",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("android_test", "TestApp", AttrNameToString{
-				"srcs":           `["app.java"]`,
-				"manifest":       `"AndroidManifest.xml"`,
-				"resource_files": `["res/res.png"]`,
-				"sdk_version":    `"current"`,
-				"assets":         `["assets/asset.png"]`,
-				"assets_dir":     `"assets"`,
-				// no need for optimize = False because it's false for
-				// android_test by default
-			}),
-		}})
-}
-
-func TestAndroidTest_OptimizationEnabled(t *testing.T) {
-	runAndroidAppTestCase(t, Bp2buildTestCase{
-		Description:                "Android test - simple example",
-		ModuleTypeUnderTest:        "android_test",
-		ModuleTypeUnderTestFactory: java.AndroidTestFactory,
-		Filesystem: map[string]string{
-			"app.java":            "",
-			"res/res.png":         "",
-			"AndroidManifest.xml": "",
-			"assets/asset.png":    "",
-		},
-		Blueprint: `
-android_test {
-		name: "TestApp",
-		srcs: ["app.java"],
-		sdk_version: "current",
-		optimize: {
-			enabled: true,
-			shrink: true,
-			optimize: true,
-			obfuscate: true,
-		},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("android_test", "TestApp", AttrNameToString{
-				"srcs":           `["app.java"]`,
-				"manifest":       `"AndroidManifest.xml"`,
-				"resource_files": `["res/res.png"]`,
-				"sdk_version":    `"current"`,
-				"assets":         `["assets/asset.png"]`,
-				"assets_dir":     `"assets"`,
-				// optimize = True because it's false for android_test by
-				// default
-				"optimize": `True`,
-			}),
-		}})
-}
-
-func TestMinimalAndroidTestHelperApp(t *testing.T) {
-	runAndroidAppTestCase(t, Bp2buildTestCase{
-		Description:                "Android test helper app - simple example",
-		ModuleTypeUnderTest:        "android_test_helper_app",
-		ModuleTypeUnderTestFactory: java.AndroidTestHelperAppFactory,
-		Filesystem: map[string]string{
-			"app.java":            "",
-			"res/res.png":         "",
-			"AndroidManifest.xml": "",
-			"assets/asset.png":    "",
-		},
-		Blueprint: `
-android_test_helper_app {
-		name: "TestApp",
-		srcs: ["app.java"],
-		sdk_version: "current",
-		optimize: {
-			shrink: true,
-			optimize: true,
-			obfuscate: true,
-		},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("android_binary", "TestApp", AttrNameToString{
-				"srcs":           `["app.java"]`,
-				"manifest":       `"AndroidManifest.xml"`,
-				"resource_files": `["res/res.png"]`,
-				"sdk_version":    `"current"`,
-				"assets":         `["assets/asset.png"]`,
-				"assets_dir":     `"assets"`,
-				"testonly":       `True`,
-				// no need for optimize = True because it's true for
-				// android_test_helper_app by default
-			}),
-		}})
-}
-
-func TestAndroidTestHelperApp_OptimizationDisabled(t *testing.T) {
-	runAndroidAppTestCase(t, Bp2buildTestCase{
-		Description:                "Android test helper app - simple example",
-		ModuleTypeUnderTest:        "android_test_helper_app",
-		ModuleTypeUnderTestFactory: java.AndroidTestHelperAppFactory,
-		Filesystem: map[string]string{
-			"app.java":            "",
-			"res/res.png":         "",
-			"AndroidManifest.xml": "",
-			"assets/asset.png":    "",
-		},
-		Blueprint: `
-android_test_helper_app {
-		name: "TestApp",
-		srcs: ["app.java"],
-		sdk_version: "current",
-		optimize: {
-			enabled: false,
-		},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("android_binary", "TestApp", AttrNameToString{
-				"srcs":           `["app.java"]`,
-				"manifest":       `"AndroidManifest.xml"`,
-				"resource_files": `["res/res.png"]`,
-				"sdk_version":    `"current"`,
-				"assets":         `["assets/asset.png"]`,
-				"assets_dir":     `"assets"`,
-				"testonly":       `True`,
-				// optimize = False because it's true for
-				// android_test_helper_app by default
-				"optimize": `False`,
-			}),
-		}})
-}
diff --git a/bp2build/apex_conversion_test.go b/bp2build/apex_conversion_test.go
deleted file mode 100644
index bdb655b..0000000
--- a/bp2build/apex_conversion_test.go
+++ /dev/null
@@ -1,1562 +0,0 @@
-// Copyright 2021 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"android/soong/android"
-	"android/soong/apex"
-	"android/soong/cc"
-	"android/soong/etc"
-	"android/soong/java"
-	"android/soong/sh"
-
-	"fmt"
-	"testing"
-)
-
-func runApexTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	RunBp2BuildTestCase(t, registerApexModuleTypes, tc)
-}
-
-func registerApexModuleTypes(ctx android.RegistrationContext) {
-	// CC module types needed as they can be APEX dependencies
-	cc.RegisterCCBuildComponents(ctx)
-
-	ctx.RegisterModuleType("sh_binary", sh.ShBinaryFactory)
-	ctx.RegisterModuleType("cc_binary", cc.BinaryFactory)
-	ctx.RegisterModuleType("cc_library", cc.LibraryFactory)
-	ctx.RegisterModuleType("apex_key", apex.ApexKeyFactory)
-	ctx.RegisterModuleType("android_app_certificate", java.AndroidAppCertificateFactory)
-	ctx.RegisterModuleType("filegroup", android.FileGroupFactory)
-	ctx.RegisterModuleType("prebuilt_etc", etc.PrebuiltEtcFactory)
-	ctx.RegisterModuleType("cc_test", cc.TestFactory)
-}
-
-func runOverrideApexTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	RunBp2BuildTestCase(t, registerOverrideApexModuleTypes, tc)
-}
-
-func registerOverrideApexModuleTypes(ctx android.RegistrationContext) {
-	// CC module types needed as they can be APEX dependencies
-	cc.RegisterCCBuildComponents(ctx)
-
-	ctx.RegisterModuleType("sh_binary", sh.ShBinaryFactory)
-	ctx.RegisterModuleType("cc_binary", cc.BinaryFactory)
-	ctx.RegisterModuleType("cc_library", cc.LibraryFactory)
-	ctx.RegisterModuleType("apex_key", apex.ApexKeyFactory)
-	ctx.RegisterModuleType("apex_test", apex.TestApexBundleFactory)
-	ctx.RegisterModuleType("android_app_certificate", java.AndroidAppCertificateFactory)
-	ctx.RegisterModuleType("filegroup", android.FileGroupFactory)
-	ctx.RegisterModuleType("apex", apex.BundleFactory)
-	ctx.RegisterModuleType("apex_defaults", apex.DefaultsFactory)
-	ctx.RegisterModuleType("prebuilt_etc", etc.PrebuiltEtcFactory)
-	ctx.RegisterModuleType("soong_config_module_type", android.SoongConfigModuleTypeFactory)
-	ctx.RegisterModuleType("soong_config_string_variable", android.SoongConfigStringVariableDummyFactory)
-}
-
-func TestApexBundleSimple(t *testing.T) {
-	runApexTestCase(t, Bp2buildTestCase{
-		Description:                "apex - example with all props, file_context is a module in same Android.bp",
-		ModuleTypeUnderTest:        "apex",
-		ModuleTypeUnderTestFactory: apex.BundleFactory,
-		Filesystem:                 map[string]string{},
-		StubbedBuildDefinitions: []string{"com.android.apogee.key", "com.android.apogee.certificate", "native_shared_lib_1", "native_shared_lib_2",
-			"prebuilt_1", "prebuilt_2", "com.android.apogee-file_contexts", "cc_binary_1", "sh_binary_2"},
-		Blueprint: `
-apex_key {
-	name: "com.android.apogee.key",
-	public_key: "com.android.apogee.avbpubkey",
-	private_key: "com.android.apogee.pem",
-}
-
-android_app_certificate {
-	name: "com.android.apogee.certificate",
-	certificate: "com.android.apogee",
-}
-
-cc_library {
-	name: "native_shared_lib_1",
-}
-
-cc_library {
-	name: "native_shared_lib_2",
-}
-
-prebuilt_etc {
-	name: "prebuilt_1",
-}
-
-prebuilt_etc {
-	name: "prebuilt_2",
-}
-
-filegroup {
-	name: "com.android.apogee-file_contexts",
-	srcs: [
-		"com.android.apogee-file_contexts",
-	],
-}
-
-cc_binary { name: "cc_binary_1"}
-sh_binary { name: "sh_binary_2", src: "foo.sh"}
-
-apex {
-	name: "com.android.apogee",
-	manifest: "apogee_manifest.json",
-	androidManifest: "ApogeeAndroidManifest.xml",
-	apex_available_name: "apogee_apex_name",
-	file_contexts: ":com.android.apogee-file_contexts",
-	min_sdk_version: "29",
-	key: "com.android.apogee.key",
-	certificate: ":com.android.apogee.certificate",
-	updatable: false,
-	installable: false,
-	compressible: false,
-	native_shared_libs: [
-	    "native_shared_lib_1",
-	    "native_shared_lib_2",
-	],
-	binaries: [
-		"cc_binary_1",
-		"sh_binary_2",
-	],
-	prebuilts: [
-	    "prebuilt_1",
-	    "prebuilt_2",
-	],
-	package_name: "com.android.apogee.test.package",
-	logging_parent: "logging.parent",
-	variant_version: "3",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("apex", "com.android.apogee", AttrNameToString{
-				"android_manifest":    `"ApogeeAndroidManifest.xml"`,
-				"apex_available_name": `"apogee_apex_name"`,
-				"binaries": `[
-        ":cc_binary_1",
-        ":sh_binary_2",
-    ]`,
-				"certificate":     `":com.android.apogee.certificate"`,
-				"file_contexts":   `":com.android.apogee-file_contexts"`,
-				"installable":     "False",
-				"key":             `":com.android.apogee.key"`,
-				"manifest":        `"apogee_manifest.json"`,
-				"min_sdk_version": `"29"`,
-				"native_shared_libs_32": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": [
-            ":native_shared_lib_1",
-            ":native_shared_lib_2",
-        ],
-        "//build/bazel_common_rules/platforms/arch:x86": [
-            ":native_shared_lib_1",
-            ":native_shared_lib_2",
-        ],
-        "//conditions:default": [],
-    })`,
-				"native_shared_libs_64": `select({
-        "//build/bazel_common_rules/platforms/arch:arm64": [
-            ":native_shared_lib_1",
-            ":native_shared_lib_2",
-        ],
-        "//build/bazel_common_rules/platforms/arch:x86_64": [
-            ":native_shared_lib_1",
-            ":native_shared_lib_2",
-        ],
-        "//conditions:default": [],
-    })`,
-				"prebuilts": `[
-        ":prebuilt_1",
-        ":prebuilt_2",
-    ]`,
-				"updatable":       "False",
-				"compressible":    "False",
-				"package_name":    `"com.android.apogee.test.package"`,
-				"logging_parent":  `"logging.parent"`,
-				"variant_version": `"3"`,
-			}),
-		}})
-}
-
-func TestApexBundleSimple_fileContextsInAnotherAndroidBp(t *testing.T) {
-	runApexTestCase(t, Bp2buildTestCase{
-		Description:                "apex - file contexts is a module in another Android.bp",
-		ModuleTypeUnderTest:        "apex",
-		ModuleTypeUnderTestFactory: apex.BundleFactory,
-		StubbedBuildDefinitions:    []string{"//a/b:com.android.apogee-file_contexts"},
-		Filesystem: map[string]string{
-			"a/b/Android.bp": `
-filegroup {
-	name: "com.android.apogee-file_contexts",
-	srcs: [
-		"com.android.apogee-file_contexts",
-	],
-}
-`,
-		},
-		Blueprint: `
-apex {
-	name: "com.android.apogee",
-	file_contexts: ":com.android.apogee-file_contexts",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("apex", "com.android.apogee", AttrNameToString{
-				"file_contexts": `"//a/b:com.android.apogee-file_contexts"`,
-				"manifest":      `"apex_manifest.json"`,
-			}),
-		}})
-}
-
-func TestApexBundleSimple_fileContextsIsFile(t *testing.T) {
-	runApexTestCase(t, Bp2buildTestCase{
-		Description:                "apex - file contexts is a file",
-		ModuleTypeUnderTest:        "apex",
-		ModuleTypeUnderTestFactory: apex.BundleFactory,
-		Filesystem:                 map[string]string{},
-		Blueprint: `
-apex {
-	name: "com.android.apogee",
-	file_contexts: "file_contexts_file",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("apex", "com.android.apogee", AttrNameToString{
-				"file_contexts": `"file_contexts_file"`,
-				"manifest":      `"apex_manifest.json"`,
-			}),
-		}})
-}
-
-func TestApexBundleSimple_fileContextsIsNotSpecified(t *testing.T) {
-	runApexTestCase(t, Bp2buildTestCase{
-		Description:                "apex - file contexts is not specified",
-		ModuleTypeUnderTest:        "apex",
-		ModuleTypeUnderTestFactory: apex.BundleFactory,
-		StubbedBuildDefinitions:    []string{"//system/sepolicy/apex:com.android.apogee-file_contexts"},
-		Filesystem: map[string]string{
-			"system/sepolicy/apex/Android.bp": `
-filegroup {
-	name: "com.android.apogee-file_contexts",
-	srcs: [
-		"com.android.apogee-file_contexts",
-	],
-}
-`,
-		},
-		Blueprint: `
-apex {
-	name: "com.android.apogee",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("apex", "com.android.apogee", AttrNameToString{
-				"file_contexts": `"//system/sepolicy/apex:com.android.apogee-file_contexts"`,
-				"manifest":      `"apex_manifest.json"`,
-			}),
-		}})
-}
-
-func TestApexBundleCompileMultilibBoth(t *testing.T) {
-	runApexTestCase(t, Bp2buildTestCase{
-		Description:                "apex - example with compile_multilib=both",
-		ModuleTypeUnderTest:        "apex",
-		ModuleTypeUnderTestFactory: apex.BundleFactory,
-		StubbedBuildDefinitions:    append(multilibStubNames(), "//system/sepolicy/apex:com.android.apogee-file_contexts"),
-		Filesystem: map[string]string{
-			"system/sepolicy/apex/Android.bp": `
-filegroup {
-	name: "com.android.apogee-file_contexts",
-	srcs: [ "apogee-file_contexts", ],
-}
-`,
-		},
-		Blueprint: createMultilibBlueprint(`compile_multilib: "both",`),
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("apex", "com.android.apogee", AttrNameToString{
-				"native_shared_libs_32": `[
-        ":unnested_native_shared_lib",
-        ":native_shared_lib_for_both",
-        ":native_shared_lib_for_lib32",
-    ] + select({
-        "//build/bazel_common_rules/platforms/arch:arm": [":native_shared_lib_for_first"],
-        "//build/bazel_common_rules/platforms/arch:x86": [":native_shared_lib_for_first"],
-        "//conditions:default": [],
-    })`,
-				"native_shared_libs_64": `select({
-        "//build/bazel_common_rules/platforms/arch:arm64": [
-            ":unnested_native_shared_lib",
-            ":native_shared_lib_for_both",
-            ":native_shared_lib_for_lib64",
-            ":native_shared_lib_for_first",
-        ],
-        "//build/bazel_common_rules/platforms/arch:x86_64": [
-            ":unnested_native_shared_lib",
-            ":native_shared_lib_for_both",
-            ":native_shared_lib_for_lib64",
-            ":native_shared_lib_for_first",
-        ],
-        "//conditions:default": [],
-    })`,
-				"file_contexts": `"//system/sepolicy/apex:com.android.apogee-file_contexts"`,
-				"manifest":      `"apex_manifest.json"`,
-			}),
-		}})
-}
-
-func TestApexBundleCompileMultilibFirstAndDefaultValue(t *testing.T) {
-	expectedBazelTargets := []string{
-		MakeBazelTarget("apex", "com.android.apogee", AttrNameToString{
-			"native_shared_libs_32": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": [
-            ":unnested_native_shared_lib",
-            ":native_shared_lib_for_both",
-            ":native_shared_lib_for_lib32",
-            ":native_shared_lib_for_first",
-        ],
-        "//build/bazel_common_rules/platforms/arch:x86": [
-            ":unnested_native_shared_lib",
-            ":native_shared_lib_for_both",
-            ":native_shared_lib_for_lib32",
-            ":native_shared_lib_for_first",
-        ],
-        "//conditions:default": [],
-    })`,
-			"native_shared_libs_64": `select({
-        "//build/bazel_common_rules/platforms/arch:arm64": [
-            ":unnested_native_shared_lib",
-            ":native_shared_lib_for_both",
-            ":native_shared_lib_for_lib64",
-            ":native_shared_lib_for_first",
-        ],
-        "//build/bazel_common_rules/platforms/arch:x86_64": [
-            ":unnested_native_shared_lib",
-            ":native_shared_lib_for_both",
-            ":native_shared_lib_for_lib64",
-            ":native_shared_lib_for_first",
-        ],
-        "//conditions:default": [],
-    })`,
-			"file_contexts": `"//system/sepolicy/apex:com.android.apogee-file_contexts"`,
-			"manifest":      `"apex_manifest.json"`,
-		}),
-	}
-
-	// "first" is the default value of compile_multilib prop so `compile_multilib_: "first"` and unset compile_multilib
-	// should result to the same bp2build output
-	compileMultiLibPropValues := []string{`compile_multilib: "first",`, ""}
-	for _, compileMultiLibProp := range compileMultiLibPropValues {
-		descriptionSuffix := compileMultiLibProp
-		if descriptionSuffix == "" {
-			descriptionSuffix = "compile_multilib unset"
-		}
-		runApexTestCase(t, Bp2buildTestCase{
-			Description:                "apex - example with " + compileMultiLibProp,
-			ModuleTypeUnderTest:        "apex",
-			ModuleTypeUnderTestFactory: apex.BundleFactory,
-			StubbedBuildDefinitions:    append(multilibStubNames(), "//system/sepolicy/apex:com.android.apogee-file_contexts"),
-			Filesystem: map[string]string{
-				"system/sepolicy/apex/Android.bp": `
-    filegroup {
-        name: "com.android.apogee-file_contexts",
-        srcs: [ "apogee-file_contexts", ],
-    }
-    `,
-			},
-			Blueprint:            createMultilibBlueprint(compileMultiLibProp),
-			ExpectedBazelTargets: expectedBazelTargets,
-		})
-	}
-}
-
-func TestApexBundleCompileMultilib32(t *testing.T) {
-	runApexTestCase(t, Bp2buildTestCase{
-		Description:                "apex - example with compile_multilib=32",
-		ModuleTypeUnderTest:        "apex",
-		ModuleTypeUnderTestFactory: apex.BundleFactory,
-		StubbedBuildDefinitions:    append(multilibStubNames(), "//system/sepolicy/apex:com.android.apogee-file_contexts"),
-		Filesystem: map[string]string{
-			"system/sepolicy/apex/Android.bp": `
-filegroup {
-	name: "com.android.apogee-file_contexts",
-	srcs: [ "apogee-file_contexts", ],
-}
-`,
-		},
-		Blueprint: createMultilibBlueprint(`compile_multilib: "32",`),
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("apex", "com.android.apogee", AttrNameToString{
-				"native_shared_libs_32": `[
-        ":unnested_native_shared_lib",
-        ":native_shared_lib_for_both",
-        ":native_shared_lib_for_lib32",
-    ] + select({
-        "//build/bazel_common_rules/platforms/arch:arm": [":native_shared_lib_for_first"],
-        "//build/bazel_common_rules/platforms/arch:x86": [":native_shared_lib_for_first"],
-        "//conditions:default": [],
-    })`,
-				"file_contexts": `"//system/sepolicy/apex:com.android.apogee-file_contexts"`,
-				"manifest":      `"apex_manifest.json"`,
-			}),
-		}})
-}
-
-func TestApexBundleCompileMultilib64(t *testing.T) {
-	runApexTestCase(t, Bp2buildTestCase{
-		Description:                "apex - example with compile_multilib=64",
-		ModuleTypeUnderTest:        "apex",
-		ModuleTypeUnderTestFactory: apex.BundleFactory,
-		StubbedBuildDefinitions:    append(multilibStubNames(), "//system/sepolicy/apex:com.android.apogee-file_contexts"),
-		Filesystem: map[string]string{
-			"system/sepolicy/apex/Android.bp": `
-filegroup {
-	name: "com.android.apogee-file_contexts",
-	srcs: [ "apogee-file_contexts", ],
-}
-`,
-		},
-		Blueprint: createMultilibBlueprint(`compile_multilib: "64",`),
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("apex", "com.android.apogee", AttrNameToString{
-				"native_shared_libs_64": `select({
-        "//build/bazel_common_rules/platforms/arch:arm64": [
-            ":unnested_native_shared_lib",
-            ":native_shared_lib_for_both",
-            ":native_shared_lib_for_lib64",
-            ":native_shared_lib_for_first",
-        ],
-        "//build/bazel_common_rules/platforms/arch:x86_64": [
-            ":unnested_native_shared_lib",
-            ":native_shared_lib_for_both",
-            ":native_shared_lib_for_lib64",
-            ":native_shared_lib_for_first",
-        ],
-        "//conditions:default": [],
-    })`,
-				"file_contexts": `"//system/sepolicy/apex:com.android.apogee-file_contexts"`,
-				"manifest":      `"apex_manifest.json"`,
-			}),
-		}})
-}
-
-func multilibStubNames() []string {
-	return []string{"native_shared_lib_for_both", "native_shared_lib_for_first", "native_shared_lib_for_lib32", "native_shared_lib_for_lib64",
-		"native_shared_lib_for_lib64", "unnested_native_shared_lib"}
-}
-
-func createMultilibBlueprint(compile_multilib string) string {
-	return fmt.Sprintf(`
-cc_library {
-	name: "native_shared_lib_for_both",
-}
-
-cc_library {
-	name: "native_shared_lib_for_first",
-}
-
-cc_library {
-	name: "native_shared_lib_for_lib32",
-}
-
-cc_library {
-	name: "native_shared_lib_for_lib64",
-}
-
-cc_library {
-	name: "unnested_native_shared_lib",
-}
-
-apex {
-	name: "com.android.apogee",
-	%s
-	native_shared_libs: ["unnested_native_shared_lib"],
-	multilib: {
-		both: {
-			native_shared_libs: [
-				"native_shared_lib_for_both",
-			],
-		},
-		first: {
-			native_shared_libs: [
-				"native_shared_lib_for_first",
-			],
-		},
-		lib32: {
-			native_shared_libs: [
-				"native_shared_lib_for_lib32",
-			],
-		},
-		lib64: {
-			native_shared_libs: [
-				"native_shared_lib_for_lib64",
-			],
-		},
-	},
-}`, compile_multilib)
-}
-
-func TestApexBundleDefaultPropertyValues(t *testing.T) {
-	runApexTestCase(t, Bp2buildTestCase{
-		Description:                "apex - default property values",
-		ModuleTypeUnderTest:        "apex",
-		ModuleTypeUnderTestFactory: apex.BundleFactory,
-		StubbedBuildDefinitions:    []string{"//system/sepolicy/apex:com.android.apogee-file_contexts"},
-		Filesystem: map[string]string{
-			"system/sepolicy/apex/Android.bp": `
-filegroup {
-	name: "com.android.apogee-file_contexts",
-	srcs: [ "apogee-file_contexts", ],
-}
-`,
-		},
-		Blueprint: `
-apex {
-	name: "com.android.apogee",
-	manifest: "apogee_manifest.json",
-}
-`,
-		ExpectedBazelTargets: []string{MakeBazelTarget("apex", "com.android.apogee", AttrNameToString{
-			"manifest":      `"apogee_manifest.json"`,
-			"file_contexts": `"//system/sepolicy/apex:com.android.apogee-file_contexts"`,
-		}),
-		}})
-}
-
-func TestApexBundleHasBazelModuleProps(t *testing.T) {
-	runApexTestCase(t, Bp2buildTestCase{
-		Description:                "apex - has bazel module props",
-		ModuleTypeUnderTest:        "apex",
-		ModuleTypeUnderTestFactory: apex.BundleFactory,
-		StubbedBuildDefinitions:    []string{"//system/sepolicy/apex:apogee-file_contexts"},
-		Filesystem: map[string]string{
-			"system/sepolicy/apex/Android.bp": `
-filegroup {
-	name: "apogee-file_contexts",
-	srcs: [ "apogee-file_contexts", ],
-}
-`,
-		},
-		Blueprint: `
-apex {
-	name: "apogee",
-	manifest: "manifest.json",
-	bazel_module: { bp2build_available: true },
-}
-`,
-		ExpectedBazelTargets: []string{MakeBazelTarget("apex", "apogee", AttrNameToString{
-			"manifest":      `"manifest.json"`,
-			"file_contexts": `"//system/sepolicy/apex:apogee-file_contexts"`,
-		}),
-		}})
-}
-
-func TestBp2BuildOverrideApex(t *testing.T) {
-	runOverrideApexTestCase(t, Bp2buildTestCase{
-		Description:                "override_apex",
-		ModuleTypeUnderTest:        "override_apex",
-		ModuleTypeUnderTestFactory: apex.OverrideApexFactory,
-		Filesystem:                 map[string]string{},
-		StubbedBuildDefinitions: []string{"com.android.apogee.key", "com.android.apogee.certificate", "native_shared_lib_1",
-			"native_shared_lib_2", "prebuilt_1", "prebuilt_2", "com.android.apogee-file_contexts", "cc_binary_1",
-			"sh_binary_2", "com.android.apogee", "com.google.android.apogee.key", "com.google.android.apogee.certificate"},
-		Blueprint: `
-apex_key {
-	name: "com.android.apogee.key",
-	public_key: "com.android.apogee.avbpubkey",
-	private_key: "com.android.apogee.pem",
-}
-
-android_app_certificate {
-	name: "com.android.apogee.certificate",
-	certificate: "com.android.apogee",
-}
-
-cc_library {
-	name: "native_shared_lib_1",
-}
-
-cc_library {
-	name: "native_shared_lib_2",
-}
-
-prebuilt_etc {
-	name: "prebuilt_1",
-}
-
-prebuilt_etc {
-	name: "prebuilt_2",
-}
-
-filegroup {
-	name: "com.android.apogee-file_contexts",
-	srcs: [
-		"com.android.apogee-file_contexts",
-	],
-}
-
-cc_binary { name: "cc_binary_1" }
-sh_binary { name: "sh_binary_2", src: "foo.sh"}
-
-apex {
-	name: "com.android.apogee",
-	manifest: "apogee_manifest.json",
-	androidManifest: "ApogeeAndroidManifest.xml",
-	file_contexts: ":com.android.apogee-file_contexts",
-	min_sdk_version: "29",
-	key: "com.android.apogee.key",
-	certificate: ":com.android.apogee.certificate",
-	updatable: false,
-	installable: false,
-	compressible: false,
-	native_shared_libs: [
-	    "native_shared_lib_1",
-	    "native_shared_lib_2",
-	],
-	binaries: [
-		"cc_binary_1",
-		"sh_binary_2",
-	],
-	prebuilts: [
-	    "prebuilt_1",
-	    "prebuilt_2",
-	],
-}
-
-apex_key {
-	name: "com.google.android.apogee.key",
-	public_key: "com.google.android.apogee.avbpubkey",
-	private_key: "com.google.android.apogee.pem",
-}
-
-android_app_certificate {
-	name: "com.google.android.apogee.certificate",
-	certificate: "com.google.android.apogee",
-}
-
-override_apex {
-	name: "com.google.android.apogee",
-	base: ":com.android.apogee",
-	key: "com.google.android.apogee.key",
-	certificate: ":com.google.android.apogee.certificate",
-	prebuilts: [],
-	compressible: true,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("apex", "com.google.android.apogee", AttrNameToString{
-				"android_manifest": `"ApogeeAndroidManifest.xml"`,
-				"base_apex_name":   `"com.android.apogee"`,
-				"binaries": `[
-        ":cc_binary_1",
-        ":sh_binary_2",
-    ]`,
-				"certificate":     `":com.google.android.apogee.certificate"`,
-				"file_contexts":   `":com.android.apogee-file_contexts"`,
-				"installable":     "False",
-				"key":             `":com.google.android.apogee.key"`,
-				"manifest":        `"apogee_manifest.json"`,
-				"min_sdk_version": `"29"`,
-				"native_shared_libs_32": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": [
-            ":native_shared_lib_1",
-            ":native_shared_lib_2",
-        ],
-        "//build/bazel_common_rules/platforms/arch:x86": [
-            ":native_shared_lib_1",
-            ":native_shared_lib_2",
-        ],
-        "//conditions:default": [],
-    })`,
-				"native_shared_libs_64": `select({
-        "//build/bazel_common_rules/platforms/arch:arm64": [
-            ":native_shared_lib_1",
-            ":native_shared_lib_2",
-        ],
-        "//build/bazel_common_rules/platforms/arch:x86_64": [
-            ":native_shared_lib_1",
-            ":native_shared_lib_2",
-        ],
-        "//conditions:default": [],
-    })`,
-				"prebuilts":    `[]`,
-				"updatable":    "False",
-				"compressible": "True",
-			}),
-		}})
-}
-
-func TestOverrideApexTest(t *testing.T) {
-	runOverrideApexTestCase(t, Bp2buildTestCase{
-		Description:                "override_apex",
-		ModuleTypeUnderTest:        "override_apex",
-		ModuleTypeUnderTestFactory: apex.OverrideApexFactory,
-		Filesystem:                 map[string]string{},
-		StubbedBuildDefinitions: []string{"com.android.apogee.certificate", "native_shared_lib_1",
-			"prebuilt_1", "com.android.apogee-file_contexts", "cc_binary_1", "sh_binary_2",
-			"com.android.apogee", "com.google.android.apogee.key", "com.google.android.apogee.certificate", "com.android.apogee.key"},
-		Blueprint: `
-apex_key {
-	name: "com.android.apogee.key",
-	public_key: "com.android.apogee.avbpubkey",
-	private_key: "com.android.apogee.pem",
-}
-
-android_app_certificate {
-	name: "com.android.apogee.certificate",
-	certificate: "com.android.apogee",
-}
-
-cc_library {
-	name: "native_shared_lib_1",
-}
-
-prebuilt_etc {
-	name: "prebuilt_1",
-}
-
-filegroup {
-	name: "com.android.apogee-file_contexts",
-	srcs: [
-		"com.android.apogee-file_contexts",
-	],
-}
-
-cc_binary { name: "cc_binary_1"}
-sh_binary { name: "sh_binary_2", src: "foo.sh"}
-
-apex_test {
-	name: "com.android.apogee",
-	manifest: "apogee_manifest.json",
-	androidManifest: "ApogeeAndroidManifest.xml",
-	file_contexts: ":com.android.apogee-file_contexts",
-	min_sdk_version: "29",
-	key: "com.android.apogee.key",
-	certificate: ":com.android.apogee.certificate",
-	updatable: false,
-	installable: false,
-	compressible: false,
-	native_shared_libs: [
-	    "native_shared_lib_1",
-	],
-	binaries: [
-		"cc_binary_1",
-		"sh_binary_2",
-	],
-	prebuilts: [
-	    "prebuilt_1",
-	],
-}
-
-apex_key {
-	name: "com.google.android.apogee.key",
-	public_key: "com.google.android.apogee.avbpubkey",
-	private_key: "com.google.android.apogee.pem",
-}
-
-android_app_certificate {
-	name: "com.google.android.apogee.certificate",
-	certificate: "com.google.android.apogee",
-}
-
-override_apex {
-	name: "com.google.android.apogee",
-	base: ":com.android.apogee",
-	key: "com.google.android.apogee.key",
-	certificate: ":com.google.android.apogee.certificate",
-	prebuilts: [],
-	compressible: true,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("apex", "com.google.android.apogee", AttrNameToString{
-				"android_manifest": `"ApogeeAndroidManifest.xml"`,
-				"base_apex_name":   `"com.android.apogee"`,
-				"binaries": `[
-        ":cc_binary_1",
-        ":sh_binary_2",
-    ]`,
-				"certificate":     `":com.google.android.apogee.certificate"`,
-				"file_contexts":   `":com.android.apogee-file_contexts"`,
-				"installable":     "False",
-				"key":             `":com.google.android.apogee.key"`,
-				"manifest":        `"apogee_manifest.json"`,
-				"min_sdk_version": `"29"`,
-				"native_shared_libs_32": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": [":native_shared_lib_1"],
-        "//build/bazel_common_rules/platforms/arch:x86": [":native_shared_lib_1"],
-        "//conditions:default": [],
-    })`,
-				"native_shared_libs_64": `select({
-        "//build/bazel_common_rules/platforms/arch:arm64": [":native_shared_lib_1"],
-        "//build/bazel_common_rules/platforms/arch:x86_64": [":native_shared_lib_1"],
-        "//conditions:default": [],
-    })`,
-				"testonly":     "True",
-				"prebuilts":    `[]`,
-				"updatable":    "False",
-				"compressible": "True",
-			}),
-		}})
-}
-
-func TestApexBundleSimple_manifestIsEmpty_baseApexOverrideApexInDifferentAndroidBp(t *testing.T) {
-	runOverrideApexTestCase(t, Bp2buildTestCase{
-		Description:                "override_apex - manifest of base apex is empty, base apex and override_apex is in different Android.bp",
-		ModuleTypeUnderTest:        "override_apex",
-		ModuleTypeUnderTestFactory: apex.OverrideApexFactory,
-		StubbedBuildDefinitions:    []string{"//a/b:com.android.apogee", "//system/sepolicy/apex:com.android.apogee-file_contexts"},
-		Filesystem: map[string]string{
-			"system/sepolicy/apex/Android.bp": `
-filegroup {
-	name: "com.android.apogee-file_contexts",
-	srcs: [ "apogee-file_contexts", ],
-}`,
-			"a/b/Android.bp": `
-apex {
-	name: "com.android.apogee",
-}
-`,
-		},
-		Blueprint: `
-override_apex {
-	name: "com.google.android.apogee",
-	base: ":com.android.apogee",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("apex", "com.google.android.apogee", AttrNameToString{
-				"base_apex_name": `"com.android.apogee"`,
-				"file_contexts":  `"//system/sepolicy/apex:com.android.apogee-file_contexts"`,
-				"manifest":       `"//a/b:apex_manifest.json"`,
-			}),
-		}})
-}
-
-func TestApexBundleSimple_manifestIsSet_baseApexOverrideApexInDifferentAndroidBp(t *testing.T) {
-	runOverrideApexTestCase(t, Bp2buildTestCase{
-		Description:                "override_apex - manifest of base apex is set, base apex and override_apex is in different Android.bp",
-		ModuleTypeUnderTest:        "override_apex",
-		ModuleTypeUnderTestFactory: apex.OverrideApexFactory,
-		StubbedBuildDefinitions:    []string{"//a/b:com.android.apogee", "//system/sepolicy/apex:com.android.apogee-file_contexts"},
-		Filesystem: map[string]string{
-			"system/sepolicy/apex/Android.bp": `
-filegroup {
-	name: "com.android.apogee-file_contexts",
-	srcs: [ "apogee-file_contexts", ],
-}`,
-			"a/b/Android.bp": `
-apex {
-	name: "com.android.apogee",
-  manifest: "apogee_manifest.json",
-}
-`,
-		},
-		Blueprint: `
-override_apex {
-	name: "com.google.android.apogee",
-  base: ":com.android.apogee",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("apex", "com.google.android.apogee", AttrNameToString{
-				"base_apex_name": `"com.android.apogee"`,
-				"file_contexts":  `"//system/sepolicy/apex:com.android.apogee-file_contexts"`,
-				"manifest":       `"//a/b:apogee_manifest.json"`,
-			}),
-		}})
-}
-
-func TestApexBundleSimple_manifestIsEmpty_baseApexOverrideApexInSameAndroidBp(t *testing.T) {
-	runOverrideApexTestCase(t, Bp2buildTestCase{
-		Description:                "override_apex - manifest of base apex is empty, base apex and override_apex is in same Android.bp",
-		ModuleTypeUnderTest:        "override_apex",
-		ModuleTypeUnderTestFactory: apex.OverrideApexFactory,
-		StubbedBuildDefinitions:    []string{"com.android.apogee", "//system/sepolicy/apex:com.android.apogee-file_contexts"},
-		Filesystem: map[string]string{
-			"system/sepolicy/apex/Android.bp": `
-filegroup {
-	name: "com.android.apogee-file_contexts",
-	srcs: [ "apogee-file_contexts", ],
-}`,
-		},
-		Blueprint: `
-apex {
-	name: "com.android.apogee",
-}
-
-override_apex {
-	name: "com.google.android.apogee",
-  base: ":com.android.apogee",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("apex", "com.google.android.apogee", AttrNameToString{
-				"base_apex_name": `"com.android.apogee"`,
-				"file_contexts":  `"//system/sepolicy/apex:com.android.apogee-file_contexts"`,
-				"manifest":       `"apex_manifest.json"`,
-			}),
-		}})
-}
-
-func TestApexBundleSimple_manifestIsSet_baseApexOverrideApexInSameAndroidBp(t *testing.T) {
-	runOverrideApexTestCase(t, Bp2buildTestCase{
-		Description:                "override_apex - manifest of base apex is set, base apex and override_apex is in same Android.bp",
-		ModuleTypeUnderTest:        "override_apex",
-		ModuleTypeUnderTestFactory: apex.OverrideApexFactory,
-		StubbedBuildDefinitions:    []string{"com.android.apogee", "//system/sepolicy/apex:com.android.apogee-file_contexts"},
-		Filesystem: map[string]string{
-			"system/sepolicy/apex/Android.bp": `
-filegroup {
-	name: "com.android.apogee-file_contexts",
-	srcs: [ "apogee-file_contexts", ],
-}`,
-		},
-		Blueprint: `
-apex {
-	name: "com.android.apogee",
-  manifest: "apogee_manifest.json",
-}
-
-override_apex {
-	name: "com.google.android.apogee",
-  base: ":com.android.apogee",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("apex", "com.google.android.apogee", AttrNameToString{
-				"base_apex_name": `"com.android.apogee"`,
-				"file_contexts":  `"//system/sepolicy/apex:com.android.apogee-file_contexts"`,
-				"manifest":       `"apogee_manifest.json"`,
-			}),
-		}})
-}
-
-func TestApexBundleSimple_packageNameOverride(t *testing.T) {
-	runOverrideApexTestCase(t, Bp2buildTestCase{
-		Description:                "override_apex - override package name",
-		ModuleTypeUnderTest:        "override_apex",
-		ModuleTypeUnderTestFactory: apex.OverrideApexFactory,
-		StubbedBuildDefinitions:    []string{"com.android.apogee", "//system/sepolicy/apex:com.android.apogee-file_contexts"},
-		Filesystem: map[string]string{
-			"system/sepolicy/apex/Android.bp": `
-filegroup {
-	name: "com.android.apogee-file_contexts",
-	srcs: [ "apogee-file_contexts", ],
-}`,
-		},
-		Blueprint: `
-apex {
-	name: "com.android.apogee",
-}
-
-override_apex {
-	name: "com.google.android.apogee",
-	base: ":com.android.apogee",
-	package_name: "com.google.android.apogee",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("apex", "com.google.android.apogee", AttrNameToString{
-				"base_apex_name": `"com.android.apogee"`,
-				"file_contexts":  `"//system/sepolicy/apex:com.android.apogee-file_contexts"`,
-				"manifest":       `"apex_manifest.json"`,
-				"package_name":   `"com.google.android.apogee"`,
-			}),
-		}})
-}
-
-func TestApexBundleSimple_NoPrebuiltsOverride(t *testing.T) {
-	runOverrideApexTestCase(t, Bp2buildTestCase{
-		Description:                "override_apex - no override",
-		ModuleTypeUnderTest:        "override_apex",
-		ModuleTypeUnderTestFactory: apex.OverrideApexFactory,
-		StubbedBuildDefinitions:    []string{"prebuilt_file", "com.android.apogee", "//system/sepolicy/apex:com.android.apogee-file_contexts"},
-		Filesystem: map[string]string{
-			"system/sepolicy/apex/Android.bp": `
-filegroup {
-	name: "com.android.apogee-file_contexts",
-	srcs: [ "apogee-file_contexts", ],
-}`,
-		},
-		Blueprint: `
-prebuilt_etc {
-	name: "prebuilt_file",
-}
-
-apex {
-	name: "com.android.apogee",
-	prebuilts: ["prebuilt_file"]
-}
-
-override_apex {
-	name: "com.google.android.apogee",
-	base: ":com.android.apogee",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("apex", "com.google.android.apogee", AttrNameToString{
-				"base_apex_name": `"com.android.apogee"`,
-				"file_contexts":  `"//system/sepolicy/apex:com.android.apogee-file_contexts"`,
-				"manifest":       `"apex_manifest.json"`,
-				"prebuilts":      `[":prebuilt_file"]`,
-			}),
-		}})
-}
-
-func TestApexBundleSimple_PrebuiltsOverride(t *testing.T) {
-	runOverrideApexTestCase(t, Bp2buildTestCase{
-		Description:                "override_apex - ooverride",
-		ModuleTypeUnderTest:        "override_apex",
-		ModuleTypeUnderTestFactory: apex.OverrideApexFactory,
-		StubbedBuildDefinitions:    []string{"prebuilt_file", "prebuilt_file2", "com.android.apogee", "//system/sepolicy/apex:com.android.apogee-file_contexts"},
-		Filesystem: map[string]string{
-			"system/sepolicy/apex/Android.bp": `
-filegroup {
-	name: "com.android.apogee-file_contexts",
-	srcs: [ "apogee-file_contexts", ],
-}`,
-		},
-		Blueprint: `
-prebuilt_etc {
-	name: "prebuilt_file",
-}
-
-prebuilt_etc {
-	name: "prebuilt_file2",
-}
-
-apex {
-	name: "com.android.apogee",
-	prebuilts: ["prebuilt_file"]
-}
-
-override_apex {
-	name: "com.google.android.apogee",
-	base: ":com.android.apogee",
-	prebuilts: ["prebuilt_file2"]
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("apex", "com.google.android.apogee", AttrNameToString{
-				"base_apex_name": `"com.android.apogee"`,
-				"file_contexts":  `"//system/sepolicy/apex:com.android.apogee-file_contexts"`,
-				"manifest":       `"apex_manifest.json"`,
-				"prebuilts":      `[":prebuilt_file2"]`,
-			}),
-		}})
-}
-
-func TestApexBundleSimple_PrebuiltsOverrideEmptyList(t *testing.T) {
-	runOverrideApexTestCase(t, Bp2buildTestCase{
-		Description:                "override_apex - override with empty list",
-		ModuleTypeUnderTest:        "override_apex",
-		ModuleTypeUnderTestFactory: apex.OverrideApexFactory,
-		StubbedBuildDefinitions:    []string{"prebuilt_file", "com.android.apogee", "//system/sepolicy/apex:com.android.apogee-file_contexts"},
-		Filesystem: map[string]string{
-			"system/sepolicy/apex/Android.bp": `
-filegroup {
-	name: "com.android.apogee-file_contexts",
-	srcs: [ "apogee-file_contexts", ],
-}`,
-		},
-		Blueprint: `
-prebuilt_etc {
-	name: "prebuilt_file",
-}
-
-apex {
-	name: "com.android.apogee",
-	prebuilts: ["prebuilt_file"]
-}
-
-override_apex {
-	name: "com.google.android.apogee",
-	base: ":com.android.apogee",
-    prebuilts: [],
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("apex", "com.google.android.apogee", AttrNameToString{
-				"base_apex_name": `"com.android.apogee"`,
-				"file_contexts":  `"//system/sepolicy/apex:com.android.apogee-file_contexts"`,
-				"manifest":       `"apex_manifest.json"`,
-				"prebuilts":      `[]`,
-			}),
-		}})
-}
-
-func TestApexBundleSimple_NoLoggingParentOverride(t *testing.T) {
-	runOverrideApexTestCase(t, Bp2buildTestCase{
-		Description:                "override_apex - logging_parent - no override",
-		ModuleTypeUnderTest:        "override_apex",
-		ModuleTypeUnderTestFactory: apex.OverrideApexFactory,
-		StubbedBuildDefinitions:    []string{"com.android.apogee", "//system/sepolicy/apex:com.android.apogee-file_contexts"},
-		Filesystem: map[string]string{
-			"system/sepolicy/apex/Android.bp": `
-filegroup {
-	name: "com.android.apogee-file_contexts",
-	srcs: [ "apogee-file_contexts", ],
-}`,
-		},
-		Blueprint: `
-apex {
-	name: "com.android.apogee",
-	logging_parent: "foo.bar.baz",
-}
-
-override_apex {
-	name: "com.google.android.apogee",
-	base: ":com.android.apogee",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("apex", "com.google.android.apogee", AttrNameToString{
-				"base_apex_name": `"com.android.apogee"`,
-				"file_contexts":  `"//system/sepolicy/apex:com.android.apogee-file_contexts"`,
-				"manifest":       `"apex_manifest.json"`,
-				"logging_parent": `"foo.bar.baz"`,
-			}),
-		}})
-}
-
-func TestApexBundleSimple_LoggingParentOverride(t *testing.T) {
-	runOverrideApexTestCase(t, Bp2buildTestCase{
-		Description:                "override_apex - logging_parent - override",
-		ModuleTypeUnderTest:        "override_apex",
-		ModuleTypeUnderTestFactory: apex.OverrideApexFactory,
-		StubbedBuildDefinitions:    []string{"com.android.apogee", "//system/sepolicy/apex:com.android.apogee-file_contexts"},
-		Filesystem: map[string]string{
-			"system/sepolicy/apex/Android.bp": `
-filegroup {
-	name: "com.android.apogee-file_contexts",
-	srcs: [ "apogee-file_contexts", ],
-}`,
-		},
-		Blueprint: `
-apex {
-	name: "com.android.apogee",
-	logging_parent: "foo.bar.baz",
-}
-
-override_apex {
-	name: "com.google.android.apogee",
-	base: ":com.android.apogee",
-	logging_parent: "foo.bar.baz.override",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("apex", "com.google.android.apogee", AttrNameToString{
-				"base_apex_name": `"com.android.apogee"`,
-				"file_contexts":  `"//system/sepolicy/apex:com.android.apogee-file_contexts"`,
-				"manifest":       `"apex_manifest.json"`,
-				"logging_parent": `"foo.bar.baz.override"`,
-			}),
-		}})
-}
-
-func TestBp2BuildOverrideApex_CertificateNil(t *testing.T) {
-	runOverrideApexTestCase(t, Bp2buildTestCase{
-		Description:                "override_apex - don't set default certificate",
-		ModuleTypeUnderTest:        "override_apex",
-		ModuleTypeUnderTestFactory: apex.OverrideApexFactory,
-		Filesystem:                 map[string]string{},
-		StubbedBuildDefinitions:    []string{"com.android.apogee.certificate", "com.android.apogee-file_contexts", "com.android.apogee"},
-		Blueprint: `
-android_app_certificate {
-	name: "com.android.apogee.certificate",
-	certificate: "com.android.apogee",
-}
-
-filegroup {
-	name: "com.android.apogee-file_contexts",
-	srcs: [
-		"com.android.apogee-file_contexts",
-	],
-}
-
-apex {
-	name: "com.android.apogee",
-	manifest: "apogee_manifest.json",
-	file_contexts: ":com.android.apogee-file_contexts",
-	certificate: ":com.android.apogee.certificate",
-}
-
-override_apex {
-	name: "com.google.android.apogee",
-	base: ":com.android.apogee",
-	// certificate is deliberately omitted, and not converted to bazel,
-	// because the overridden apex shouldn't be using the base apex's cert.
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("apex", "com.google.android.apogee", AttrNameToString{
-				"base_apex_name": `"com.android.apogee"`,
-				"file_contexts":  `":com.android.apogee-file_contexts"`,
-				"manifest":       `"apogee_manifest.json"`,
-			}),
-		}})
-}
-
-func TestApexCertificateIsModule(t *testing.T) {
-	runApexTestCase(t, Bp2buildTestCase{
-		Description:                "apex - certificate is module",
-		ModuleTypeUnderTest:        "apex",
-		ModuleTypeUnderTestFactory: apex.BundleFactory,
-		Filesystem:                 map[string]string{},
-		StubbedBuildDefinitions:    []string{"com.android.apogee-file_contexts", "com.android.apogee.certificate"},
-		Blueprint: `
-android_app_certificate {
-	name: "com.android.apogee.certificate",
-	certificate: "com.android.apogee",
-}
-
-apex {
-	name: "com.android.apogee",
-	manifest: "apogee_manifest.json",
-	file_contexts: ":com.android.apogee-file_contexts",
-	certificate: ":com.android.apogee.certificate",
-}
-` + simpleModule("filegroup", "com.android.apogee-file_contexts"),
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("apex", "com.android.apogee", AttrNameToString{
-				"certificate":   `":com.android.apogee.certificate"`,
-				"file_contexts": `":com.android.apogee-file_contexts"`,
-				"manifest":      `"apogee_manifest.json"`,
-			}),
-		}})
-}
-
-func TestApexWithStubLib(t *testing.T) {
-	runApexTestCase(t, Bp2buildTestCase{
-		Description:                "apex - static variant of stub lib should not have apex_available tag",
-		ModuleTypeUnderTest:        "apex",
-		ModuleTypeUnderTestFactory: apex.BundleFactory,
-		Filesystem:                 map[string]string{},
-		StubbedBuildDefinitions:    []string{"myapex-file_contexts"},
-		Blueprint: `
-cc_library{
-	name: "foo",
-	stubs: { symbol_file: "foo.map.txt", versions: ["28", "29", "current"] },
-	apex_available: ["myapex"],
-}
-
-cc_binary{
-	name: "bar",
-	static_libs: ["foo"],
-	apex_available: ["myapex"],
-}
-
-apex {
-	name: "myapex",
-	manifest: "myapex_manifest.json",
-	file_contexts: ":myapex-file_contexts",
-	binaries: ["bar"],
-	native_shared_libs: ["foo"],
-}
-` + simpleModule("filegroup", "myapex-file_contexts"),
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_binary", "bar", AttrNameToString{
-				"local_includes": `["."]`,
-				"deps":           `[":foo_bp2build_cc_library_static"]`,
-				"tags":           `["apex_available=myapex"]`,
-			}),
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"local_includes": `["."]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"local_includes":    `["."]`,
-				"stubs_symbol_file": `"foo.map.txt"`,
-				"tags":              `["apex_available=myapex"]`,
-			}),
-			MakeBazelTarget("cc_stub_suite", "foo_stub_libs", AttrNameToString{
-				"api_surface":          `"module-libapi"`,
-				"soname":               `"foo.so"`,
-				"source_library_label": `"//:foo"`,
-				"symbol_file":          `"foo.map.txt"`,
-				"versions": `[
-        "28",
-        "29",
-        "current",
-    ]`,
-			}),
-			MakeBazelTarget("apex", "myapex", AttrNameToString{
-				"file_contexts": `":myapex-file_contexts"`,
-				"manifest":      `"myapex_manifest.json"`,
-				"binaries":      `[":bar"]`,
-				"native_shared_libs_32": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": [":foo"],
-        "//build/bazel_common_rules/platforms/arch:x86": [":foo"],
-        "//conditions:default": [],
-    })`,
-				"native_shared_libs_64": `select({
-        "//build/bazel_common_rules/platforms/arch:arm64": [":foo"],
-        "//build/bazel_common_rules/platforms/arch:x86_64": [":foo"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestApexCertificateIsSrc(t *testing.T) {
-	runApexTestCase(t, Bp2buildTestCase{
-		Description:                "apex - certificate is src",
-		ModuleTypeUnderTest:        "apex",
-		ModuleTypeUnderTestFactory: apex.BundleFactory,
-		Filesystem:                 map[string]string{},
-		StubbedBuildDefinitions:    []string{"com.android.apogee-file_contexts"},
-		Blueprint: `
-apex {
-	name: "com.android.apogee",
-	manifest: "apogee_manifest.json",
-	file_contexts: ":com.android.apogee-file_contexts",
-	certificate: "com.android.apogee.certificate",
-}
-` + simpleModule("filegroup", "com.android.apogee-file_contexts"),
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("apex", "com.android.apogee", AttrNameToString{
-				"certificate_name": `"com.android.apogee.certificate"`,
-				"file_contexts":    `":com.android.apogee-file_contexts"`,
-				"manifest":         `"apogee_manifest.json"`,
-			}),
-		}})
-}
-
-func TestBp2BuildOverrideApex_CertificateIsModule(t *testing.T) {
-	runOverrideApexTestCase(t, Bp2buildTestCase{
-		Description:                "override_apex - certificate is module",
-		ModuleTypeUnderTest:        "override_apex",
-		ModuleTypeUnderTestFactory: apex.OverrideApexFactory,
-		Filesystem:                 map[string]string{},
-		StubbedBuildDefinitions: []string{"com.android.apogee.certificate", "com.android.apogee-file_contexts",
-			"com.android.apogee", "com.google.android.apogee.certificate"},
-		Blueprint: `
-android_app_certificate {
-	name: "com.android.apogee.certificate",
-	certificate: "com.android.apogee",
-}
-
-filegroup {
-	name: "com.android.apogee-file_contexts",
-	srcs: [
-		"com.android.apogee-file_contexts",
-	],
-}
-
-apex {
-	name: "com.android.apogee",
-	manifest: "apogee_manifest.json",
-	file_contexts: ":com.android.apogee-file_contexts",
-	certificate: ":com.android.apogee.certificate",
-}
-
-android_app_certificate {
-	name: "com.google.android.apogee.certificate",
-	certificate: "com.google.android.apogee",
-}
-
-override_apex {
-	name: "com.google.android.apogee",
-	base: ":com.android.apogee",
-	certificate: ":com.google.android.apogee.certificate",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("apex", "com.google.android.apogee", AttrNameToString{
-				"base_apex_name": `"com.android.apogee"`,
-				"file_contexts":  `":com.android.apogee-file_contexts"`,
-				"certificate":    `":com.google.android.apogee.certificate"`,
-				"manifest":       `"apogee_manifest.json"`,
-			}),
-		}})
-}
-
-func TestBp2BuildOverrideApex_CertificateIsSrc(t *testing.T) {
-	runOverrideApexTestCase(t, Bp2buildTestCase{
-		Description:                "override_apex - certificate is src",
-		ModuleTypeUnderTest:        "override_apex",
-		ModuleTypeUnderTestFactory: apex.OverrideApexFactory,
-		Filesystem:                 map[string]string{},
-		StubbedBuildDefinitions:    []string{"com.android.apogee", "com.android.apogee.certificate", "com.android.apogee", "com.android.apogee-file_contexts"},
-		Blueprint: `
-android_app_certificate {
-	name: "com.android.apogee.certificate",
-	certificate: "com.android.apogee",
-}
-
-filegroup {
-	name: "com.android.apogee-file_contexts",
-	srcs: [
-		"com.android.apogee-file_contexts",
-	],
-}
-
-apex {
-	name: "com.android.apogee",
-	manifest: "apogee_manifest.json",
-	file_contexts: ":com.android.apogee-file_contexts",
-	certificate: ":com.android.apogee.certificate",
-}
-
-override_apex {
-	name: "com.google.android.apogee",
-	base: ":com.android.apogee",
-	certificate: "com.google.android.apogee.certificate",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("apex", "com.google.android.apogee", AttrNameToString{
-				"base_apex_name":   `"com.android.apogee"`,
-				"file_contexts":    `":com.android.apogee-file_contexts"`,
-				"certificate_name": `"com.google.android.apogee.certificate"`,
-				"manifest":         `"apogee_manifest.json"`,
-			}),
-		}})
-}
-
-func TestApexTestBundleSimple(t *testing.T) {
-	runApexTestCase(t, Bp2buildTestCase{
-		Description:                "apex_test - simple",
-		ModuleTypeUnderTest:        "apex_test",
-		ModuleTypeUnderTestFactory: apex.TestApexBundleFactory,
-		Filesystem:                 map[string]string{},
-		StubbedBuildDefinitions:    []string{"cc_test_1"},
-		Blueprint: `
-cc_test { name: "cc_test_1"}
-
-apex_test {
-	name: "test_com.android.apogee",
-	file_contexts: "file_contexts_file",
-	tests: ["cc_test_1"],
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("apex", "test_com.android.apogee", AttrNameToString{
-				"file_contexts":  `"file_contexts_file"`,
-				"base_apex_name": `"com.android.apogee"`,
-				"manifest":       `"apex_manifest.json"`,
-				"testonly":       `True`,
-				"tests":          `[":cc_test_1"]`,
-			}),
-		}})
-}
-
-func TestApexBundle_overridePlusProductVars(t *testing.T) {
-	// Reproduction of b/271424349
-	// Tests that overriding an apex that uses product variables correctly copies the product var
-	// selects over to the override.
-	runOverrideApexTestCase(t, Bp2buildTestCase{
-		Description:                "apex - overriding a module that uses product vars",
-		ModuleTypeUnderTest:        "override_apex",
-		ModuleTypeUnderTestFactory: apex.OverrideApexFactory,
-		StubbedBuildDefinitions:    []string{"foo-file_contexts"},
-		Blueprint: `
-soong_config_string_variable {
-    name: "library_linking_strategy",
-    values: [
-        "prefer_static",
-    ],
-}
-
-soong_config_module_type {
-    name: "library_linking_strategy_apex_defaults",
-    module_type: "apex_defaults",
-    config_namespace: "ANDROID",
-    variables: ["library_linking_strategy"],
-    properties: [
-        "manifest",
-        "min_sdk_version",
-    ],
-}
-
-library_linking_strategy_apex_defaults {
-    name: "higher_min_sdk_when_prefer_static",
-    soong_config_variables: {
-        library_linking_strategy: {
-            // Use the R min_sdk_version
-            prefer_static: {},
-            // Override the R min_sdk_version to min_sdk_version that supports dcla
-            conditions_default: {
-                min_sdk_version: "31",
-            },
-        },
-    },
-}
-
-filegroup {
-	name: "foo-file_contexts",
-	srcs: [
-		"com.android.apogee-file_contexts",
-	],
-}
-
-apex {
-	name: "foo",
-	defaults: ["higher_min_sdk_when_prefer_static"],
-	min_sdk_version: "30",
-	package_name: "pkg_name",
-	file_contexts: ":foo-file_contexts",
-}
-override_apex {
-	name: "override_foo",
-	base: ":foo",
-	package_name: "override_pkg_name",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("apex", "foo", AttrNameToString{
-				"file_contexts": `":foo-file_contexts"`,
-				"manifest":      `"apex_manifest.json"`,
-				"min_sdk_version": `select({
-        "//build/bazel/product_config/config_settings:android__library_linking_strategy__prefer_static": "30",
-        "//conditions:default": "31",
-    })`,
-				"package_name": `"pkg_name"`,
-			}), MakeBazelTarget("apex", "override_foo", AttrNameToString{
-				"base_apex_name": `"foo"`,
-				"file_contexts":  `":foo-file_contexts"`,
-				"manifest":       `"apex_manifest.json"`,
-				"min_sdk_version": `select({
-        "//build/bazel/product_config/config_settings:android__library_linking_strategy__prefer_static": "30",
-        "//conditions:default": "31",
-    })`,
-				"package_name": `"override_pkg_name"`,
-			}),
-		}})
-}
-
-func TestApexBundleSimple_customCannedFsConfig(t *testing.T) {
-	runApexTestCase(t, Bp2buildTestCase{
-		Description:                "apex - custom canned_fs_config",
-		ModuleTypeUnderTest:        "apex",
-		ModuleTypeUnderTestFactory: apex.BundleFactory,
-		Filesystem:                 map[string]string{},
-		Blueprint: `
-apex {
-	name: "com.android.apogee",
-	canned_fs_config: "custom.canned_fs_config",
-	file_contexts: "file_contexts_file",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("apex", "com.android.apogee", AttrNameToString{
-				"canned_fs_config": `"custom.canned_fs_config"`,
-				"file_contexts":    `"file_contexts_file"`,
-				"manifest":         `"apex_manifest.json"`,
-			}),
-		}})
-}
diff --git a/bp2build/apex_key_conversion_test.go b/bp2build/apex_key_conversion_test.go
deleted file mode 100644
index 05e2f25..0000000
--- a/bp2build/apex_key_conversion_test.go
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright 2021 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"android/soong/android"
-	"android/soong/apex"
-
-	"testing"
-)
-
-func runApexKeyTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	RunBp2BuildTestCase(t, registerApexKeyModuleTypes, tc)
-}
-
-func registerApexKeyModuleTypes(ctx android.RegistrationContext) {
-	ctx.RegisterModuleType("filegroup", android.FileGroupFactory)
-}
-
-func TestApexKeySimple_KeysAreSrcFilesInSameDir(t *testing.T) {
-	runApexKeyTestCase(t, Bp2buildTestCase{
-		Description:                "apex key - keys are src files, use key attributes",
-		ModuleTypeUnderTest:        "apex_key",
-		ModuleTypeUnderTestFactory: apex.ApexKeyFactory,
-		Filesystem: map[string]string{
-			"com.android.apogee.avbpubkey": "",
-			"com.android.apogee.pem":       "",
-		},
-		Blueprint: `
-apex_key {
-        name: "com.android.apogee.key",
-        public_key: "com.android.apogee.avbpubkey",
-        private_key: "com.android.apogee.pem",
-}
-`,
-		ExpectedBazelTargets: []string{MakeBazelTargetNoRestrictions("apex_key", "com.android.apogee.key", AttrNameToString{
-			"private_key":            `"com.android.apogee.pem"`,
-			"public_key":             `"com.android.apogee.avbpubkey"`,
-			"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
-		}),
-		}})
-}
-
-func TestApexKeySimple_KeysAreSrcFilesNotInDir(t *testing.T) {
-	runApexKeyTestCase(t, Bp2buildTestCase{
-		Description:                "apex key - keys are not src or module, use key_name attributes",
-		ModuleTypeUnderTest:        "apex_key",
-		ModuleTypeUnderTestFactory: apex.ApexKeyFactory,
-		Filesystem:                 map[string]string{
-			// deliberately left empty
-		},
-		Blueprint: `
-apex_key {
-        name: "com.android.apogee.key",
-        public_key: "com.android.apogee.avbpubkey",
-        private_key: "com.android.apogee.pem",
-}
-`,
-		ExpectedBazelTargets: []string{MakeBazelTargetNoRestrictions("apex_key", "com.android.apogee.key", AttrNameToString{
-			"private_key_name":       `"com.android.apogee.pem"`,
-			"public_key_name":        `"com.android.apogee.avbpubkey"`,
-			"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
-		}),
-		}})
-}
-
-func TestApexKey_KeysAreModules(t *testing.T) {
-	runApexKeyTestCase(t, Bp2buildTestCase{
-		Description:                "apex key - keys are modules, use key attributes",
-		ModuleTypeUnderTest:        "apex_key",
-		ModuleTypeUnderTestFactory: apex.ApexKeyFactory,
-		Filesystem:                 map[string]string{},
-		StubbedBuildDefinitions:    []string{"com.android.apogee.avbpubkey", "com.android.apogee.pem"},
-		Blueprint: `
-apex_key {
-        name: "com.android.apogee.key",
-        public_key: ":com.android.apogee.avbpubkey",
-        private_key: ":com.android.apogee.pem",
-}
-` + simpleModule("filegroup", "com.android.apogee.avbpubkey") +
-			simpleModule("filegroup", "com.android.apogee.pem"),
-		ExpectedBazelTargets: []string{MakeBazelTargetNoRestrictions("apex_key", "com.android.apogee.key", AttrNameToString{
-			"private_key":            `":com.android.apogee.pem"`,
-			"public_key":             `":com.android.apogee.avbpubkey"`,
-			"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
-		}),
-		}})
-}
diff --git a/bp2build/bp2build_product_config_test.go b/bp2build/bp2build_product_config_test.go
deleted file mode 100644
index 02a2b51..0000000
--- a/bp2build/bp2build_product_config_test.go
+++ /dev/null
@@ -1,154 +0,0 @@
-package bp2build
-
-import (
-	"android/soong/android"
-	"android/soong/cc"
-	"android/soong/starlark_import"
-	"encoding/json"
-	"reflect"
-	"testing"
-
-	"github.com/google/blueprint/proptools"
-	"go.starlark.net/starlark"
-)
-
-func createStarlarkValue(t *testing.T, code string) starlark.Value {
-	t.Helper()
-	result, err := starlark.ExecFile(&starlark.Thread{}, "main.bzl", "x = "+code, nil)
-	if err != nil {
-		t.Error(err)
-	}
-	return result["x"]
-}
-
-func createStarlarkProductVariablesMap(t *testing.T, code string) map[string]starlark.Value {
-	t.Helper()
-	rawValue := createStarlarkValue(t, code)
-	value, err := starlark_import.Unmarshal[map[string]starlark.Value](rawValue)
-	if err != nil {
-		t.Error(err)
-	}
-	return value
-}
-
-func TestStarlarkMapToProductVariables(t *testing.T) {
-	thirty := 30
-	cases := []struct {
-		starlark string
-		result   android.ProductVariables
-	}{
-		{
-			starlark: `{"CompressedApex": True}`,
-			result:   android.ProductVariables{CompressedApex: proptools.BoolPtr(true)},
-		},
-		{
-			starlark: `{"ApexGlobalMinSdkVersionOverride": "Tiramisu"}`,
-			result:   android.ProductVariables{ApexGlobalMinSdkVersionOverride: proptools.StringPtr("Tiramisu")},
-		},
-		{
-			starlark: `{"ProductManufacturer": "Google"}`,
-			result:   android.ProductVariables{ProductManufacturer: "Google"},
-		},
-		{
-			starlark: `{"Unbundled_build_apps": ["app1", "app2"]}`,
-			result:   android.ProductVariables{Unbundled_build_apps: []string{"app1", "app2"}},
-		},
-		{
-			starlark: `{"Platform_sdk_version": 30}`,
-			result:   android.ProductVariables{Platform_sdk_version: &thirty},
-		},
-		{
-			starlark: `{"HostFakeSnapshotEnabled": True}`,
-			result:   android.ProductVariables{HostFakeSnapshotEnabled: true},
-		},
-	}
-
-	for _, testCase := range cases {
-		productVariables, err := starlarkMapToProductVariables(createStarlarkProductVariablesMap(t,
-			testCase.starlark))
-		if err != nil {
-			t.Error(err)
-			continue
-		}
-		testCase.result.Native_coverage = proptools.BoolPtr(false)
-		if !reflect.DeepEqual(testCase.result, productVariables) {
-			expected, err := json.Marshal(testCase.result)
-			if err != nil {
-				t.Error(err)
-				continue
-			}
-			actual, err := json.Marshal(productVariables)
-			if err != nil {
-				t.Error(err)
-				continue
-			}
-			expectedStr := string(expected)
-			actualStr := string(actual)
-			t.Errorf("expected %q, but got %q", expectedStr, actualStr)
-		}
-	}
-}
-
-func TestSystemPartitionDeps(t *testing.T) {
-	RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("cc_library", cc.LibraryFactory)
-	}, Bp2buildTestCase{
-		ExtraFixturePreparer: android.GroupFixturePreparers(
-			android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) {
-				deviceProduct := "aosp_arm64"
-				variables.DeviceProduct = &deviceProduct
-				partitionVars := &variables.PartitionVarsForBazelMigrationOnlyDoNotUse
-				partitionVars.ProductDirectory = "build/make/target/product/"
-				partitionVars.ProductPackages = []string{"foo"}
-				var systemVars android.PartitionQualifiedVariablesType
-				systemVars.BuildingImage = true
-				partitionVars.PartitionQualifiedVariables = map[string]android.PartitionQualifiedVariablesType{
-					"system": systemVars,
-				}
-			}),
-			android.FixtureModifyConfig(func(config android.Config) {
-				// MockBazelContext will pretend everything is mixed-builds allowlisted.
-				// The default is noopBazelContext, which does the opposite.
-				config.BazelContext = android.MockBazelContext{}
-			}),
-		),
-		Blueprint: `
-cc_library {
-  name: "foo",
-}`,
-		ExpectedBazelTargets: []string{`android_product(
-    name = "aosp_arm64",
-    soong_variables = _soong_variables,
-)`, `partition(
-    name = "system_image",
-    base_staging_dir = "//build/bazel/bazel_sandwich:system_staging_dir",
-    base_staging_dir_file_list = "//build/bazel/bazel_sandwich:system_staging_dir_file_list",
-    root_dir = "//build/bazel/bazel_sandwich:root_staging_dir",
-    selinux_file_contexts = "//build/bazel/bazel_sandwich:selinux_file_contexts",
-    image_properties = """
-building_system_image=true
-erofs_sparse_flag=-s
-extfs_sparse_flag=-s
-f2fs_sparse_flag=-S
-skip_fsck=true
-squashfs_sparse_flag=-s
-system_disable_sparse=true
-
-""",
-    deps = [
-        "//:foo",
-    ],
-
-    type = "system",
-)`, `partition_diff_test(
-    name = "system_image_test",
-    partition1 = "//build/bazel/bazel_sandwich:make_system_image",
-    partition2 = ":system_image",
-)`, `run_test_in_build(
-    name = "run_system_image_test",
-    test = ":system_image_test",
-)`},
-		Dir:                      "build/make/target/product/aosp_arm64",
-		RunBp2buildProductConfig: true,
-	})
-}
diff --git a/bp2build/bpf_conversion_test.go b/bp2build/bpf_conversion_test.go
deleted file mode 100644
index 26b0bf4..0000000
--- a/bp2build/bpf_conversion_test.go
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2022 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"android/soong/android"
-	"android/soong/bpf"
-
-	"testing"
-)
-
-func runBpfTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	(&tc).ModuleTypeUnderTest = "bpf"
-	(&tc).ModuleTypeUnderTestFactory = bpf.BpfFactory
-	RunBp2BuildTestCase(t, registerBpfModuleTypes, tc)
-}
-
-func registerBpfModuleTypes(ctx android.RegistrationContext) {}
-
-func TestBpfSupportedAttrs(t *testing.T) {
-	runBpfTestCase(t, Bp2buildTestCase{
-		Description: "Bpf module only converts supported attributes",
-		Filesystem:  map[string]string{},
-		Blueprint: `
-bpf {
-    name: "bpfTestOut.o",
-    srcs: ["bpfTestSrcOne.c",
-           "bpfTestSrcTwo.c"],
-    btf: true,
-    cflags: ["-bpfCflagOne",
-             "-bpfCflagTwo"],
-    include_dirs: ["ia/ib/ic"],
-    sub_dir: "sa/ab",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("bpf", "bpfTestOut.o", AttrNameToString{
-				"absolute_includes": `["ia/ib/ic"]`,
-				"btf":               `True`,
-				"copts": `[
-        "-bpfCflagOne",
-        "-bpfCflagTwo",
-    ]`,
-				"srcs": `[
-        "bpfTestSrcOne.c",
-        "bpfTestSrcTwo.c",
-    ]`,
-				"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
-			}),
-		},
-	})
-}
diff --git a/bp2build/build_conversion_test.go b/bp2build/build_conversion_test.go
deleted file mode 100644
index f809bcc..0000000
--- a/bp2build/build_conversion_test.go
+++ /dev/null
@@ -1,2256 +0,0 @@
-// Copyright 2020 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"fmt"
-	"strings"
-	"testing"
-
-	"android/soong/android"
-	"android/soong/android/allowlists"
-	"android/soong/bazel"
-	"android/soong/python"
-)
-
-func TestGenerateSoongModuleTargets(t *testing.T) {
-	testCases := []struct {
-		description         string
-		bp                  string
-		expectedBazelTarget string
-	}{
-		{
-			description: "only name",
-			bp: `custom { name: "foo" }
-    `,
-			expectedBazelTarget: `soong_module(
-    name = "foo",
-    soong_module_name = "foo",
-    soong_module_type = "custom",
-    soong_module_variant = "",
-    soong_module_deps = [
-    ],
-    bool_prop = False,
-    string_prop = "",
-)`,
-		},
-		{
-			description: "handles bool",
-			bp: `custom {
-  name: "foo",
-  bool_prop: true,
-}
-    `,
-			expectedBazelTarget: `soong_module(
-    name = "foo",
-    soong_module_name = "foo",
-    soong_module_type = "custom",
-    soong_module_variant = "",
-    soong_module_deps = [
-    ],
-    bool_prop = True,
-    string_prop = "",
-)`,
-		},
-		{
-			description: "string escaping",
-			bp: `custom {
-  name: "foo",
-  owner: "a_string_with\"quotes\"_and_\\backslashes\\\\",
-}
-    `,
-			expectedBazelTarget: `soong_module(
-    name = "foo",
-    soong_module_name = "foo",
-    soong_module_type = "custom",
-    soong_module_variant = "",
-    soong_module_deps = [
-    ],
-    bool_prop = False,
-    owner = "a_string_with\"quotes\"_and_\\backslashes\\\\",
-    string_prop = "",
-)`,
-		},
-		{
-			description: "single item string list",
-			bp: `custom {
-  name: "foo",
-  required: ["bar"],
-}
-    `,
-			expectedBazelTarget: `soong_module(
-    name = "foo",
-    soong_module_name = "foo",
-    soong_module_type = "custom",
-    soong_module_variant = "",
-    soong_module_deps = [
-    ],
-    bool_prop = False,
-    required = ["bar"],
-    string_prop = "",
-)`,
-		},
-		{
-			description: "list of strings",
-			bp: `custom {
-  name: "foo",
-  target_required: ["qux", "bazqux"],
-}
-    `,
-			expectedBazelTarget: `soong_module(
-    name = "foo",
-    soong_module_name = "foo",
-    soong_module_type = "custom",
-    soong_module_variant = "",
-    soong_module_deps = [
-    ],
-    bool_prop = False,
-    string_prop = "",
-    target_required = [
-        "qux",
-        "bazqux",
-    ],
-)`,
-		},
-		{
-			description: "dist/dists",
-			bp: `custom {
-  name: "foo",
-  dist: {
-    targets: ["goal_foo"],
-    tag: ".foo",
-  },
-  dists: [{
-    targets: ["goal_bar"],
-    tag: ".bar",
-  }],
-}
-    `,
-			expectedBazelTarget: `soong_module(
-    name = "foo",
-    soong_module_name = "foo",
-    soong_module_type = "custom",
-    soong_module_variant = "",
-    soong_module_deps = [
-    ],
-    bool_prop = False,
-    dist = {
-        "tag": ".foo",
-        "targets": ["goal_foo"],
-    },
-    dists = [{
-        "tag": ".bar",
-        "targets": ["goal_bar"],
-    }],
-    string_prop = "",
-)`,
-		},
-		{
-			description: "put it together",
-			bp: `custom {
-  name: "foo",
-  required: ["bar"],
-  target_required: ["qux", "bazqux"],
-  bool_prop: true,
-  owner: "custom_owner",
-  dists: [
-    {
-      tag: ".tag",
-      targets: ["my_goal"],
-    },
-  ],
-}
-    `,
-			expectedBazelTarget: `soong_module(
-    name = "foo",
-    soong_module_name = "foo",
-    soong_module_type = "custom",
-    soong_module_variant = "",
-    soong_module_deps = [
-    ],
-    bool_prop = True,
-    dists = [{
-        "tag": ".tag",
-        "targets": ["my_goal"],
-    }],
-    owner = "custom_owner",
-    required = ["bar"],
-    string_prop = "",
-    target_required = [
-        "qux",
-        "bazqux",
-    ],
-)`,
-		},
-	}
-
-	dir := "."
-	for _, testCase := range testCases {
-		t.Run(testCase.description, func(t *testing.T) {
-			config := android.TestConfig(buildDir, nil, testCase.bp, nil)
-			ctx := android.NewTestContext(config)
-
-			ctx.RegisterModuleType("custom", customModuleFactoryHostAndDevice)
-			ctx.Register()
-
-			_, errs := ctx.ParseFileList(dir, []string{"Android.bp"})
-			android.FailIfErrored(t, errs)
-			_, errs = ctx.PrepareBuildActions(config)
-			android.FailIfErrored(t, errs)
-
-			codegenCtx := NewCodegenContext(config, ctx.Context, QueryView, "")
-			bazelTargets, err := generateBazelTargetsForDir(codegenCtx, dir)
-			android.FailIfErrored(t, err)
-			if actualCount, expectedCount := len(bazelTargets), 1; actualCount != expectedCount {
-				t.Fatalf("Expected %d bazel target, got %d", expectedCount, actualCount)
-			}
-
-			actualBazelTarget := bazelTargets[0]
-			if actualBazelTarget.content != testCase.expectedBazelTarget {
-				t.Errorf(
-					"Expected generated Bazel target to be '%s', got '%s'",
-					testCase.expectedBazelTarget,
-					actualBazelTarget.content,
-				)
-			}
-		})
-	}
-}
-
-func TestGenerateBazelTargetModules(t *testing.T) {
-	testCases := []Bp2buildTestCase{
-		{
-			Description: "string prop empty",
-			Blueprint: `custom {
-	name: "foo",
-    string_literal_prop: "",
-    bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget("custom", "foo", AttrNameToString{
-					"string_literal_prop": `""`,
-				}),
-			},
-		},
-		{
-			Description: `string prop "PROP"`,
-			Blueprint: `custom {
-	name: "foo",
-    string_literal_prop: "PROP",
-    bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget("custom", "foo", AttrNameToString{
-					"string_literal_prop": `"PROP"`,
-				}),
-			},
-		},
-		{
-			Description: `string prop arch variant`,
-			Blueprint: `custom {
-    name: "foo",
-    arch: {
-        arm: { string_literal_prop: "ARM" },
-        arm64: { string_literal_prop: "ARM64" },
-    },
-    bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget("custom", "foo", AttrNameToString{
-					"string_literal_prop": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": "ARM",
-        "//build/bazel_common_rules/platforms/arch:arm64": "ARM64",
-        "//conditions:default": None,
-    })`,
-				}),
-			},
-		},
-		{
-			Description: "string ptr props",
-			Blueprint: `custom {
-	name: "foo",
-    string_ptr_prop: "",
-    bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget("custom", "foo", AttrNameToString{
-					"string_ptr_prop": `""`,
-				}),
-			},
-		},
-		{
-			Description: "string list props",
-			Blueprint: `custom {
-  name: "foo",
-    string_list_prop: ["a", "b"],
-    string_ptr_prop: "a",
-    bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget("custom", "foo", AttrNameToString{
-					"string_list_prop": `[
-        "a",
-        "b",
-    ]`,
-					"string_ptr_prop": `"a"`,
-				}),
-			},
-		},
-		{
-			Description: "control characters",
-			Blueprint: `custom {
-    name: "foo",
-    string_list_prop: ["\t", "\n"],
-    string_ptr_prop: "a\t\n\r",
-    bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget("custom", "foo", AttrNameToString{
-					"string_list_prop": `[
-        "\t",
-        "\n",
-    ]`,
-					"string_ptr_prop": `"a\t\n\r"`,
-				}),
-			},
-		},
-		{
-			Description: "handles dep",
-			Blueprint: `custom {
-  name: "has_dep",
-  arch_paths: [":dep"],
-  bazel_module: { bp2build_available: true },
-}
-
-custom {
-  name: "dep",
-  arch_paths: ["abc"],
-  bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget("custom", "dep", AttrNameToString{
-					"arch_paths": `["abc"]`,
-				}),
-				MakeBazelTarget("custom", "has_dep", AttrNameToString{
-					"arch_paths": `[":dep"]`,
-				}),
-			},
-		},
-		{
-			Description: "arch-variant srcs",
-			Blueprint: `custom {
-    name: "arch_paths",
-    arch: {
-      x86: { arch_paths: ["x86.txt"] },
-      x86_64:  { arch_paths: ["x86_64.txt"] },
-      arm:  { arch_paths: ["arm.txt"] },
-      arm64:  { arch_paths: ["arm64.txt"] },
-      riscv64: { arch_paths: ["riscv64.txt"] },
-    },
-    target: {
-      linux: { arch_paths: ["linux.txt"] },
-      bionic: { arch_paths: ["bionic.txt"] },
-      host: { arch_paths: ["host.txt"] },
-      not_windows: { arch_paths: ["not_windows.txt"] },
-      android: { arch_paths: ["android.txt"] },
-      linux_musl: { arch_paths: ["linux_musl.txt"] },
-      musl: { arch_paths: ["musl.txt"] },
-      linux_glibc: { arch_paths: ["linux_glibc.txt"] },
-      glibc: { arch_paths: ["glibc.txt"] },
-      linux_bionic: { arch_paths: ["linux_bionic.txt"] },
-      darwin: { arch_paths: ["darwin.txt"] },
-      windows: { arch_paths: ["windows.txt"] },
-    },
-    multilib: {
-        lib32: { arch_paths: ["lib32.txt"] },
-        lib64: { arch_paths: ["lib64.txt"] },
-    },
-    bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget("custom", "arch_paths", AttrNameToString{
-					"arch_paths": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": [
-            "arm.txt",
-            "lib32.txt",
-        ],
-        "//build/bazel_common_rules/platforms/arch:arm64": [
-            "arm64.txt",
-            "lib64.txt",
-        ],
-        "//build/bazel_common_rules/platforms/arch:riscv64": [
-            "riscv64.txt",
-            "lib64.txt",
-        ],
-        "//build/bazel_common_rules/platforms/arch:x86": [
-            "x86.txt",
-            "lib32.txt",
-        ],
-        "//build/bazel_common_rules/platforms/arch:x86_64": [
-            "x86_64.txt",
-            "lib64.txt",
-        ],
-        "//conditions:default": [],
-    }) + select({
-        "//build/bazel_common_rules/platforms/os:android": [
-            "linux.txt",
-            "bionic.txt",
-            "android.txt",
-        ],
-        "//build/bazel_common_rules/platforms/os:darwin": [
-            "host.txt",
-            "darwin.txt",
-            "not_windows.txt",
-        ],
-        "//build/bazel_common_rules/platforms/os:linux_bionic": [
-            "host.txt",
-            "linux.txt",
-            "bionic.txt",
-            "linux_bionic.txt",
-            "not_windows.txt",
-        ],
-        "//build/bazel_common_rules/platforms/os:linux_glibc": [
-            "host.txt",
-            "linux.txt",
-            "glibc.txt",
-            "linux_glibc.txt",
-            "not_windows.txt",
-        ],
-        "//build/bazel_common_rules/platforms/os:linux_musl": [
-            "host.txt",
-            "linux.txt",
-            "musl.txt",
-            "linux_musl.txt",
-            "not_windows.txt",
-        ],
-        "//build/bazel_common_rules/platforms/os:windows": [
-            "host.txt",
-            "windows.txt",
-        ],
-        "//conditions:default": [],
-    })`,
-				}),
-			},
-		},
-		{
-			Description: "arch-variant deps",
-			Blueprint: `custom {
-  name: "has_dep",
-  arch: {
-    x86: {
-      arch_paths: [":dep"],
-    },
-  },
-  bazel_module: { bp2build_available: true },
-}
-
-custom {
-    name: "dep",
-    arch_paths: ["abc"],
-    bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget("custom", "dep", AttrNameToString{
-					"arch_paths": `["abc"]`,
-				}),
-				MakeBazelTarget("custom", "has_dep", AttrNameToString{
-					"arch_paths": `select({
-        "//build/bazel_common_rules/platforms/arch:x86": [":dep"],
-        "//conditions:default": [],
-    })`,
-				}),
-			},
-		},
-		{
-			Description: "embedded props",
-			Blueprint: `custom {
-    name: "embedded_props",
-    embedded_prop: "abc",
-    bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget("custom", "embedded_props", AttrNameToString{
-					"embedded_attr": `"abc"`,
-				}),
-			},
-		},
-		{
-			Description: "ptr to embedded props",
-			Blueprint: `custom {
-    name: "ptr_to_embedded_props",
-    other_embedded_prop: "abc",
-    bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget("custom", "ptr_to_embedded_props", AttrNameToString{
-					"other_embedded_attr": `"abc"`,
-				}),
-			},
-		},
-	}
-
-	dir := "."
-	for _, testCase := range testCases {
-		t.Run(testCase.Description, func(t *testing.T) {
-			config := android.TestConfig(buildDir, nil, testCase.Blueprint, nil)
-			ctx := android.NewTestContext(config)
-
-			registerCustomModuleForBp2buildConversion(ctx)
-
-			_, errs := ctx.ParseFileList(dir, []string{"Android.bp"})
-			if errored(t, testCase, errs) {
-				return
-			}
-			_, errs = ctx.ResolveDependencies(config)
-			if errored(t, testCase, errs) {
-				return
-			}
-
-			codegenCtx := NewCodegenContext(config, ctx.Context, Bp2Build, "")
-			bazelTargets, err := generateBazelTargetsForDir(codegenCtx, dir)
-			android.FailIfErrored(t, err)
-
-			if actualCount, expectedCount := len(bazelTargets), len(testCase.ExpectedBazelTargets); actualCount != expectedCount {
-				t.Errorf("Expected %d bazel target (%s),\ngot %d (%s)", expectedCount, testCase.ExpectedBazelTargets, actualCount, bazelTargets)
-			} else {
-				for i, expectedBazelTarget := range testCase.ExpectedBazelTargets {
-					actualBazelTarget := bazelTargets[i]
-					if actualBazelTarget.content != expectedBazelTarget {
-						t.Errorf(
-							"Expected generated Bazel target to be '%s', got '%s'",
-							expectedBazelTarget,
-							actualBazelTarget.content,
-						)
-					}
-				}
-			}
-		})
-	}
-}
-
-func TestBp2buildHostAndDevice(t *testing.T) {
-	testCases := []Bp2buildTestCase{
-		{
-			Description:                "host and device, device only",
-			ModuleTypeUnderTest:        "custom",
-			ModuleTypeUnderTestFactory: customModuleFactoryHostAndDevice,
-			Blueprint: `custom {
-		name: "foo",
-		bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				makeBazelTargetHostOrDevice("custom", "foo", AttrNameToString{}, android.DeviceSupported),
-			},
-		},
-		{
-			Description:                "host and device, both",
-			ModuleTypeUnderTest:        "custom",
-			ModuleTypeUnderTestFactory: customModuleFactoryHostAndDevice,
-			Blueprint: `custom {
-		name: "foo",
-		host_supported: true,
-		bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("custom", "foo", AttrNameToString{}),
-			},
-		},
-		{
-			Description:                "host and device, host explicitly disabled",
-			ModuleTypeUnderTest:        "custom",
-			ModuleTypeUnderTestFactory: customModuleFactoryHostAndDevice,
-			Blueprint: `custom {
-		name: "foo",
-		host_supported: false,
-		bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				makeBazelTargetHostOrDevice("custom", "foo", AttrNameToString{}, android.DeviceSupported),
-			},
-		},
-		{
-			Description:                "host and device, neither",
-			ModuleTypeUnderTest:        "custom",
-			ModuleTypeUnderTestFactory: customModuleFactoryHostAndDevice,
-			Blueprint: `custom {
-		name: "foo",
-		host_supported: false,
-		device_supported: false,
-		bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("custom", "foo", AttrNameToString{
-					"target_compatible_with": `["@platforms//:incompatible"]`,
-				}),
-			},
-		},
-		{
-			Description:                "host and device, neither, cannot override with product_var",
-			ModuleTypeUnderTest:        "custom",
-			ModuleTypeUnderTestFactory: customModuleFactoryHostAndDevice,
-			Blueprint: `custom {
-		name: "foo",
-		host_supported: false,
-		device_supported: false,
-		product_variables: { unbundled_build: { enabled: true } },
-		bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("custom", "foo", AttrNameToString{
-					"target_compatible_with": `["@platforms//:incompatible"]`,
-				}),
-			},
-		},
-		{
-			Description:                "host and device, both, disabled overrided with product_var",
-			ModuleTypeUnderTest:        "custom",
-			ModuleTypeUnderTestFactory: customModuleFactoryHostAndDevice,
-			Blueprint: `custom {
-		name: "foo",
-		host_supported: true,
-		device_supported: true,
-		enabled: false,
-		product_variables: { unbundled_build: { enabled: true } },
-		bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("custom", "foo", AttrNameToString{
-					"target_compatible_with": `select({
-        "//build/bazel/product_config/config_settings:unbundled_build": [],
-        "//conditions:default": ["@platforms//:incompatible"],
-    })`,
-				}),
-			},
-		},
-		{
-			Description:                "host and device, neither, cannot override with arch enabled",
-			ModuleTypeUnderTest:        "custom",
-			ModuleTypeUnderTestFactory: customModuleFactoryHostAndDevice,
-			Blueprint: `custom {
-		name: "foo",
-		host_supported: false,
-		device_supported: false,
-		arch: { x86: { enabled: true } },
-		bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("custom", "foo", AttrNameToString{
-					"target_compatible_with": `["@platforms//:incompatible"]`,
-				}),
-			},
-		},
-		{
-			Description:                "host and device, host only",
-			ModuleTypeUnderTest:        "custom",
-			ModuleTypeUnderTestFactory: customModuleFactoryHostAndDevice,
-			Blueprint: `custom {
-		name: "foo",
-		host_supported: true,
-		device_supported: false,
-		bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				makeBazelTargetHostOrDevice("custom", "foo", AttrNameToString{}, android.HostSupported),
-			},
-		},
-		{
-			Description:                "host only",
-			ModuleTypeUnderTest:        "custom",
-			ModuleTypeUnderTestFactory: customModuleFactoryHostSupported,
-			Blueprint: `custom {
-		name: "foo",
-		bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				makeBazelTargetHostOrDevice("custom", "foo", AttrNameToString{}, android.HostSupported),
-			},
-		},
-		{
-			Description:                "device only",
-			ModuleTypeUnderTest:        "custom",
-			ModuleTypeUnderTestFactory: customModuleFactoryDeviceSupported,
-			Blueprint: `custom {
-		name: "foo",
-		bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				makeBazelTargetHostOrDevice("custom", "foo", AttrNameToString{}, android.DeviceSupported),
-			},
-		},
-		{
-			Description:                "host and device default, default",
-			ModuleTypeUnderTest:        "custom",
-			ModuleTypeUnderTestFactory: customModuleFactoryHostAndDeviceDefault,
-			Blueprint: `custom {
-		name: "foo",
-		bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("custom", "foo", AttrNameToString{}),
-			},
-		},
-		{
-			Description:                "host and device default, device only",
-			ModuleTypeUnderTest:        "custom",
-			ModuleTypeUnderTestFactory: customModuleFactoryHostAndDeviceDefault,
-			Blueprint: `custom {
-		name: "foo",
-		host_supported: false,
-		bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				makeBazelTargetHostOrDevice("custom", "foo", AttrNameToString{}, android.DeviceSupported),
-			},
-		},
-		{
-			Description:                "host and device default, host only",
-			ModuleTypeUnderTest:        "custom",
-			ModuleTypeUnderTestFactory: customModuleFactoryHostAndDeviceDefault,
-			Blueprint: `custom {
-		name: "foo",
-		device_supported: false,
-		bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				makeBazelTargetHostOrDevice("custom", "foo", AttrNameToString{}, android.HostSupported),
-			},
-		},
-		{
-			Description:                "host and device default, neither",
-			ModuleTypeUnderTest:        "custom",
-			ModuleTypeUnderTestFactory: customModuleFactoryHostAndDeviceDefault,
-			Blueprint: `custom {
-		name: "foo",
-		host_supported: false,
-		device_supported: false,
-		bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("custom", "foo", AttrNameToString{
-					"target_compatible_with": `["@platforms//:incompatible"]`,
-				}),
-			},
-		},
-	}
-
-	for _, tc := range testCases {
-		t.Run(tc.Description, func(t *testing.T) {
-			RunBp2BuildTestCaseSimple(t, tc)
-		})
-	}
-}
-
-func TestLoadStatements(t *testing.T) {
-	testCases := []struct {
-		bazelTargets           BazelTargets
-		expectedLoadStatements string
-	}{
-		{
-			bazelTargets: BazelTargets{
-				BazelTarget{
-					name:      "foo",
-					ruleClass: "cc_library",
-					loads: []BazelLoad{{
-						file:    "//build/bazel/rules:cc.bzl",
-						symbols: []BazelLoadSymbol{{symbol: "cc_library"}},
-					}},
-				},
-			},
-			expectedLoadStatements: `load("//build/bazel/rules:cc.bzl", "cc_library")`,
-		},
-		{
-			bazelTargets: BazelTargets{
-				BazelTarget{
-					name:      "foo",
-					ruleClass: "cc_library",
-					loads: []BazelLoad{{
-						file:    "//build/bazel/rules:cc.bzl",
-						symbols: []BazelLoadSymbol{{symbol: "cc_library"}},
-					}},
-				},
-				BazelTarget{
-					name:      "bar",
-					ruleClass: "cc_library",
-					loads: []BazelLoad{{
-						file:    "//build/bazel/rules:cc.bzl",
-						symbols: []BazelLoadSymbol{{symbol: "cc_library"}},
-					}},
-				},
-			},
-			expectedLoadStatements: `load("//build/bazel/rules:cc.bzl", "cc_library")`,
-		},
-		{
-			bazelTargets: BazelTargets{
-				BazelTarget{
-					name:      "foo",
-					ruleClass: "cc_library",
-					loads: []BazelLoad{{
-						file:    "//build/bazel/rules:cc.bzl",
-						symbols: []BazelLoadSymbol{{symbol: "cc_library"}},
-					}},
-				},
-				BazelTarget{
-					name:      "bar",
-					ruleClass: "cc_binary",
-					loads: []BazelLoad{{
-						file:    "//build/bazel/rules:cc.bzl",
-						symbols: []BazelLoadSymbol{{symbol: "cc_binary"}},
-					}},
-				},
-			},
-			expectedLoadStatements: `load("//build/bazel/rules:cc.bzl", "cc_binary", "cc_library")`,
-		},
-		{
-			bazelTargets: BazelTargets{
-				BazelTarget{
-					name:      "foo",
-					ruleClass: "cc_library",
-					loads: []BazelLoad{{
-						file:    "//build/bazel/rules:cc.bzl",
-						symbols: []BazelLoadSymbol{{symbol: "cc_library"}},
-					}},
-				},
-				BazelTarget{
-					name:      "bar",
-					ruleClass: "cc_binary",
-					loads: []BazelLoad{{
-						file:    "//build/bazel/rules:cc.bzl",
-						symbols: []BazelLoadSymbol{{symbol: "cc_binary"}},
-					}},
-				},
-				BazelTarget{
-					name:      "baz",
-					ruleClass: "java_binary",
-					loads: []BazelLoad{{
-						file:    "//build/bazel/rules:java.bzl",
-						symbols: []BazelLoadSymbol{{symbol: "java_binary"}},
-					}},
-				},
-			},
-			expectedLoadStatements: `load("//build/bazel/rules:cc.bzl", "cc_binary", "cc_library")
-load("//build/bazel/rules:java.bzl", "java_binary")`,
-		},
-		{
-			bazelTargets: BazelTargets{
-				BazelTarget{
-					name:      "foo",
-					ruleClass: "cc_binary",
-					loads: []BazelLoad{{
-						file:    "//build/bazel/rules:cc.bzl",
-						symbols: []BazelLoadSymbol{{symbol: "cc_binary"}},
-					}},
-				},
-				BazelTarget{
-					name:      "bar",
-					ruleClass: "java_binary",
-					loads: []BazelLoad{{
-						file:    "//build/bazel/rules:java.bzl",
-						symbols: []BazelLoadSymbol{{symbol: "java_binary"}},
-					}},
-				},
-				BazelTarget{
-					name:      "baz",
-					ruleClass: "genrule",
-					// Note: no loads for native rules
-				},
-			},
-			expectedLoadStatements: `load("//build/bazel/rules:cc.bzl", "cc_binary")
-load("//build/bazel/rules:java.bzl", "java_binary")`,
-		},
-	}
-
-	for _, testCase := range testCases {
-		actual := testCase.bazelTargets.LoadStatements()
-		expected := testCase.expectedLoadStatements
-		if actual != expected {
-			t.Fatalf("Expected load statements to be %s, got %s", expected, actual)
-		}
-	}
-
-}
-
-func TestGenerateBazelTargetModules_OneToMany_LoadedFromStarlark(t *testing.T) {
-	testCases := []struct {
-		bp                       string
-		expectedBazelTarget      string
-		expectedBazelTargetCount int
-		expectedLoadStatements   string
-	}{
-		{
-			bp: `custom {
-    name: "bar",
-    host_supported: true,
-    one_to_many_prop: true,
-    bazel_module: { bp2build_available: true  },
-}`,
-			expectedBazelTarget: `my_library(
-    name = "bar",
-)
-
-proto_library(
-    name = "bar_proto_library_deps",
-)
-
-my_proto_library(
-    name = "bar_my_proto_library_deps",
-)`,
-			expectedBazelTargetCount: 3,
-			expectedLoadStatements: `load("//build/bazel/rules:proto.bzl", "my_proto_library", "proto_library")
-load("//build/bazel/rules:rules.bzl", "my_library")`,
-		},
-	}
-
-	dir := "."
-	for _, testCase := range testCases {
-		config := android.TestConfig(buildDir, nil, testCase.bp, nil)
-		ctx := android.NewTestContext(config)
-		ctx.RegisterModuleType("custom", customModuleFactoryHostAndDevice)
-		ctx.RegisterForBazelConversion()
-
-		_, errs := ctx.ParseFileList(dir, []string{"Android.bp"})
-		android.FailIfErrored(t, errs)
-		_, errs = ctx.ResolveDependencies(config)
-		android.FailIfErrored(t, errs)
-
-		codegenCtx := NewCodegenContext(config, ctx.Context, Bp2Build, "")
-		bazelTargets, err := generateBazelTargetsForDir(codegenCtx, dir)
-		android.FailIfErrored(t, err)
-		if actualCount := len(bazelTargets); actualCount != testCase.expectedBazelTargetCount {
-			t.Fatalf("Expected %d bazel target, got %d", testCase.expectedBazelTargetCount, actualCount)
-		}
-
-		actualBazelTargets := bazelTargets.String()
-		if actualBazelTargets != testCase.expectedBazelTarget {
-			t.Errorf(
-				"Expected generated Bazel target to be '%s', got '%s'",
-				testCase.expectedBazelTarget,
-				actualBazelTargets,
-			)
-		}
-
-		actualLoadStatements := bazelTargets.LoadStatements()
-		if actualLoadStatements != testCase.expectedLoadStatements {
-			t.Errorf(
-				"Expected generated load statements to be '%s', got '%s'",
-				testCase.expectedLoadStatements,
-				actualLoadStatements,
-			)
-		}
-	}
-}
-
-func TestModuleTypeBp2Build(t *testing.T) {
-	testCases := []Bp2buildTestCase{
-		{
-			Description:                "filegroup with does not specify srcs",
-			ModuleTypeUnderTest:        "filegroup",
-			ModuleTypeUnderTestFactory: android.FileGroupFactory,
-			Blueprint: `filegroup {
-    name: "fg_foo",
-    bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("filegroup", "fg_foo", map[string]string{}),
-			},
-		},
-		{
-			Description:                "filegroup with no srcs",
-			ModuleTypeUnderTest:        "filegroup",
-			ModuleTypeUnderTestFactory: android.FileGroupFactory,
-			Blueprint: `filegroup {
-    name: "fg_foo",
-    srcs: [],
-    bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("filegroup", "fg_foo", map[string]string{}),
-			},
-		},
-		{
-			Description:                "filegroup with srcs",
-			ModuleTypeUnderTest:        "filegroup",
-			ModuleTypeUnderTestFactory: android.FileGroupFactory,
-			Blueprint: `filegroup {
-    name: "fg_foo",
-    srcs: ["a", "b"],
-    bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("filegroup", "fg_foo", map[string]string{
-					"srcs": `[
-        "a",
-        "b",
-    ]`,
-				}),
-			},
-		},
-		{
-			Description:                "filegroup with dot-slash-prefixed srcs",
-			ModuleTypeUnderTest:        "filegroup",
-			ModuleTypeUnderTestFactory: android.FileGroupFactory,
-			Blueprint: `filegroup {
-    name: "fg_foo",
-    srcs: ["./a", "./b"],
-    bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("filegroup", "fg_foo", map[string]string{
-					"srcs": `[
-        "a",
-        "b",
-    ]`,
-				}),
-			},
-		},
-		{
-			Description:                "filegroup with excludes srcs",
-			ModuleTypeUnderTest:        "filegroup",
-			ModuleTypeUnderTestFactory: android.FileGroupFactory,
-			Blueprint: `filegroup {
-    name: "fg_foo",
-    srcs: ["a", "b"],
-    exclude_srcs: ["a"],
-    bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("filegroup", "fg_foo", map[string]string{
-					"srcs": `["b"]`,
-				}),
-			},
-		},
-		{
-			Description:                "depends_on_other_dir_module",
-			ModuleTypeUnderTest:        "filegroup",
-			ModuleTypeUnderTestFactory: android.FileGroupFactory,
-			Blueprint: `filegroup {
-    name: "fg_foo",
-    srcs: [
-        ":foo",
-        "c",
-    ],
-    bazel_module: { bp2build_available: true },
-}`,
-			Filesystem: map[string]string{
-				"other/Android.bp": `filegroup {
-    name: "foo",
-    srcs: ["a", "b"],
-    bazel_module: { bp2build_available: true },
-}`,
-			},
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("filegroup", "fg_foo", map[string]string{
-					"srcs": `[
-        "//other:foo",
-        "c",
-    ]`,
-				}),
-			},
-		},
-	}
-
-	for _, testCase := range testCases {
-		t.Run(testCase.Description, func(t *testing.T) {
-			RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {}, testCase)
-		})
-	}
-}
-
-func TestAllowlistingBp2buildTargetsExplicitly(t *testing.T) {
-	testCases := []struct {
-		moduleTypeUnderTest        string
-		moduleTypeUnderTestFactory android.ModuleFactory
-		bp                         string
-		expectedCount              int
-		description                string
-	}{
-		{
-			description:                "explicitly unavailable",
-			moduleTypeUnderTest:        "filegroup",
-			moduleTypeUnderTestFactory: android.FileGroupFactory,
-			bp: `filegroup {
-    name: "foo",
-    srcs: ["a", "b"],
-    bazel_module: { bp2build_available: false },
-}`,
-			expectedCount: 0,
-		},
-		{
-			description:                "implicitly unavailable",
-			moduleTypeUnderTest:        "filegroup",
-			moduleTypeUnderTestFactory: android.FileGroupFactory,
-			bp: `filegroup {
-    name: "foo",
-    srcs: ["a", "b"],
-}`,
-			expectedCount: 0,
-		},
-		{
-			description:                "explicitly available",
-			moduleTypeUnderTest:        "filegroup",
-			moduleTypeUnderTestFactory: android.FileGroupFactory,
-			bp: `filegroup {
-    name: "foo",
-    srcs: ["a", "b"],
-    bazel_module: { bp2build_available: true },
-}`,
-			expectedCount: 1,
-		},
-		{
-			description:                "generates more than 1 target if needed",
-			moduleTypeUnderTest:        "custom",
-			moduleTypeUnderTestFactory: customModuleFactoryHostAndDevice,
-			bp: `custom {
-    name: "foo",
-    one_to_many_prop: true,
-    bazel_module: { bp2build_available: true },
-}`,
-			expectedCount: 3,
-		},
-	}
-
-	dir := "."
-	for _, testCase := range testCases {
-		t.Run(testCase.description, func(t *testing.T) {
-			config := android.TestConfig(buildDir, nil, testCase.bp, nil)
-			ctx := android.NewTestContext(config)
-			ctx.RegisterModuleType(testCase.moduleTypeUnderTest, testCase.moduleTypeUnderTestFactory)
-			ctx.RegisterForBazelConversion()
-
-			_, errs := ctx.ParseFileList(dir, []string{"Android.bp"})
-			android.FailIfErrored(t, errs)
-			_, errs = ctx.ResolveDependencies(config)
-			android.FailIfErrored(t, errs)
-
-			codegenCtx := NewCodegenContext(config, ctx.Context, Bp2Build, "")
-			bazelTargets, err := generateBazelTargetsForDir(codegenCtx, dir)
-			android.FailIfErrored(t, err)
-			if actualCount := len(bazelTargets); actualCount != testCase.expectedCount {
-				t.Fatalf("%s: Expected %d bazel target, got %d", testCase.description, testCase.expectedCount, actualCount)
-			}
-		})
-	}
-}
-
-func TestAllowlistingBp2buildTargetsWithConfig(t *testing.T) {
-	testCases := []struct {
-		moduleTypeUnderTest        string
-		moduleTypeUnderTestFactory android.ModuleFactory
-		expectedCount              map[string]int
-		description                string
-		bp2buildConfig             allowlists.Bp2BuildConfig
-		checkDir                   string
-		fs                         map[string]string
-		forceEnabledModules        []string
-		expectedErrorMessages      []string
-	}{
-		{
-			description:                "test bp2build config package and subpackages config",
-			moduleTypeUnderTest:        "filegroup",
-			moduleTypeUnderTestFactory: android.FileGroupFactory,
-			expectedCount: map[string]int{
-				"migrated":                           1,
-				"migrated/but_not_really":            0,
-				"migrated/but_not_really/but_really": 1,
-				"not_migrated":                       0,
-				"also_not_migrated":                  0,
-			},
-			bp2buildConfig: allowlists.Bp2BuildConfig{
-				"migrated":                allowlists.Bp2BuildDefaultTrueRecursively,
-				"migrated/but_not_really": allowlists.Bp2BuildDefaultFalse,
-				"not_migrated":            allowlists.Bp2BuildDefaultFalse,
-			},
-			fs: map[string]string{
-				"migrated/Android.bp":                           `filegroup { name: "a" }`,
-				"migrated/but_not_really/Android.bp":            `filegroup { name: "b" }`,
-				"migrated/but_not_really/but_really/Android.bp": `filegroup { name: "c" }`,
-				"not_migrated/Android.bp":                       `filegroup { name: "d" }`,
-				"also_not_migrated/Android.bp":                  `filegroup { name: "e" }`,
-			},
-		},
-		{
-			description:                "test bp2build config opt-in and opt-out",
-			moduleTypeUnderTest:        "filegroup",
-			moduleTypeUnderTestFactory: android.FileGroupFactory,
-			expectedCount: map[string]int{
-				"package-opt-in":             2,
-				"package-opt-in/subpackage":  0,
-				"package-opt-out":            1,
-				"package-opt-out/subpackage": 0,
-			},
-			bp2buildConfig: allowlists.Bp2BuildConfig{
-				"package-opt-in":  allowlists.Bp2BuildDefaultFalse,
-				"package-opt-out": allowlists.Bp2BuildDefaultTrueRecursively,
-			},
-			fs: map[string]string{
-				"package-opt-in/Android.bp": `
-filegroup { name: "opt-in-a" }
-filegroup { name: "opt-in-b", bazel_module: { bp2build_available: true } }
-filegroup { name: "opt-in-c", bazel_module: { bp2build_available: true } }
-`,
-
-				"package-opt-in/subpackage/Android.bp": `
-filegroup { name: "opt-in-d" } // parent package not configured to DefaultTrueRecursively
-`,
-
-				"package-opt-out/Android.bp": `
-filegroup { name: "opt-out-a" }
-filegroup { name: "opt-out-b", bazel_module: { bp2build_available: false } }
-filegroup { name: "opt-out-c", bazel_module: { bp2build_available: false } }
-`,
-
-				"package-opt-out/subpackage/Android.bp": `
-filegroup { name: "opt-out-g", bazel_module: { bp2build_available: false } }
-filegroup { name: "opt-out-h", bazel_module: { bp2build_available: false } }
-`,
-			},
-		},
-		{
-			description:                "test force-enabled errors out",
-			moduleTypeUnderTest:        "filegroup",
-			moduleTypeUnderTestFactory: android.FileGroupFactory,
-			expectedCount: map[string]int{
-				"migrated":     0,
-				"not_migrated": 0,
-			},
-			bp2buildConfig: allowlists.Bp2BuildConfig{
-				"migrated/but_not_really": allowlists.Bp2BuildDefaultFalse,
-				"not_migrated":            allowlists.Bp2BuildDefaultFalse,
-			},
-			fs: map[string]string{
-				"migrated/Android.bp": `filegroup { name: "a" }`,
-			},
-			forceEnabledModules:   []string{"a"},
-			expectedErrorMessages: []string{"Force Enabled Module a not converted"},
-		},
-	}
-
-	dir := "."
-	for _, testCase := range testCases {
-		fs := make(map[string][]byte)
-		toParse := []string{
-			"Android.bp",
-		}
-		for f, content := range testCase.fs {
-			if strings.HasSuffix(f, "Android.bp") {
-				toParse = append(toParse, f)
-			}
-			fs[f] = []byte(content)
-		}
-		config := android.TestConfig(buildDir, nil, "", fs)
-		config.AddForceEnabledModules(testCase.forceEnabledModules)
-		ctx := android.NewTestContext(config)
-		ctx.RegisterModuleType(testCase.moduleTypeUnderTest, testCase.moduleTypeUnderTestFactory)
-		allowlist := android.NewBp2BuildAllowlist().SetDefaultConfig(testCase.bp2buildConfig)
-		ctx.RegisterBp2BuildConfig(allowlist)
-		ctx.RegisterForBazelConversion()
-
-		_, errs := ctx.ParseFileList(dir, toParse)
-		android.FailIfErrored(t, errs)
-		_, errs = ctx.ResolveDependencies(config)
-		android.FailIfErrored(t, errs)
-
-		codegenCtx := NewCodegenContext(config, ctx.Context, Bp2Build, "")
-
-		// For each directory, test that the expected number of generated targets is correct.
-		for dir, expectedCount := range testCase.expectedCount {
-			bazelTargets, err := generateBazelTargetsForDir(codegenCtx, dir)
-			android.CheckErrorsAgainstExpectations(t, err, testCase.expectedErrorMessages)
-			if actualCount := len(bazelTargets); actualCount != expectedCount {
-				t.Fatalf(
-					"%s: Expected %d bazel target for %s package, got %d",
-					testCase.description,
-					expectedCount,
-					dir,
-					actualCount)
-			}
-
-		}
-	}
-}
-
-func TestCombineBuildFilesBp2buildTargets(t *testing.T) {
-	testCases := []Bp2buildTestCase{
-		{
-			Description:                "filegroup bazel_module.label",
-			ModuleTypeUnderTest:        "filegroup",
-			ModuleTypeUnderTestFactory: android.FileGroupFactory,
-			Blueprint: `filegroup {
-    name: "fg_foo",
-    bazel_module: { label: "//other:fg_foo" },
-}`,
-			ExpectedBazelTargets: []string{},
-			Filesystem: map[string]string{
-				"other/BUILD.bazel": `// BUILD file`,
-			},
-		},
-		{
-			Description:                "multiple bazel_module.label same BUILD",
-			ModuleTypeUnderTest:        "filegroup",
-			ModuleTypeUnderTestFactory: android.FileGroupFactory,
-			Blueprint: `filegroup {
-        name: "fg_foo",
-        bazel_module: { label: "//other:fg_foo" },
-    }
-
-    filegroup {
-        name: "foo",
-        bazel_module: { label: "//other:foo" },
-    }`,
-			ExpectedBazelTargets: []string{},
-			Filesystem: map[string]string{
-				"other/BUILD.bazel": `// BUILD file`,
-			},
-		},
-		{
-			Description:                "filegroup bazel_module.label and bp2build in subdir",
-			ModuleTypeUnderTest:        "filegroup",
-			ModuleTypeUnderTestFactory: android.FileGroupFactory,
-			Dir:                        "other",
-			Blueprint:                  ``,
-			Filesystem: map[string]string{
-				"other/Android.bp": `filegroup {
-        name: "fg_foo",
-        bazel_module: {
-          bp2build_available: true,
-        },
-      }
-      filegroup {
-        name: "fg_bar",
-        bazel_module: {
-          label: "//other:fg_bar"
-        },
-      }`,
-				"other/BUILD.bazel": `// definition for fg_bar`,
-			},
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("filegroup", "fg_foo", map[string]string{}),
-			},
-		},
-		{
-			Description:                "filegroup bazel_module.label and filegroup bp2build",
-			ModuleTypeUnderTest:        "filegroup",
-			ModuleTypeUnderTestFactory: android.FileGroupFactory,
-
-			Filesystem: map[string]string{
-				"other/BUILD.bazel": `// BUILD file`,
-			},
-			Blueprint: `filegroup {
-        name: "fg_foo",
-        bazel_module: {
-          label: "//other:fg_foo",
-        },
-    }
-
-    filegroup {
-        name: "fg_bar",
-        bazel_module: {
-          bp2build_available: true,
-        },
-    }`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("filegroup", "fg_bar", map[string]string{}),
-			},
-		},
-	}
-
-	dir := "."
-	for _, testCase := range testCases {
-		t.Run(testCase.Description, func(t *testing.T) {
-			fs := make(map[string][]byte)
-			toParse := []string{
-				"Android.bp",
-			}
-			for f, content := range testCase.Filesystem {
-				if strings.HasSuffix(f, "Android.bp") {
-					toParse = append(toParse, f)
-				}
-				fs[f] = []byte(content)
-			}
-			config := android.TestConfig(buildDir, nil, testCase.Blueprint, fs)
-			ctx := android.NewTestContext(config)
-			ctx.RegisterModuleType(testCase.ModuleTypeUnderTest, testCase.ModuleTypeUnderTestFactory)
-			ctx.RegisterForBazelConversion()
-
-			_, errs := ctx.ParseFileList(dir, toParse)
-			if errored(t, testCase, errs) {
-				return
-			}
-			_, errs = ctx.ResolveDependencies(config)
-			if errored(t, testCase, errs) {
-				return
-			}
-
-			checkDir := dir
-			if testCase.Dir != "" {
-				checkDir = testCase.Dir
-			}
-			codegenCtx := NewCodegenContext(config, ctx.Context, Bp2Build, "")
-			bazelTargets, err := generateBazelTargetsForDir(codegenCtx, checkDir)
-			android.FailIfErrored(t, err)
-			bazelTargets.sort()
-			actualCount := len(bazelTargets)
-			expectedCount := len(testCase.ExpectedBazelTargets)
-			if actualCount != expectedCount {
-				t.Errorf("Expected %d bazel target, got %d\n%s", expectedCount, actualCount, bazelTargets)
-			}
-			for i, target := range bazelTargets {
-				actualContent := target.content
-				expectedContent := testCase.ExpectedBazelTargets[i]
-				if expectedContent != actualContent {
-					t.Errorf(
-						"Expected generated Bazel target to be '%s', got '%s'",
-						expectedContent,
-						actualContent,
-					)
-				}
-			}
-		})
-	}
-}
-
-func TestGlob(t *testing.T) {
-	testCases := []Bp2buildTestCase{
-		{
-			Description:                "filegroup with glob",
-			ModuleTypeUnderTest:        "filegroup",
-			ModuleTypeUnderTestFactory: android.FileGroupFactory,
-			Blueprint: `filegroup {
-    name: "fg_foo",
-    srcs: ["**/*.txt"],
-    bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("filegroup", "fg_foo", map[string]string{
-					"srcs": `[
-        "other/a.txt",
-        "other/b.txt",
-        "other/subdir/a.txt",
-    ]`,
-				}),
-			},
-			Filesystem: map[string]string{
-				"other/a.txt":        "",
-				"other/b.txt":        "",
-				"other/subdir/a.txt": "",
-				"other/file":         "",
-			},
-		},
-		{
-			Description:                "filegroup with glob in subdir",
-			ModuleTypeUnderTest:        "filegroup",
-			ModuleTypeUnderTestFactory: android.FileGroupFactory,
-			Dir:                        "other",
-			Filesystem: map[string]string{
-				"other/Android.bp": `filegroup {
-    name: "fg_foo",
-    srcs: ["**/*.txt"],
-    bazel_module: { bp2build_available: true },
-}`,
-				"other/a.txt":        "",
-				"other/b.txt":        "",
-				"other/subdir/a.txt": "",
-				"other/file":         "",
-			},
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("filegroup", "fg_foo", map[string]string{
-					"srcs": `[
-        "a.txt",
-        "b.txt",
-        "subdir/a.txt",
-    ]`,
-				}),
-			},
-		},
-		{
-			Description:                "filegroup with glob with no kept BUILD files",
-			ModuleTypeUnderTest:        "filegroup",
-			ModuleTypeUnderTestFactory: android.FileGroupFactory,
-			KeepBuildFileForDirs:       []string{
-				// empty
-			},
-			Blueprint: `filegroup {
-    name: "fg_foo",
-    srcs: ["**/*.txt"],
-    bazel_module: { bp2build_available: true },
-}`,
-			Filesystem: map[string]string{
-				"a.txt":         "",
-				"b.txt":         "",
-				"foo/BUILD":     "",
-				"foo/a.txt":     "",
-				"foo/bar/BUILD": "",
-				"foo/bar/b.txt": "",
-			},
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("filegroup", "fg_foo", map[string]string{
-					"srcs": `[
-        "a.txt",
-        "b.txt",
-        "foo/a.txt",
-        "foo/bar/b.txt",
-    ]`,
-				}),
-			},
-		},
-		{
-			Description:                "filegroup with glob with kept BUILD file",
-			ModuleTypeUnderTest:        "filegroup",
-			ModuleTypeUnderTestFactory: android.FileGroupFactory,
-			KeepBuildFileForDirs: []string{
-				"foo",
-			},
-			Blueprint: `filegroup {
-    name: "fg_foo",
-    srcs: ["**/*.txt"],
-    bazel_module: { bp2build_available: true },
-}`,
-			Filesystem: map[string]string{
-				"a.txt":         "",
-				"b.txt":         "",
-				"foo/BUILD":     "",
-				"foo/a.txt":     "",
-				"foo/bar/BUILD": "",
-				"foo/bar/b.txt": "",
-			},
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("filegroup", "fg_foo", map[string]string{
-					"srcs": `[
-        "a.txt",
-        "b.txt",
-        "//foo:a.txt",
-        "//foo:bar/b.txt",
-    ]`,
-				}),
-			},
-		},
-		{
-			Description:                "filegroup with glob with kept BUILD.bazel file",
-			ModuleTypeUnderTest:        "filegroup",
-			ModuleTypeUnderTestFactory: android.FileGroupFactory,
-			KeepBuildFileForDirs: []string{
-				"foo",
-			},
-			Blueprint: `filegroup {
-    name: "fg_foo",
-    srcs: ["**/*.txt"],
-    bazel_module: { bp2build_available: true },
-}`,
-			Filesystem: map[string]string{
-				"a.txt":               "",
-				"b.txt":               "",
-				"foo/BUILD.bazel":     "",
-				"foo/a.txt":           "",
-				"foo/bar/BUILD.bazel": "",
-				"foo/bar/b.txt":       "",
-			},
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("filegroup", "fg_foo", map[string]string{
-					"srcs": `[
-        "a.txt",
-        "b.txt",
-        "//foo:a.txt",
-        "//foo:bar/b.txt",
-    ]`,
-				}),
-			},
-		},
-		{
-			Description:                "filegroup with glob with Android.bp file as boundary",
-			ModuleTypeUnderTest:        "filegroup",
-			ModuleTypeUnderTestFactory: android.FileGroupFactory,
-			Blueprint: `filegroup {
-    name: "fg_foo",
-    srcs: ["**/*.txt"],
-    bazel_module: { bp2build_available: true },
-}`,
-			Filesystem: map[string]string{
-				"a.txt":              "",
-				"b.txt":              "",
-				"foo/Android.bp":     "",
-				"foo/a.txt":          "",
-				"foo/bar/Android.bp": "",
-				"foo/bar/b.txt":      "",
-			},
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("filegroup", "fg_foo", map[string]string{
-					"srcs": `[
-        "a.txt",
-        "b.txt",
-        "//foo:a.txt",
-        "//foo/bar:b.txt",
-    ]`,
-				}),
-			},
-		},
-		{
-			Description:                "filegroup with glob in subdir with kept BUILD and BUILD.bazel file",
-			ModuleTypeUnderTest:        "filegroup",
-			ModuleTypeUnderTestFactory: android.FileGroupFactory,
-			Dir:                        "other",
-			KeepBuildFileForDirs: []string{
-				"other/foo",
-				"other/foo/bar",
-				// deliberately not other/foo/baz/BUILD.
-			},
-			Filesystem: map[string]string{
-				"other/Android.bp": `filegroup {
-    name: "fg_foo",
-    srcs: ["**/*.txt"],
-    bazel_module: { bp2build_available: true },
-}`,
-				"other/a.txt":               "",
-				"other/b.txt":               "",
-				"other/foo/BUILD":           "",
-				"other/foo/a.txt":           "",
-				"other/foo/bar/BUILD.bazel": "",
-				"other/foo/bar/b.txt":       "",
-				"other/foo/baz/BUILD":       "",
-				"other/foo/baz/c.txt":       "",
-			},
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("filegroup", "fg_foo", map[string]string{
-					"srcs": `[
-        "a.txt",
-        "b.txt",
-        "//other/foo:a.txt",
-        "//other/foo/bar:b.txt",
-        "//other/foo:baz/c.txt",
-    ]`,
-				}),
-			},
-		},
-	}
-
-	for _, testCase := range testCases {
-		t.Run(testCase.Description, func(t *testing.T) {
-			RunBp2BuildTestCaseSimple(t, testCase)
-		})
-	}
-}
-
-func TestGlobExcludeSrcs(t *testing.T) {
-	testCases := []Bp2buildTestCase{
-		{
-			Description:                "filegroup top level exclude_srcs",
-			ModuleTypeUnderTest:        "filegroup",
-			ModuleTypeUnderTestFactory: android.FileGroupFactory,
-			Blueprint: `filegroup {
-    name: "fg_foo",
-    srcs: ["**/*.txt"],
-    exclude_srcs: ["c.txt"],
-    bazel_module: { bp2build_available: true },
-}`,
-			Filesystem: map[string]string{
-				"a.txt":          "",
-				"b.txt":          "",
-				"c.txt":          "",
-				"dir/Android.bp": "",
-				"dir/e.txt":      "",
-				"dir/f.txt":      "",
-			},
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("filegroup", "fg_foo", map[string]string{
-					"srcs": `[
-        "a.txt",
-        "b.txt",
-        "//dir:e.txt",
-        "//dir:f.txt",
-    ]`,
-				}),
-			},
-		},
-		{
-			Description:                "filegroup in subdir exclude_srcs",
-			ModuleTypeUnderTest:        "filegroup",
-			ModuleTypeUnderTestFactory: android.FileGroupFactory,
-			Blueprint:                  "",
-			Dir:                        "dir",
-			Filesystem: map[string]string{
-				"dir/Android.bp": `filegroup {
-    name: "fg_foo",
-    srcs: ["**/*.txt"],
-    exclude_srcs: ["b.txt"],
-    bazel_module: { bp2build_available: true },
-}
-`,
-				"dir/a.txt":             "",
-				"dir/b.txt":             "",
-				"dir/subdir/Android.bp": "",
-				"dir/subdir/e.txt":      "",
-				"dir/subdir/f.txt":      "",
-			},
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("filegroup", "fg_foo", map[string]string{
-					"srcs": `[
-        "a.txt",
-        "//dir/subdir:e.txt",
-        "//dir/subdir:f.txt",
-    ]`,
-				}),
-			},
-		},
-	}
-
-	for _, testCase := range testCases {
-		t.Run(testCase.Description, func(t *testing.T) {
-			RunBp2BuildTestCaseSimple(t, testCase)
-		})
-	}
-}
-
-func TestCommonBp2BuildModuleAttrs(t *testing.T) {
-	testCases := []Bp2buildTestCase{
-		{
-			Description:                "Required into data test",
-			ModuleTypeUnderTest:        "filegroup",
-			ModuleTypeUnderTestFactory: android.FileGroupFactory,
-			StubbedBuildDefinitions:    []string{"reqd"},
-			Blueprint: simpleModule("filegroup", "reqd") + `
-filegroup {
-    name: "fg_foo",
-    required: ["reqd"],
-    bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("filegroup", "fg_foo", map[string]string{
-					"data": `[":reqd"]`,
-				}),
-			},
-		},
-		{
-			Description:                "Required into data test, cyclic self reference is filtered out",
-			ModuleTypeUnderTest:        "filegroup",
-			ModuleTypeUnderTestFactory: android.FileGroupFactory,
-			StubbedBuildDefinitions:    []string{"reqd"},
-			Blueprint: simpleModule("filegroup", "reqd") + `
-filegroup {
-    name: "fg_foo",
-    required: ["reqd", "fg_foo"],
-    bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("filegroup", "fg_foo", map[string]string{
-					"data": `[":reqd"]`,
-				}),
-			},
-		},
-		{
-			Description:                "Required via arch into data test",
-			ModuleTypeUnderTest:        "python_library",
-			ModuleTypeUnderTestFactory: python.PythonLibraryFactory,
-			StubbedBuildDefinitions:    []string{"reqdx86", "reqdarm"},
-			Blueprint: simpleModule("python_library", "reqdx86") +
-				simpleModule("python_library", "reqdarm") + `
-python_library {
-    name: "fg_foo",
-    arch: {
-       arm: {
-         required: ["reqdarm"],
-       },
-       x86: {
-         required: ["reqdx86"],
-       },
-    },
-    bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget("py_library", "fg_foo", map[string]string{
-					"data": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": [":reqdarm"],
-        "//build/bazel_common_rules/platforms/arch:x86": [":reqdx86"],
-        "//conditions:default": [],
-    })`,
-					"srcs_version": `"PY3"`,
-					"imports":      `["."]`,
-				}),
-			},
-		},
-		{
-			Description:                "Required appended to data test",
-			ModuleTypeUnderTest:        "python_library",
-			ModuleTypeUnderTestFactory: python.PythonLibraryFactory,
-			Filesystem: map[string]string{
-				"data.bin": "",
-				"src.py":   "",
-			},
-			StubbedBuildDefinitions: []string{"reqd"},
-			Blueprint: simpleModule("python_library", "reqd") + `
-python_library {
-    name: "fg_foo",
-    data: ["data.bin"],
-    required: ["reqd"],
-    bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget("py_library", "fg_foo", map[string]string{
-					"data": `[
-        "data.bin",
-        ":reqd",
-    ]`,
-					"srcs_version": `"PY3"`,
-					"imports":      `["."]`,
-				}),
-			},
-		},
-		{
-			Description:                "All props-to-attrs at once together test",
-			ModuleTypeUnderTest:        "filegroup",
-			ModuleTypeUnderTestFactory: android.FileGroupFactory,
-			StubbedBuildDefinitions:    []string{"reqd"},
-			Blueprint: simpleModule("filegroup", "reqd") + `
-filegroup {
-    name: "fg_foo",
-    required: ["reqd"],
-    bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("filegroup", "fg_foo", map[string]string{
-					"data": `[":reqd"]`,
-				}),
-			},
-		},
-	}
-
-	for _, tc := range testCases {
-		t.Run(tc.Description, func(t *testing.T) {
-			RunBp2BuildTestCaseSimple(t, tc)
-		})
-	}
-}
-
-func TestLicensesAttrConversion(t *testing.T) {
-	RunBp2BuildTestCase(t,
-		func(ctx android.RegistrationContext) {
-			ctx.RegisterModuleType("license", android.LicenseFactory)
-		},
-		Bp2buildTestCase{
-			Description:                "Test that licenses: attribute is converted",
-			ModuleTypeUnderTest:        "filegroup",
-			ModuleTypeUnderTestFactory: android.FileGroupFactory,
-			Blueprint: `
-license {
-    name: "my_license",
-}
-filegroup {
-    name: "my_filegroup",
-    licenses: ["my_license"],
-}
-`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("filegroup", "my_filegroup", AttrNameToString{
-					"applicable_licenses": `[":my_license"]`,
-				}),
-				MakeBazelTargetNoRestrictions("android_license", "my_license", AttrNameToString{}),
-			},
-		})
-}
-
-func TestGenerateConfigSetting(t *testing.T) {
-	bp := `
-	custom {
-		name: "foo",
-		test_config_setting: true,
-	}
-	`
-	expectedBazelTargets := []string{
-		MakeBazelTargetNoRestrictions(
-			"config_setting",
-			"foo_config_setting",
-			AttrNameToString{
-				"flag_values": `{
-        "//build/bazel/rules/my_string_setting": "foo",
-    }`,
-			},
-		),
-		MakeBazelTarget(
-			"custom",
-			"foo",
-			AttrNameToString{},
-		),
-	}
-	registerCustomModule := func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("custom", customModuleFactoryHostAndDevice)
-	}
-	RunBp2BuildTestCase(t, registerCustomModule, Bp2buildTestCase{
-		Blueprint:            bp,
-		ExpectedBazelTargets: expectedBazelTargets,
-		Description:          "Generating API contribution Bazel targets for custom module",
-	})
-}
-
-// If values of all keys in an axis are equal to //conditions:default, drop the axis and print the common value
-func TestPrettyPrintSelectMapEqualValues(t *testing.T) {
-	lla := bazel.LabelListAttribute{
-		Value: bazel.LabelList{},
-	}
-	libFooImplLabel := bazel.Label{
-		Label: ":libfoo.impl",
-	}
-	lla.SetSelectValue(bazel.OsAndInApexAxis, bazel.AndroidPlatform, bazel.MakeLabelList([]bazel.Label{libFooImplLabel}))
-	lla.SetSelectValue(bazel.OsAndInApexAxis, bazel.ConditionsDefaultConfigKey, bazel.MakeLabelList([]bazel.Label{libFooImplLabel}))
-	actual, _ := prettyPrintAttribute(lla, 0)
-	android.AssertStringEquals(t, "Print the common value if all keys in an axis have the same value", `[":libfoo.impl"]`, actual)
-}
-
-func TestAlreadyPresentBuildTarget(t *testing.T) {
-	bp := `
-	custom {
-		name: "foo",
-	}
-	custom {
-		name: "bar",
-	}
-	`
-	alreadyPresentBuildFile :=
-		MakeBazelTarget(
-			"custom",
-			"foo",
-			AttrNameToString{},
-		)
-	expectedBazelTargets := []string{
-		MakeBazelTarget(
-			"custom",
-			"bar",
-			AttrNameToString{},
-		),
-	}
-	registerCustomModule := func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("custom", customModuleFactoryHostAndDevice)
-	}
-	RunBp2BuildTestCase(t, registerCustomModule, Bp2buildTestCase{
-		AlreadyExistingBuildContents: alreadyPresentBuildFile,
-		Blueprint:                    bp,
-		ExpectedBazelTargets:         expectedBazelTargets,
-		Description:                  "Not duplicating work for an already-present BUILD target.",
-	})
-}
-
-func TestAlreadyPresentOneToManyBuildTarget(t *testing.T) {
-	bp := `
-	custom {
-		name: "foo",
-    one_to_many_prop: true,
-	}
-	custom {
-		name: "bar",
-	}
-	`
-	alreadyPresentBuildFile :=
-		MakeBazelTarget(
-			"custom",
-			// one_to_many_prop ensures that foo generates "foo_proto_library_deps".
-			"foo_proto_library_deps",
-			AttrNameToString{},
-		)
-	expectedBazelTargets := []string{
-		MakeBazelTarget(
-			"custom",
-			"bar",
-			AttrNameToString{},
-		),
-	}
-	registerCustomModule := func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("custom", customModuleFactoryHostAndDevice)
-	}
-	RunBp2BuildTestCase(t, registerCustomModule, Bp2buildTestCase{
-		AlreadyExistingBuildContents: alreadyPresentBuildFile,
-		Blueprint:                    bp,
-		ExpectedBazelTargets:         expectedBazelTargets,
-		Description:                  "Not duplicating work for an already-present BUILD target (different generated name)",
-	})
-}
-
-// Verifies that if a module is defined in pkg1/Android.bp, that a target present
-// in pkg2/BUILD.bazel does not result in the module being labeled "already defined
-// in a BUILD file".
-func TestBuildTargetPresentOtherDirectory(t *testing.T) {
-	bp := `
-	custom {
-		name: "foo",
-	}
-	`
-	expectedBazelTargets := []string{
-		MakeBazelTarget(
-			"custom",
-			"foo",
-			AttrNameToString{},
-		),
-	}
-	registerCustomModule := func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("custom", customModuleFactoryHostAndDevice)
-	}
-	RunBp2BuildTestCase(t, registerCustomModule, Bp2buildTestCase{
-		KeepBuildFileForDirs: []string{"other_pkg"},
-		Filesystem: map[string]string{
-			"other_pkg/BUILD.bazel": MakeBazelTarget("custom", "foo", AttrNameToString{}),
-		},
-		Blueprint:            bp,
-		ExpectedBazelTargets: expectedBazelTargets,
-		Description:          "Not treating a BUILD target as the bazel definition for a module in another package",
-	})
-}
-
-// If CommonAttributes.Dir is set, the bazel target should be created in that dir
-func TestCreateBazelTargetInDifferentDir(t *testing.T) {
-	t.Parallel()
-	bp := `
-	custom {
-		name: "foo",
-		dir: "subdir",
-	}
-	`
-	registerCustomModule := func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("custom", customModuleFactoryHostAndDevice)
-	}
-	// Check that foo is not created in root dir
-	RunBp2BuildTestCase(t, registerCustomModule, Bp2buildTestCase{
-		Description: "foo is not created in root dir because it sets dir explicitly",
-		Blueprint:   bp,
-		Filesystem: map[string]string{
-			"subdir/Android.bp": "",
-		},
-		ExpectedBazelTargets: []string{},
-	})
-	// Check that foo is created in `subdir`
-	RunBp2BuildTestCase(t, registerCustomModule, Bp2buildTestCase{
-		Description: "foo is created in `subdir` because it sets dir explicitly",
-		Blueprint:   bp,
-		Filesystem: map[string]string{
-			"subdir/Android.bp": "",
-		},
-		Dir: "subdir",
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("custom", "foo", AttrNameToString{}),
-		},
-	})
-	// Check that we cannot create target in different dir if it is does not an Android.bp
-	RunBp2BuildTestCase(t, registerCustomModule, Bp2buildTestCase{
-		Description: "foo cannot be created in `subdir` because it does not contain an Android.bp file",
-		Blueprint:   bp,
-		Dir:         "subdir",
-		ExpectedErr: fmt.Errorf("Cannot use ca.Dir to create a BazelTarget in dir: subdir since it does not contain an Android.bp file"),
-	})
-
-}
-
-func TestBp2buildDepsMutator_missingTransitiveDep(t *testing.T) {
-	bp := `
-	custom {
-		name: "foo",
-	}
-
-	custom {
-		name: "has_deps",
-	  arch_paths: [":has_missing_dep", ":foo"],
-	}
-
-	custom {
-		name: "has_missing_dep",
-	  arch_paths: [":missing"],
-	}
-	`
-	expectedBazelTargets := []string{
-		MakeBazelTarget(
-			"custom",
-			"foo",
-			AttrNameToString{},
-		),
-	}
-	registerCustomModule := func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("custom", customModuleFactoryHostAndDevice)
-	}
-	RunBp2BuildTestCase(t, registerCustomModule, Bp2buildTestCase{
-		Blueprint:            bp,
-		ExpectedBazelTargets: expectedBazelTargets,
-		Description:          "Skipping conversion of a target with missing transitive dep",
-	})
-}
-
-func TestBp2buildDepsMutator_missingDirectDep(t *testing.T) {
-	bp := `
-	custom {
-		name: "foo",
-	  arch_paths: [":exists"],
-	}
-	custom {
-		name: "exists",
-	}
-
-	custom {
-		name: "has_missing_dep",
-	  arch_paths: [":missing"],
-	}
-	`
-	expectedBazelTargets := []string{
-		MakeBazelTarget(
-			"custom",
-			"foo",
-			AttrNameToString{"arch_paths": `[":exists"]`},
-		),
-		MakeBazelTarget(
-			"custom",
-			"exists",
-			AttrNameToString{},
-		),
-	}
-	registerCustomModule := func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("custom", customModuleFactoryHostAndDevice)
-	}
-	RunBp2BuildTestCase(t, registerCustomModule, Bp2buildTestCase{
-		Blueprint:            bp,
-		ExpectedBazelTargets: expectedBazelTargets,
-		Description:          "Skipping conversion of a target with missing direct dep",
-	})
-}
-
-func TestBp2buildDepsMutator_unconvertedDirectDep(t *testing.T) {
-	bp := `
-	custom {
-		name: "has_unconverted_dep",
-	  arch_paths: [":unconvertible"],
-	}
-
-	custom {
-		name: "unconvertible",
-		does_not_convert_to_bazel: true
-	}
-	`
-	registerCustomModule := func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("custom", customModuleFactoryHostAndDevice)
-	}
-	RunBp2BuildTestCase(t, registerCustomModule, Bp2buildTestCase{
-		Blueprint:            bp,
-		ExpectedBazelTargets: []string{},
-		Description:          "Skipping conversion of a target with unconverted direct dep",
-	})
-}
-
-func TestBp2buildDepsMutator_unconvertedTransitiveDep(t *testing.T) {
-	bp := `
-	custom {
-		name: "foo",
-	  arch_paths: [":has_unconverted_dep", ":bar"],
-	}
-
-	custom {
-		name: "bar",
-	}
-
-	custom {
-		name: "has_unconverted_dep",
-	  arch_paths: [":unconvertible"],
-	}
-
-	custom {
-		name: "unconvertible",
-		does_not_convert_to_bazel: true
-	}
-	`
-	expectedBazelTargets := []string{
-		MakeBazelTarget(
-			"custom",
-			"bar",
-			AttrNameToString{},
-		),
-	}
-	registerCustomModule := func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("custom", customModuleFactoryHostAndDevice)
-	}
-	RunBp2BuildTestCase(t, registerCustomModule, Bp2buildTestCase{
-		Blueprint:            bp,
-		ExpectedBazelTargets: expectedBazelTargets,
-		Description:          "Skipping conversion of a target with unconverted transitive dep",
-	})
-}
-
-func TestBp2buildDepsMutator_alreadyExistsBuildDeps(t *testing.T) {
-	bp := `
-	custom {
-		name: "foo",
-	  arch_paths: [":bar"],
-	}
-	custom {
-		name: "bar",
-	  arch_paths: [":checked_in"],
-	}
-	custom {
-		name: "checked_in",
-	  arch_paths: [":checked_in"],
-		does_not_convert_to_bazel: true
-	}
-	`
-	expectedBazelTargets := []string{
-		MakeBazelTarget(
-			"custom",
-			"foo",
-			AttrNameToString{"arch_paths": `[":bar"]`},
-		),
-		MakeBazelTarget(
-			"custom",
-			"bar",
-			AttrNameToString{"arch_paths": `[":checked_in"]`},
-		),
-	}
-	registerCustomModule := func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("custom", customModuleFactoryHostAndDevice)
-	}
-	RunBp2BuildTestCase(t, registerCustomModule, Bp2buildTestCase{
-		StubbedBuildDefinitions: []string{"checked_in"},
-		Blueprint:               bp,
-		ExpectedBazelTargets:    expectedBazelTargets,
-		Description:             "Convert target with already-existing build dep",
-	})
-}
-
-// Tests that deps of libc are always considered valid for libc. This circumvents
-// an issue that, in a variantless graph (such as bp2build's), libc has the
-// unique predicament that it depends on itself.
-func TestBp2buildDepsMutator_depOnLibc(t *testing.T) {
-	bp := `
-	custom {
-		name: "foo",
-	  arch_paths: [":libc"],
-	}
-	custom {
-		name: "libc",
-	  arch_paths: [":libc_dep"],
-	}
-	custom {
-		name: "libc_dep",
-		does_not_convert_to_bazel: true
-	}
-	`
-	expectedBazelTargets := []string{
-		MakeBazelTarget(
-			"custom",
-			"foo",
-			AttrNameToString{"arch_paths": `[":libc"]`},
-		),
-		MakeBazelTarget(
-			"custom",
-			"libc",
-			AttrNameToString{"arch_paths": `[":libc_dep"]`},
-		),
-	}
-	registerCustomModule := func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("custom", customModuleFactoryHostAndDevice)
-	}
-	RunBp2BuildTestCase(t, registerCustomModule, Bp2buildTestCase{
-		StubbedBuildDefinitions: []string{"checked_in"},
-		Blueprint:               bp,
-		ExpectedBazelTargets:    expectedBazelTargets,
-		Description:             "Convert target with dep on libc",
-	})
-}
diff --git a/bp2build/bzl_conversion_test.go b/bp2build/bzl_conversion_test.go
deleted file mode 100644
index 645298f..0000000
--- a/bp2build/bzl_conversion_test.go
+++ /dev/null
@@ -1,241 +0,0 @@
-// Copyright 2020 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"io/ioutil"
-	"os"
-	"strings"
-	"testing"
-
-	"android/soong/android"
-)
-
-func setUp() {
-	var err error
-	buildDir, err = ioutil.TempDir("", "bazel_queryview_test")
-	if err != nil {
-		panic(err)
-	}
-}
-
-func tearDown() {
-	os.RemoveAll(buildDir)
-}
-
-func TestMain(m *testing.M) {
-	run := func() int {
-		setUp()
-		defer tearDown()
-
-		return m.Run()
-	}
-
-	os.Exit(run())
-}
-
-func TestGenerateModuleRuleShims(t *testing.T) {
-	moduleTypeFactories := map[string]android.ModuleFactory{
-		"custom":          customModuleFactoryBase,
-		"custom_test":     customTestModuleFactoryBase,
-		"custom_defaults": customDefaultsModuleFactoryBasic,
-	}
-	ruleShims := CreateRuleShims(moduleTypeFactories)
-
-	if len(ruleShims) != 1 {
-		t.Errorf("Expected to generate 1 rule shim, but got %d", len(ruleShims))
-	}
-
-	ruleShim := ruleShims["bp2build"]
-	expectedRules := []string{
-		"custom",
-		"custom_defaults",
-		"custom_test_",
-	}
-
-	if len(ruleShim.rules) != len(expectedRules) {
-		t.Errorf("Expected %d rules, but got %d", len(expectedRules), len(ruleShim.rules))
-	}
-
-	for i, rule := range ruleShim.rules {
-		if rule != expectedRules[i] {
-			t.Errorf("Expected rule shim to contain %s, but got %s", expectedRules[i], rule)
-		}
-	}
-	expectedBzl := `load("//build/bazel/queryview_rules:providers.bzl", "SoongModuleInfo")
-
-def _custom_impl(ctx):
-    return [SoongModuleInfo()]
-
-custom = rule(
-    implementation = _custom_impl,
-    attrs = {
-        "soong_module_name": attr.string(mandatory = True),
-        "soong_module_variant": attr.string(),
-        "soong_module_deps": attr.label_list(providers = [SoongModuleInfo]),
-        "api": attr.string(),
-        "arch_paths": attr.string_list(),
-        "arch_paths_exclude": attr.string_list(),
-        # bazel_module start
-#         "label": attr.string(),
-#         "bp2build_available": attr.bool(),
-        # bazel_module end
-        "bool_prop": attr.bool(),
-        "bool_ptr_prop": attr.bool(),
-        "dir": attr.string(),
-        "does_not_convert_to_bazel": attr.bool(),
-        "embedded_prop": attr.string(),
-        "int64_ptr_prop": attr.int(),
-        # nested_props start
-#         "nested_prop": attr.string(),
-        # nested_props end
-        # nested_props_ptr start
-#         "nested_prop": attr.string(),
-        # nested_props_ptr end
-        "one_to_many_prop": attr.bool(),
-        "other_embedded_prop": attr.string(),
-        "string_list_prop": attr.string_list(),
-        "string_literal_prop": attr.string(),
-        "string_prop": attr.string(),
-        "string_ptr_prop": attr.string(),
-        "test_config_setting": attr.bool(),
-    },
-)
-
-def _custom_defaults_impl(ctx):
-    return [SoongModuleInfo()]
-
-custom_defaults = rule(
-    implementation = _custom_defaults_impl,
-    attrs = {
-        "soong_module_name": attr.string(mandatory = True),
-        "soong_module_variant": attr.string(),
-        "soong_module_deps": attr.label_list(providers = [SoongModuleInfo]),
-        "api": attr.string(),
-        "arch_paths": attr.string_list(),
-        "arch_paths_exclude": attr.string_list(),
-        "bool_prop": attr.bool(),
-        "bool_ptr_prop": attr.bool(),
-        "dir": attr.string(),
-        "does_not_convert_to_bazel": attr.bool(),
-        "embedded_prop": attr.string(),
-        "int64_ptr_prop": attr.int(),
-        # nested_props start
-#         "nested_prop": attr.string(),
-        # nested_props end
-        # nested_props_ptr start
-#         "nested_prop": attr.string(),
-        # nested_props_ptr end
-        "one_to_many_prop": attr.bool(),
-        "other_embedded_prop": attr.string(),
-        "string_list_prop": attr.string_list(),
-        "string_literal_prop": attr.string(),
-        "string_prop": attr.string(),
-        "string_ptr_prop": attr.string(),
-        "test_config_setting": attr.bool(),
-    },
-)
-
-def _custom_test__impl(ctx):
-    return [SoongModuleInfo()]
-
-custom_test_ = rule(
-    implementation = _custom_test__impl,
-    attrs = {
-        "soong_module_name": attr.string(mandatory = True),
-        "soong_module_variant": attr.string(),
-        "soong_module_deps": attr.label_list(providers = [SoongModuleInfo]),
-        "api": attr.string(),
-        "arch_paths": attr.string_list(),
-        "arch_paths_exclude": attr.string_list(),
-        "bool_prop": attr.bool(),
-        "bool_ptr_prop": attr.bool(),
-        "dir": attr.string(),
-        "does_not_convert_to_bazel": attr.bool(),
-        "embedded_prop": attr.string(),
-        "int64_ptr_prop": attr.int(),
-        # nested_props start
-#         "nested_prop": attr.string(),
-        # nested_props end
-        # nested_props_ptr start
-#         "nested_prop": attr.string(),
-        # nested_props_ptr end
-        "one_to_many_prop": attr.bool(),
-        "other_embedded_prop": attr.string(),
-        "string_list_prop": attr.string_list(),
-        "string_literal_prop": attr.string(),
-        "string_prop": attr.string(),
-        "string_ptr_prop": attr.string(),
-        "test_config_setting": attr.bool(),
-        # test_prop start
-#         "test_string_prop": attr.string(),
-        # test_prop end
-    },
-)
-`
-
-	if ruleShim.content != expectedBzl {
-		t.Errorf(
-			"Expected the generated rule shim bzl to be:\n%s\nbut got:\n%s",
-			expectedBzl,
-			ruleShim.content)
-	}
-}
-
-func TestGenerateSoongModuleBzl(t *testing.T) {
-	ruleShims := map[string]RuleShim{
-		"file1": RuleShim{
-			rules:   []string{"a", "b"},
-			content: "irrelevant",
-		},
-		"file2": RuleShim{
-			rules:   []string{"c", "d"},
-			content: "irrelevant",
-		},
-	}
-	files := CreateBazelFiles(ruleShims, make(map[string]BazelTargets), QueryView)
-
-	var actualSoongModuleBzl BazelFile
-	for _, f := range files {
-		if f.Basename == "soong_module.bzl" {
-			actualSoongModuleBzl = f
-		}
-	}
-
-	expectedLoad := `load("//build/bazel/queryview_rules:file1.bzl", "a", "b")
-load("//build/bazel/queryview_rules:file2.bzl", "c", "d")
-`
-	expectedRuleMap := `soong_module_rule_map = {
-    "a": a,
-    "b": b,
-    "c": c,
-    "d": d,
-}`
-	if !strings.Contains(actualSoongModuleBzl.Contents, expectedLoad) {
-		t.Errorf(
-			"Generated soong_module.bzl:\n\n%s\n\n"+
-				"Could not find the load statement in the generated soong_module.bzl:\n%s",
-			actualSoongModuleBzl.Contents,
-			expectedLoad)
-	}
-
-	if !strings.Contains(actualSoongModuleBzl.Contents, expectedRuleMap) {
-		t.Errorf(
-			"Generated soong_module.bzl:\n\n%s\n\n"+
-				"Could not find the module -> rule map in the generated soong_module.bzl:\n%s",
-			actualSoongModuleBzl.Contents,
-			expectedRuleMap)
-	}
-}
diff --git a/bp2build/cc_binary_conversion_test.go b/bp2build/cc_binary_conversion_test.go
deleted file mode 100644
index 2857a91..0000000
--- a/bp2build/cc_binary_conversion_test.go
+++ /dev/null
@@ -1,1309 +0,0 @@
-// Copyright 2021 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"fmt"
-	"strings"
-	"testing"
-
-	"android/soong/android"
-	"android/soong/cc"
-	"android/soong/genrule"
-)
-
-const (
-	ccBinaryTypePlaceHolder = "{rule_name}"
-)
-
-type testBazelTarget struct {
-	typ   string
-	name  string
-	attrs AttrNameToString
-}
-
-func generateBazelTargetsForTest(targets []testBazelTarget, hod android.HostOrDeviceSupported) []string {
-	ret := make([]string, 0, len(targets))
-	for _, t := range targets {
-		attrs := t.attrs.clone()
-		ret = append(ret, makeBazelTargetHostOrDevice(t.typ, t.name, attrs, hod))
-	}
-	return ret
-}
-
-type ccBinaryBp2buildTestCase struct {
-	description             string
-	filesystem              map[string]string
-	blueprint               string
-	targets                 []testBazelTarget
-	stubbedBuildDefinitions []string
-}
-
-func registerCcBinaryModuleTypes(ctx android.RegistrationContext) {
-	cc.RegisterCCBuildComponents(ctx)
-	ctx.RegisterModuleType("filegroup", android.FileGroupFactory)
-	ctx.RegisterModuleType("cc_library_static", cc.LibraryStaticFactory)
-	ctx.RegisterModuleType("cc_library", cc.LibraryFactory)
-	ctx.RegisterModuleType("genrule", genrule.GenRuleFactory)
-}
-
-var binaryReplacer = strings.NewReplacer(ccBinaryTypePlaceHolder, "cc_binary")
-var hostBinaryReplacer = strings.NewReplacer(ccBinaryTypePlaceHolder, "cc_binary_host")
-
-func runCcBinaryTests(t *testing.T, tc ccBinaryBp2buildTestCase) {
-	t.Helper()
-	runCcBinaryTestCase(t, tc)
-	runCcHostBinaryTestCase(t, tc)
-}
-
-func runCcBinaryTestCase(t *testing.T, testCase ccBinaryBp2buildTestCase) {
-	t.Helper()
-	moduleTypeUnderTest := "cc_binary"
-
-	description := fmt.Sprintf("%s %s", moduleTypeUnderTest, testCase.description)
-	t.Run(description, func(t *testing.T) {
-		t.Helper()
-		RunBp2BuildTestCase(t, registerCcBinaryModuleTypes, Bp2buildTestCase{
-			ExpectedBazelTargets:       generateBazelTargetsForTest(testCase.targets, android.DeviceSupported),
-			ModuleTypeUnderTest:        moduleTypeUnderTest,
-			ModuleTypeUnderTestFactory: cc.BinaryFactory,
-			Description:                description,
-			Blueprint:                  binaryReplacer.Replace(testCase.blueprint),
-			Filesystem:                 testCase.filesystem,
-			StubbedBuildDefinitions:    testCase.stubbedBuildDefinitions,
-		})
-	})
-}
-
-func runCcHostBinaryTestCase(t *testing.T, testCase ccBinaryBp2buildTestCase) {
-	t.Helper()
-	moduleTypeUnderTest := "cc_binary_host"
-	description := fmt.Sprintf("%s %s", moduleTypeUnderTest, testCase.description)
-	t.Run(description, func(t *testing.T) {
-		RunBp2BuildTestCase(t, registerCcBinaryModuleTypes, Bp2buildTestCase{
-			ExpectedBazelTargets:       generateBazelTargetsForTest(testCase.targets, android.HostSupported),
-			ModuleTypeUnderTest:        moduleTypeUnderTest,
-			ModuleTypeUnderTestFactory: cc.BinaryHostFactory,
-			Description:                description,
-			Blueprint:                  hostBinaryReplacer.Replace(testCase.blueprint),
-			Filesystem:                 testCase.filesystem,
-			StubbedBuildDefinitions:    testCase.stubbedBuildDefinitions,
-		})
-	})
-}
-
-func TestBasicCcBinary(t *testing.T) {
-	runCcBinaryTests(t, ccBinaryBp2buildTestCase{
-		description: "basic -- properties -> attrs with little/no transformation",
-		filesystem: map[string]string{
-			soongCcVersionLibBpPath: soongCcVersionLibBp,
-		},
-		stubbedBuildDefinitions: []string{"//build/soong/cc/libbuildversion:libbuildversion"},
-		blueprint: `
-{rule_name} {
-    name: "foo",
-    srcs: ["a.cc"],
-    local_include_dirs: ["dir"],
-    include_dirs: ["absolute_dir"],
-    cflags: ["-Dcopt"],
-    cppflags: ["-Dcppflag"],
-    conlyflags: ["-Dconlyflag"],
-    asflags: ["-Dasflag"],
-    ldflags: ["ld-flag"],
-    rtti: true,
-    strip: {
-        all: true,
-        keep_symbols: true,
-        keep_symbols_and_debug_frame: true,
-        keep_symbols_list: ["symbol"],
-        none: true,
-    },
-    sdk_version: "current",
-    min_sdk_version: "29",
-    use_version_lib: true,
-}
-`,
-		targets: []testBazelTarget{
-			{"cc_binary", "foo", AttrNameToString{
-				"absolute_includes": `["absolute_dir"]`,
-				"asflags":           `["-Dasflag"]`,
-				"conlyflags":        `["-Dconlyflag"]`,
-				"copts":             `["-Dcopt"]`,
-				"cppflags":          `["-Dcppflag"]`,
-				"linkopts":          `["ld-flag"]`,
-				"local_includes": `[
-        "dir",
-        ".",
-    ]`,
-				"rtti": `True`,
-				"srcs": `["a.cc"]`,
-				"strip": `{
-        "all": True,
-        "keep_symbols": True,
-        "keep_symbols_and_debug_frame": True,
-        "keep_symbols_list": ["symbol"],
-        "none": True,
-    }`,
-				"sdk_version":        `"current"`,
-				"min_sdk_version":    `"29"`,
-				"use_version_lib":    `True`,
-				"whole_archive_deps": `["//build/soong/cc/libbuildversion:libbuildversion"]`,
-			},
-			},
-		},
-	})
-}
-
-func TestCcBinaryWithSharedLdflagDisableFeature(t *testing.T) {
-	runCcBinaryTests(t, ccBinaryBp2buildTestCase{
-		description: `ldflag "-shared" disables static_flag feature`,
-		blueprint: `
-{rule_name} {
-    name: "foo",
-    ldflags: ["-shared"],
-    include_build_directory: false,
-}
-`,
-		targets: []testBazelTarget{
-			{"cc_binary", "foo", AttrNameToString{
-				"features": `["-static_flag"]`,
-				"linkopts": `["-shared"]`,
-			},
-			},
-		},
-	})
-}
-
-func TestCcBinaryWithLinkStatic(t *testing.T) {
-	runCcBinaryTests(t, ccBinaryBp2buildTestCase{
-		description: "link static",
-		blueprint: `
-{rule_name} {
-    name: "foo",
-    static_executable: true,
-    include_build_directory: false,
-}
-`,
-		targets: []testBazelTarget{
-			{"cc_binary", "foo", AttrNameToString{
-				"linkshared": `False`,
-			},
-			},
-		},
-	})
-}
-
-func TestCcBinaryVersionScriptAndDynamicList(t *testing.T) {
-	runCcBinaryTests(t, ccBinaryBp2buildTestCase{
-		description: `version script and dynamic list`,
-		blueprint: `
-{rule_name} {
-    name: "foo",
-    include_build_directory: false,
-    version_script: "vs",
-    dynamic_list: "dynamic.list",
-}
-`,
-		targets: []testBazelTarget{
-			{"cc_binary", "foo", AttrNameToString{
-				"additional_linker_inputs": `[
-        "vs",
-        "dynamic.list",
-    ]`,
-				"linkopts": `[
-        "-Wl,--version-script,$(location vs)",
-        "-Wl,--dynamic-list,$(location dynamic.list)",
-    ]`,
-				"features": `["android_cfi_exports_map"]`,
-			},
-			},
-		},
-	})
-}
-
-func TestCcBinaryLdflagsSplitBySpaceExceptSoongAdded(t *testing.T) {
-	runCcBinaryTests(t, ccBinaryBp2buildTestCase{
-		description: "ldflags are split by spaces except for the ones added by soong (version script and dynamic list)",
-		blueprint: `
-{rule_name} {
-    name: "foo",
-		ldflags: [
-			"--nospace_flag",
-			"-z spaceflag",
-		],
-		version_script: "version_script",
-		dynamic_list: "dynamic.list",
-    include_build_directory: false,
-}
-`,
-		targets: []testBazelTarget{
-			{"cc_binary", "foo", AttrNameToString{
-				"additional_linker_inputs": `[
-        "version_script",
-        "dynamic.list",
-    ]`,
-				"features": `["android_cfi_exports_map"]`,
-				"linkopts": `[
-        "--nospace_flag",
-        "-z",
-        "spaceflag",
-        "-Wl,--version-script,$(location version_script)",
-        "-Wl,--dynamic-list,$(location dynamic.list)",
-    ]`,
-			}}},
-	})
-}
-
-func TestCcBinarySplitSrcsByLang(t *testing.T) {
-	runCcHostBinaryTestCase(t, ccBinaryBp2buildTestCase{
-		description:             "split srcs by lang",
-		stubbedBuildDefinitions: []string{"fg_foo"},
-		blueprint: `
-{rule_name} {
-    name: "foo",
-    srcs: [
-        "asonly.S",
-        "conly.c",
-        "cpponly.cpp",
-        ":fg_foo",
-    ],
-    include_build_directory: false,
-}
-` + simpleModule("filegroup", "fg_foo"),
-		targets: []testBazelTarget{
-			{"cc_binary", "foo", AttrNameToString{
-				"srcs": `[
-        "cpponly.cpp",
-        ":fg_foo_cpp_srcs",
-    ]`,
-				"srcs_as": `[
-        "asonly.S",
-        ":fg_foo_as_srcs",
-    ]`,
-				"srcs_c": `[
-        "conly.c",
-        ":fg_foo_c_srcs",
-    ]`,
-			},
-			},
-		},
-	})
-}
-
-func TestCcBinaryDoNotDistinguishBetweenDepsAndImplementationDeps(t *testing.T) {
-	runCcBinaryTestCase(t, ccBinaryBp2buildTestCase{
-		description: "no implementation deps",
-		stubbedBuildDefinitions: []string{"generated_hdr", "export_generated_hdr", "static_dep", "implementation_static_dep",
-			"whole_static_dep", "not_explicitly_exported_whole_static_dep", "shared_dep", "implementation_shared_dep"},
-		blueprint: `
-genrule {
-    name: "generated_hdr",
-    cmd: "nothing to see here",
-}
-
-genrule {
-    name: "export_generated_hdr",
-    cmd: "nothing to see here",
-}
-
-{rule_name} {
-    name: "foo",
-    srcs: ["foo.cpp"],
-    shared_libs: ["implementation_shared_dep", "shared_dep"],
-    export_shared_lib_headers: ["shared_dep"],
-    static_libs: ["implementation_static_dep", "static_dep"],
-    export_static_lib_headers: ["static_dep", "whole_static_dep"],
-    whole_static_libs: ["not_explicitly_exported_whole_static_dep", "whole_static_dep"],
-    include_build_directory: false,
-    generated_headers: ["generated_hdr", "export_generated_hdr"],
-    export_generated_headers: ["export_generated_hdr"],
-}
-` +
-			simpleModule("cc_library_static", "static_dep") +
-			simpleModule("cc_library_static", "implementation_static_dep") +
-			simpleModule("cc_library_static", "whole_static_dep") +
-			simpleModule("cc_library_static", "not_explicitly_exported_whole_static_dep") +
-			simpleModule("cc_library", "shared_dep") +
-			simpleModule("cc_library", "implementation_shared_dep"),
-		targets: []testBazelTarget{
-			{"cc_binary", "foo", AttrNameToString{
-				"deps": `[
-        ":implementation_static_dep",
-        ":static_dep",
-    ]`,
-				"dynamic_deps": `[
-        ":implementation_shared_dep",
-        ":shared_dep",
-    ]`,
-				"srcs": `[
-        "foo.cpp",
-        ":generated_hdr",
-        ":export_generated_hdr",
-    ]`,
-				"whole_archive_deps": `[
-        ":not_explicitly_exported_whole_static_dep",
-        ":whole_static_dep",
-    ]`,
-				"local_includes": `["."]`,
-			},
-			},
-		},
-	})
-}
-
-func TestCcBinaryNocrtTests(t *testing.T) {
-	baseTestCases := []struct {
-		description   string
-		soongProperty string
-		bazelAttr     AttrNameToString
-	}{
-		{
-			description:   "nocrt: true",
-			soongProperty: `nocrt: true,`,
-			bazelAttr:     AttrNameToString{"features": `["-link_crt"]`},
-		},
-		{
-			description:   "nocrt: false",
-			soongProperty: `nocrt: false,`,
-			bazelAttr:     AttrNameToString{},
-		},
-		{
-			description: "nocrt: not set",
-			bazelAttr:   AttrNameToString{},
-		},
-	}
-
-	baseBlueprint := `{rule_name} {
-    name: "foo",%s
-    include_build_directory: false,
-}
-`
-
-	for _, btc := range baseTestCases {
-		prop := btc.soongProperty
-		if len(prop) > 0 {
-			prop = "\n" + prop
-		}
-		runCcBinaryTests(t, ccBinaryBp2buildTestCase{
-			description: btc.description,
-			blueprint:   fmt.Sprintf(baseBlueprint, prop),
-			targets: []testBazelTarget{
-				{"cc_binary", "foo", btc.bazelAttr},
-			},
-		})
-	}
-}
-
-func TestCcBinaryNo_libcrtTests(t *testing.T) {
-	baseTestCases := []struct {
-		description   string
-		soongProperty string
-		bazelAttr     AttrNameToString
-	}{
-		{
-			description:   "no_libcrt: true",
-			soongProperty: `no_libcrt: true,`,
-			bazelAttr:     AttrNameToString{"features": `["-use_libcrt"]`},
-		},
-		{
-			description:   "no_libcrt: false",
-			soongProperty: `no_libcrt: false,`,
-			bazelAttr:     AttrNameToString{},
-		},
-		{
-			description: "no_libcrt: not set",
-			bazelAttr:   AttrNameToString{},
-		},
-	}
-
-	baseBlueprint := `{rule_name} {
-    name: "foo",%s
-    include_build_directory: false,
-}
-`
-
-	for _, btc := range baseTestCases {
-		prop := btc.soongProperty
-		if len(prop) > 0 {
-			prop = "\n" + prop
-		}
-		runCcBinaryTests(t, ccBinaryBp2buildTestCase{
-			description: btc.description,
-			blueprint:   fmt.Sprintf(baseBlueprint, prop),
-			targets: []testBazelTarget{
-				{"cc_binary", "foo", btc.bazelAttr},
-			},
-		})
-	}
-}
-
-func TestCcBinaryPropertiesToFeatures(t *testing.T) {
-	baseTestCases := []struct {
-		description   string
-		soongProperty string
-		bazelAttr     AttrNameToString
-	}{
-		{
-			description:   "pack_relocation: true",
-			soongProperty: `pack_relocations: true,`,
-			bazelAttr:     AttrNameToString{},
-		},
-		{
-			description:   "pack_relocations: false",
-			soongProperty: `pack_relocations: false,`,
-			bazelAttr:     AttrNameToString{"features": `["disable_pack_relocations"]`},
-		},
-		{
-			description: "pack_relocations: not set",
-			bazelAttr:   AttrNameToString{},
-		},
-		{
-			description:   "pack_relocation: true",
-			soongProperty: `allow_undefined_symbols: true,`,
-			bazelAttr:     AttrNameToString{"features": `["-no_undefined_symbols"]`},
-		},
-		{
-			description:   "allow_undefined_symbols: false",
-			soongProperty: `allow_undefined_symbols: false,`,
-			bazelAttr:     AttrNameToString{},
-		},
-		{
-			description: "allow_undefined_symbols: not set",
-			bazelAttr:   AttrNameToString{},
-		},
-	}
-
-	baseBlueprint := `{rule_name} {
-    name: "foo",%s
-    include_build_directory: false,
-}
-`
-	for _, btc := range baseTestCases {
-		prop := btc.soongProperty
-		if len(prop) > 0 {
-			prop = "\n" + prop
-		}
-		runCcBinaryTests(t, ccBinaryBp2buildTestCase{
-			description: btc.description,
-			blueprint:   fmt.Sprintf(baseBlueprint, prop),
-			targets: []testBazelTarget{
-				{"cc_binary", "foo", btc.bazelAttr},
-			},
-		})
-	}
-}
-
-func TestCcBinarySharedProto(t *testing.T) {
-	runCcBinaryTests(t, ccBinaryBp2buildTestCase{
-		stubbedBuildDefinitions: []string{"libprotobuf-cpp-full", "libprotobuf-cpp-lite"},
-		blueprint: soongCcProtoLibraries + `{rule_name} {
-	name: "foo",
-	srcs: ["foo.proto"],
-	proto: {
-	},
-	include_build_directory: false,
-}`,
-		targets: []testBazelTarget{
-			{"proto_library", "foo_proto", AttrNameToString{
-				"srcs": `["foo.proto"]`,
-			}}, {"cc_lite_proto_library", "foo_cc_proto_lite", AttrNameToString{
-				"deps": `[":foo_proto"]`,
-			}}, {"cc_binary", "foo", AttrNameToString{
-				"dynamic_deps":       `[":libprotobuf-cpp-lite"]`,
-				"whole_archive_deps": `[":foo_cc_proto_lite"]`,
-			}},
-		},
-	})
-}
-
-func TestCcBinaryStaticProto(t *testing.T) {
-	runCcBinaryTests(t, ccBinaryBp2buildTestCase{
-		stubbedBuildDefinitions: []string{"libprotobuf-cpp-full", "libprotobuf-cpp-lite"},
-		blueprint: soongCcProtoLibraries + `{rule_name} {
-	name: "foo",
-	srcs: ["foo.proto"],
-	static_executable: true,
-	proto: {
-	},
-	include_build_directory: false,
-}`,
-		targets: []testBazelTarget{
-			{"proto_library", "foo_proto", AttrNameToString{
-				"srcs": `["foo.proto"]`,
-			}}, {"cc_lite_proto_library", "foo_cc_proto_lite", AttrNameToString{
-				"deps": `[":foo_proto"]`,
-			}}, {"cc_binary", "foo", AttrNameToString{
-				"deps":               `[":libprotobuf-cpp-lite"]`,
-				"whole_archive_deps": `[":foo_cc_proto_lite"]`,
-				"linkshared":         `False`,
-			}},
-		},
-	})
-}
-
-func TestCcBinaryConvertLex(t *testing.T) {
-	runCcBinaryTests(t, ccBinaryBp2buildTestCase{
-		description: `.l and .ll sources converted to .c and .cc`,
-		blueprint: `
-{rule_name} {
-    name: "foo",
-		srcs: ["foo.c", "bar.cc", "foo1.l", "foo2.l", "bar1.ll", "bar2.ll"],
-		lex: { flags: ["--foo_opt", "--bar_opt"] },
-		include_build_directory: false,
-}
-`,
-		targets: []testBazelTarget{
-			{"genlex", "foo_genlex_l", AttrNameToString{
-				"srcs": `[
-        "foo1.l",
-        "foo2.l",
-    ]`,
-				"lexopts": `[
-        "--foo_opt",
-        "--bar_opt",
-    ]`,
-			}},
-			{"genlex", "foo_genlex_ll", AttrNameToString{
-				"srcs": `[
-        "bar1.ll",
-        "bar2.ll",
-    ]`,
-				"lexopts": `[
-        "--foo_opt",
-        "--bar_opt",
-    ]`,
-			}},
-			{"cc_binary", "foo", AttrNameToString{
-				"srcs": `[
-        "bar.cc",
-        ":foo_genlex_ll",
-    ]`,
-				"srcs_c": `[
-        "foo.c",
-        ":foo_genlex_l",
-    ]`,
-			}},
-		},
-	})
-}
-
-func TestCcBinaryRuntimeLibs(t *testing.T) {
-	runCcBinaryTests(t, ccBinaryBp2buildTestCase{
-		description: "cc_binary with runtime libs",
-		blueprint: `
-cc_library {
-    name: "bar",
-    srcs: ["b.cc"],
-}
-
-{rule_name} {
-    name: "foo",
-    srcs: ["a.cc"],
-    runtime_libs: ["bar"],
-}
-`,
-		targets: []testBazelTarget{
-			{"cc_library_static", "bar_bp2build_cc_library_static", AttrNameToString{
-				"local_includes":         `["."]`,
-				"srcs":                   `["b.cc"]`,
-				"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
-			},
-			},
-			{"cc_library_shared", "bar", AttrNameToString{
-				"local_includes":         `["."]`,
-				"srcs":                   `["b.cc"]`,
-				"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
-			},
-			},
-			{"cc_binary", "foo", AttrNameToString{
-				"local_includes": `["."]`,
-				"srcs":           `["a.cc"]`,
-				"runtime_deps":   `[":bar"]`,
-			},
-			},
-		},
-	})
-}
-
-func TestCcBinaryWithInstructionSet(t *testing.T) {
-	runCcBinaryTests(t, ccBinaryBp2buildTestCase{
-		description: "instruction set",
-		blueprint: `
-{rule_name} {
-    name: "foo",
-    arch: {
-      arm: {
-        instruction_set: "arm",
-      }
-    }
-}
-`,
-		targets: []testBazelTarget{
-			{"cc_binary", "foo", AttrNameToString{
-				"features": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["arm_isa_arm"],
-        "//conditions:default": [],
-    })`,
-				"local_includes": `["."]`,
-			}},
-		},
-	})
-}
-
-func TestCcBinaryEmptySuffix(t *testing.T) {
-	runCcBinaryTests(t, ccBinaryBp2buildTestCase{
-		description: "binary with empty suffix",
-		blueprint: `
-{rule_name} {
-    name: "foo",
-    suffix: "",
-}`,
-		targets: []testBazelTarget{
-			{"cc_binary", "foo", AttrNameToString{
-				"local_includes": `["."]`,
-				"suffix":         `""`,
-			}},
-		},
-	})
-}
-
-func TestCcBinarySuffix(t *testing.T) {
-	runCcBinaryTests(t, ccBinaryBp2buildTestCase{
-		description: "binary with suffix",
-		blueprint: `
-{rule_name} {
-    name: "foo",
-    suffix: "-suf",
-}
-`,
-		targets: []testBazelTarget{
-			{"cc_binary", "foo", AttrNameToString{
-				"local_includes": `["."]`,
-				"suffix":         `"-suf"`,
-			}},
-		},
-	})
-}
-
-func TestCcArchVariantBinarySuffix(t *testing.T) {
-	runCcBinaryTests(t, ccBinaryBp2buildTestCase{
-		description: "binary with suffix",
-		blueprint: `
-{rule_name} {
-    name: "foo",
-    arch: {
-        arm64: { suffix: "-64" },
-        arm:   { suffix: "-32" },
-		},
-}
-`,
-		targets: []testBazelTarget{
-			{"cc_binary", "foo", AttrNameToString{
-				"local_includes": `["."]`,
-				"suffix": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": "-32",
-        "//build/bazel_common_rules/platforms/arch:arm64": "-64",
-        "//conditions:default": None,
-    })`,
-			}},
-		},
-	})
-}
-
-func TestCcBinaryWithSyspropSrcs(t *testing.T) {
-	runCcBinaryTestCase(t, ccBinaryBp2buildTestCase{
-		description: "cc_binary with sysprop sources",
-		blueprint: `
-{rule_name} {
-	name: "foo",
-	srcs: [
-		"bar.sysprop",
-		"baz.sysprop",
-		"blah.cpp",
-	],
-	min_sdk_version: "5",
-}`,
-		targets: []testBazelTarget{
-			{"sysprop_library", "foo_sysprop_library", AttrNameToString{
-				"srcs": `[
-        "bar.sysprop",
-        "baz.sysprop",
-    ]`,
-			}},
-			{"cc_sysprop_library_static", "foo_cc_sysprop_library_static", AttrNameToString{
-				"dep":             `":foo_sysprop_library"`,
-				"min_sdk_version": `"5"`,
-			}},
-			{"cc_binary", "foo", AttrNameToString{
-				"srcs":               `["blah.cpp"]`,
-				"local_includes":     `["."]`,
-				"min_sdk_version":    `"5"`,
-				"whole_archive_deps": `[":foo_cc_sysprop_library_static"]`,
-			}},
-		},
-	})
-}
-
-func TestCcBinaryWithSyspropSrcsSomeConfigs(t *testing.T) {
-	runCcBinaryTestCase(t, ccBinaryBp2buildTestCase{
-		description: "cc_binary with sysprop sources in some configs but not others",
-		blueprint: `
-{rule_name} {
-	name: "foo",
-	srcs: [
-		"blah.cpp",
-	],
-	target: {
-		android: {
-			srcs: ["bar.sysprop"],
-		},
-	},
-	min_sdk_version: "5",
-}`,
-		targets: []testBazelTarget{
-			{"sysprop_library", "foo_sysprop_library", AttrNameToString{
-				"srcs": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["bar.sysprop"],
-        "//conditions:default": [],
-    })`,
-			}},
-			{"cc_sysprop_library_static", "foo_cc_sysprop_library_static", AttrNameToString{
-				"dep":             `":foo_sysprop_library"`,
-				"min_sdk_version": `"5"`,
-			}},
-			{"cc_binary", "foo", AttrNameToString{
-				"srcs":            `["blah.cpp"]`,
-				"local_includes":  `["."]`,
-				"min_sdk_version": `"5"`,
-				"whole_archive_deps": `select({
-        "//build/bazel_common_rules/platforms/os:android": [":foo_cc_sysprop_library_static"],
-        "//conditions:default": [],
-    })`,
-			}},
-		},
-	})
-}
-
-func TestCcBinaryWithIntegerOverflowProperty(t *testing.T) {
-	runCcBinaryTestCase(t, ccBinaryBp2buildTestCase{
-		description: "cc_binary with integer overflow property specified",
-		blueprint: `
-{rule_name} {
-	name: "foo",
-	sanitize: {
-		integer_overflow: true,
-	},
-}`,
-		targets: []testBazelTarget{
-			{"cc_binary", "foo", AttrNameToString{
-				"local_includes": `["."]`,
-				"features":       `["ubsan_integer_overflow"]`,
-			}},
-		},
-	})
-}
-
-func TestCcBinaryWithMiscUndefinedProperty(t *testing.T) {
-	runCcBinaryTestCase(t, ccBinaryBp2buildTestCase{
-		description: "cc_binary with miscellaneous properties specified",
-		blueprint: `
-{rule_name} {
-	name: "foo",
-	sanitize: {
-		misc_undefined: ["undefined", "nullability"],
-	},
-}`,
-		targets: []testBazelTarget{
-			{"cc_binary", "foo", AttrNameToString{
-				"local_includes": `["."]`,
-				"features": `[
-        "ubsan_undefined",
-        "ubsan_nullability",
-    ]`,
-			}},
-		},
-	})
-}
-
-func TestCcBinaryWithUBSanPropertiesArchSpecific(t *testing.T) {
-	runCcBinaryTestCase(t, ccBinaryBp2buildTestCase{
-		description: "cc_binary has correct feature select when UBSan props are specified in arch specific blocks",
-		blueprint: `
-{rule_name} {
-	name: "foo",
-	sanitize: {
-		misc_undefined: ["undefined", "nullability"],
-	},
-	target: {
-			android: {
-					sanitize: {
-							misc_undefined: ["alignment"],
-					},
-			},
-			linux_glibc: {
-					sanitize: {
-							integer_overflow: true,
-					},
-			},
-	},
-}`,
-		targets: []testBazelTarget{
-			{"cc_binary", "foo", AttrNameToString{
-				"local_includes": `["."]`,
-				"features": `[
-        "ubsan_undefined",
-        "ubsan_nullability",
-    ] + select({
-        "//build/bazel_common_rules/platforms/os:android": ["ubsan_alignment"],
-        "//build/bazel_common_rules/platforms/os:linux_glibc": ["ubsan_integer_overflow"],
-        "//conditions:default": [],
-    })`,
-			}},
-		},
-	})
-}
-
-func TestCcBinaryWithSanitizerBlocklist(t *testing.T) {
-	runCcBinaryTestCase(t, ccBinaryBp2buildTestCase{
-		description: "cc_binary has the correct feature when sanitize.blocklist is provided",
-		blueprint: `
-{rule_name} {
-	name: "foo",
-	sanitize: {
-		blocklist: "foo_blocklist.txt",
-	},
-}`,
-		targets: []testBazelTarget{
-			{"cc_binary", "foo", AttrNameToString{
-				"copts": `select({
-        "//build/bazel/rules/cc:sanitizers_enabled": ["-fsanitize-ignorelist=$(location foo_blocklist.txt)"],
-        "//conditions:default": [],
-    })`,
-				"additional_compiler_inputs": `select({
-        "//build/bazel/rules/cc:sanitizers_enabled": [":foo_blocklist.txt"],
-        "//conditions:default": [],
-    })`,
-				"local_includes": `["."]`,
-			}},
-		},
-	})
-}
-
-func TestCcBinaryWithThinLto(t *testing.T) {
-	runCcBinaryTestCase(t, ccBinaryBp2buildTestCase{
-		description: "cc_binary has correct features when thin LTO is enabled",
-		blueprint: `
-{rule_name} {
-	name: "foo",
-	lto: {
-		thin: true,
-	},
-}`,
-		targets: []testBazelTarget{
-			{"cc_binary", "foo", AttrNameToString{
-				"local_includes": `["."]`,
-				"features":       `["android_thin_lto"]`,
-			}},
-		},
-	})
-}
-
-func TestCcBinaryWithLtoNever(t *testing.T) {
-	runCcBinaryTestCase(t, ccBinaryBp2buildTestCase{
-		description: "cc_binary has correct features when LTO is explicitly disabled",
-		blueprint: `
-{rule_name} {
-	name: "foo",
-	lto: {
-		never: true,
-	},
-}`,
-		targets: []testBazelTarget{
-			{"cc_binary", "foo", AttrNameToString{
-				"local_includes": `["."]`,
-				"features":       `["-android_thin_lto"]`,
-			}},
-		},
-	})
-}
-
-func TestCcBinaryWithThinLtoArchSpecific(t *testing.T) {
-	runCcBinaryTestCase(t, ccBinaryBp2buildTestCase{
-		description: "cc_binary has correct features when LTO differs across arch and os variants",
-		blueprint: `
-{rule_name} {
-	name: "foo",
-	target: {
-		android: {
-			lto: {
-				thin: true,
-			},
-		},
-	},
-	arch: {
-		riscv64: {
-			lto: {
-				thin: false,
-			},
-		},
-	},
-}`,
-		targets: []testBazelTarget{
-			{"cc_binary", "foo", AttrNameToString{
-				"local_includes": `["."]`,
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os_arch:android_arm": ["android_thin_lto"],
-        "//build/bazel_common_rules/platforms/os_arch:android_arm64": ["android_thin_lto"],
-        "//build/bazel_common_rules/platforms/os_arch:android_riscv64": ["-android_thin_lto"],
-        "//build/bazel_common_rules/platforms/os_arch:android_x86": ["android_thin_lto"],
-        "//build/bazel_common_rules/platforms/os_arch:android_x86_64": ["android_thin_lto"],
-        "//conditions:default": [],
-    })`,
-			}},
-		},
-	})
-}
-
-func TestCcBinaryWithThinLtoDisabledDefaultEnabledVariant(t *testing.T) {
-	runCcBinaryTestCase(t, ccBinaryBp2buildTestCase{
-		description: "cc_binary has correct features when LTO disabled by default but enabled on a particular variant",
-		blueprint: `
-{rule_name} {
-	name: "foo",
-	lto: {
-		never: true,
-	},
-	target: {
-		android: {
-			lto: {
-				thin: true,
-				never: false,
-			},
-		},
-	},
-}`,
-		targets: []testBazelTarget{
-			{"cc_binary", "foo", AttrNameToString{
-				"local_includes": `["."]`,
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["android_thin_lto"],
-        "//conditions:default": ["-android_thin_lto"],
-    })`,
-			}},
-		},
-	})
-}
-
-func TestCcBinaryWithThinLtoAndWholeProgramVtables(t *testing.T) {
-	runCcBinaryTestCase(t, ccBinaryBp2buildTestCase{
-		description: "cc_binary has correct features when thin LTO is enabled with whole_program_vtables",
-		blueprint: `
-{rule_name} {
-	name: "foo",
-	lto: {
-		thin: true,
-	},
-	whole_program_vtables: true,
-}`,
-		targets: []testBazelTarget{
-			{"cc_binary", "foo", AttrNameToString{
-				"local_includes": `["."]`,
-				"features": `[
-        "android_thin_lto",
-        "android_thin_lto_whole_program_vtables",
-    ]`,
-			}},
-		},
-	})
-}
-
-func TestCcBinaryHiddenVisibilityConvertedToFeature(t *testing.T) {
-	runCcBinaryTestCase(t, ccBinaryBp2buildTestCase{
-		description: "cc_binary changes hidden visibility to feature",
-		blueprint: `
-{rule_name} {
-	name: "foo",
-	cflags: ["-fvisibility=hidden"],
-}`,
-		targets: []testBazelTarget{
-			{"cc_binary", "foo", AttrNameToString{
-				"local_includes": `["."]`,
-				"features":       `["visibility_hidden"]`,
-			}},
-		},
-	})
-}
-
-func TestCcBinaryHiddenVisibilityConvertedToFeatureOsSpecific(t *testing.T) {
-	runCcBinaryTestCase(t, ccBinaryBp2buildTestCase{
-		description: "cc_binary changes hidden visibility to feature for specific os",
-		blueprint: `
-{rule_name} {
-	name: "foo",
-	target: {
-		android: {
-			cflags: ["-fvisibility=hidden"],
-		},
-	},
-}`,
-		targets: []testBazelTarget{
-			{"cc_binary", "foo", AttrNameToString{
-				"local_includes": `["."]`,
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["visibility_hidden"],
-        "//conditions:default": [],
-    })`,
-			}},
-		},
-	})
-}
-
-func TestCcBinaryWithCfi(t *testing.T) {
-	runCcBinaryTestCase(t, ccBinaryBp2buildTestCase{
-		description: "cc_binary has correct features when cfi is enabled",
-		blueprint: `
-{rule_name} {
-	name: "foo",
-	sanitize: {
-		cfi: true,
-	},
-}`,
-		targets: []testBazelTarget{
-			{"cc_binary", "foo", AttrNameToString{
-				"features":       `["android_cfi"]`,
-				"local_includes": `["."]`,
-			}},
-		},
-	})
-}
-
-func TestCcBinaryWithCfiOsSpecific(t *testing.T) {
-	runCcBinaryTestCase(t, ccBinaryBp2buildTestCase{
-		description: "cc_binary has correct features when cfi is enabled for specific variants",
-		blueprint: `
-{rule_name} {
-	name: "foo",
-	target: {
-		android: {
-			sanitize: {
-				cfi: true,
-			},
-		},
-	},
-}`,
-		targets: []testBazelTarget{
-			{"cc_binary", "foo", AttrNameToString{
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["android_cfi"],
-        "//conditions:default": [],
-    })`,
-				"local_includes": `["."]`,
-			}},
-		},
-	})
-}
-
-func TestCcBinaryWithCfiAndCfiAssemblySupport(t *testing.T) {
-	runCcBinaryTestCase(t, ccBinaryBp2buildTestCase{
-		description: "cc_binary has correct features when cfi is enabled with cfi assembly support",
-		blueprint: `
-{rule_name} {
-	name: "foo",
-	sanitize: {
-		cfi: true,
-		config: {
-			cfi_assembly_support: true,
-		},
-	},
-}`,
-		targets: []testBazelTarget{
-			{"cc_binary", "foo", AttrNameToString{
-				"features": `[
-        "android_cfi",
-        "android_cfi_assembly_support",
-    ]`,
-				"local_includes": `["."]`,
-			}},
-		},
-	})
-}
-
-func TestCcBinaryExplicitlyDisablesCfiWhenFalse(t *testing.T) {
-	runCcBinaryTestCase(t, ccBinaryBp2buildTestCase{
-		description: "cc_binary disables cfi when explciitly set to false in the bp",
-		blueprint: `
-{rule_name} {
-	name: "foo",
-	sanitize: {
-		cfi: false,
-	},
-}
-`,
-		targets: []testBazelTarget{
-			{"cc_binary", "foo", AttrNameToString{
-				"features":       `["-android_cfi"]`,
-				"local_includes": `["."]`,
-			}},
-		},
-	})
-}
-
-func TestCcBinaryStem(t *testing.T) {
-	runCcBinaryTestCase(t, ccBinaryBp2buildTestCase{
-		description: "cc_binary with stem property",
-		blueprint: `
-cc_binary {
-	name: "foo_with_stem_simple",
-	stem: "foo",
-}
-cc_binary {
-	name: "foo_with_arch_variant_stem",
-	arch: {
-		arm: {
-			stem: "foo-arm",
-		},
-		arm64: {
-			stem: "foo-arm64",
-		},
-	},
-}
-`,
-		targets: []testBazelTarget{
-			{"cc_binary", "foo_with_stem_simple", AttrNameToString{
-				"stem":           `"foo"`,
-				"local_includes": `["."]`,
-			}},
-			{"cc_binary", "foo_with_arch_variant_stem", AttrNameToString{
-				"stem": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": "foo-arm",
-        "//build/bazel_common_rules/platforms/arch:arm64": "foo-arm64",
-        "//conditions:default": None,
-    })`,
-				"local_includes": `["."]`,
-			}},
-		},
-	})
-}
-
-func TestCCBinaryRscriptSrc(t *testing.T) {
-	runCcBinaryTests(t, ccBinaryBp2buildTestCase{
-		description: `cc_binary with rscript files in sources`,
-		blueprint: `
-{rule_name} {
-    name : "foo",
-    srcs : [
-        "ccSrc.cc",
-        "rsSrc.rscript",
-    ],
-    include_build_directory: false,
-}
-`,
-		targets: []testBazelTarget{
-			{"rscript_to_cpp", "foo_renderscript", AttrNameToString{
-				"srcs": `["rsSrc.rscript"]`,
-			}},
-			{"cc_binary", "foo", AttrNameToString{
-				"absolute_includes": `[
-        "frameworks/rs",
-        "frameworks/rs/cpp",
-    ]`,
-				"local_includes": `["."]`,
-				"srcs": `[
-        "ccSrc.cc",
-        "foo_renderscript",
-    ]`,
-			}},
-		},
-	})
-}
-
-func TestCcBinaryStatic_SystemSharedLibUsedAsDep(t *testing.T) {
-	runCcBinaryTestCase(t, ccBinaryBp2buildTestCase{
-		stubbedBuildDefinitions: []string{"libm", "libc"},
-		description:             "cc_library_static system_shared_lib empty for linux_bionic variant",
-		blueprint: soongCcLibraryStaticPreamble +
-			simpleModule("cc_library", "libc") + `
-
-cc_library {
-    name: "libm",
-}
-
-cc_binary {
-    name: "used_in_bionic_oses",
-    target: {
-        android: {
-            static_libs: ["libc"],
-        },
-        linux_bionic: {
-            static_libs: ["libc"],
-        },
-    },
-    include_build_directory: false,
-    static_executable: true,
-}
-
-cc_binary {
-    name: "all",
-    static_libs: ["libc"],
-    include_build_directory: false,
-    static_executable: true,
-}
-
-cc_binary {
-    name: "keep_for_empty_system_shared_libs",
-    static_libs: ["libc"],
-    system_shared_libs: [],
-    include_build_directory: false,
-    static_executable: true,
-}
-
-cc_binary {
-    name: "used_with_stubs",
-    static_libs: ["libm"],
-    include_build_directory: false,
-    static_executable: true,
-}
-
-cc_binary {
-    name: "keep_with_stubs",
-    static_libs: ["libm"],
-    system_shared_libs: [],
-    include_build_directory: false,
-    static_executable: true,
-}
-`,
-		targets: []testBazelTarget{
-			{"cc_binary", "all", AttrNameToString{
-				"linkshared": "False",
-			}},
-			{"cc_binary", "keep_for_empty_system_shared_libs", AttrNameToString{
-				"deps":        `[":libc_bp2build_cc_library_static"]`,
-				"system_deps": `[]`,
-				"linkshared":  "False",
-			}},
-			{"cc_binary", "keep_with_stubs", AttrNameToString{
-				"linkshared":  "False",
-				"deps":        `[":libm_bp2build_cc_library_static"]`,
-				"system_deps": `[]`,
-			}},
-			{"cc_binary", "used_in_bionic_oses", AttrNameToString{
-				"linkshared": "False",
-			}},
-			{"cc_binary", "used_with_stubs", AttrNameToString{
-				"linkshared": "False",
-			}},
-		},
-	})
-}
diff --git a/bp2build/cc_library_conversion_test.go b/bp2build/cc_library_conversion_test.go
deleted file mode 100644
index 188c81b..0000000
--- a/bp2build/cc_library_conversion_test.go
+++ /dev/null
@@ -1,5366 +0,0 @@
-// Copyright 2021 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"fmt"
-	"testing"
-
-	"android/soong/aidl_library"
-	"android/soong/android"
-	"android/soong/cc"
-)
-
-const (
-	// See cc/testing.go for more context
-	soongCcLibraryPreamble = `
-cc_defaults {
-    name: "linux_bionic_supported",
-}
-`
-
-	soongCcVersionLibBpPath = "build/soong/cc/libbuildversion/Android.bp"
-	soongCcVersionLibBp     = `
-cc_library_static {
-	name: "libbuildversion",
-}
-`
-
-	soongCcProtoLibraries = `
-cc_library {
-	name: "libprotobuf-cpp-lite",
-}
-
-cc_library {
-	name: "libprotobuf-cpp-full",
-}`
-
-	soongCcProtoPreamble = soongCcLibraryPreamble + soongCcProtoLibraries
-)
-
-func runCcLibraryTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	tc.StubbedBuildDefinitions = append(tc.StubbedBuildDefinitions, "libprotobuf-cpp-lite", "libprotobuf-cpp-full")
-	RunBp2BuildTestCase(t, registerCcLibraryModuleTypes, tc)
-}
-
-func registerCcLibraryModuleTypes(ctx android.RegistrationContext) {
-	cc.RegisterCCBuildComponents(ctx)
-	ctx.RegisterModuleType("filegroup", android.FileGroupFactory)
-	ctx.RegisterModuleType("cc_library_static", cc.LibraryStaticFactory)
-	ctx.RegisterModuleType("cc_prebuilt_library_static", cc.PrebuiltStaticLibraryFactory)
-	ctx.RegisterModuleType("cc_library_headers", cc.LibraryHeaderFactory)
-	ctx.RegisterModuleType("aidl_library", aidl_library.AidlLibraryFactory)
-	ctx.RegisterModuleType("ndk_library", cc.NdkLibraryFactory)
-}
-
-func TestCcLibrarySimple(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library - simple example",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		StubbedBuildDefinitions:    []string{"//build/soong/cc/libbuildversion:libbuildversion", "some-headers"},
-		Filesystem: map[string]string{
-			soongCcVersionLibBpPath: soongCcVersionLibBp,
-			"android.cpp":           "",
-			"bionic.cpp":            "",
-			"darwin.cpp":            "",
-			// Refer to cc.headerExts for the supported header extensions in Soong.
-			"header.h":         "",
-			"header.hh":        "",
-			"header.hpp":       "",
-			"header.hxx":       "",
-			"header.h++":       "",
-			"header.inl":       "",
-			"header.inc":       "",
-			"header.ipp":       "",
-			"header.h.generic": "",
-			"impl.cpp":         "",
-			"linux.cpp":        "",
-			"x86.cpp":          "",
-			"x86_64.cpp":       "",
-			"foo-dir/a.h":      "",
-		},
-		Blueprint: soongCcLibraryPreamble +
-			simpleModule("cc_library_headers", "some-headers") + `
-cc_library {
-    name: "foo-lib",
-    srcs: ["impl.cpp"],
-    cflags: ["-Wall"],
-    header_libs: ["some-headers"],
-    export_include_dirs: ["foo-dir"],
-    ldflags: ["-Wl,--exclude-libs=bar.a"],
-    arch: {
-        x86: {
-            ldflags: ["-Wl,--exclude-libs=baz.a"],
-            srcs: ["x86.cpp"],
-        },
-        x86_64: {
-            ldflags: ["-Wl,--exclude-libs=qux.a"],
-            srcs: ["x86_64.cpp"],
-        },
-    },
-    target: {
-        android: {
-            srcs: ["android.cpp"],
-        },
-        linux_glibc: {
-            srcs: ["linux.cpp"],
-        },
-        darwin: {
-            srcs: ["darwin.cpp"],
-        },
-        bionic: {
-          srcs: ["bionic.cpp"]
-        },
-    },
-    include_build_directory: false,
-    sdk_version: "current",
-    min_sdk_version: "29",
-    use_version_lib: true,
-}
-`,
-		ExpectedBazelTargets: makeCcLibraryTargets("foo-lib", AttrNameToString{
-			"copts":               `["-Wall"]`,
-			"export_includes":     `["foo-dir"]`,
-			"implementation_deps": `[":some-headers"]`,
-			"linkopts": `["-Wl,--exclude-libs=bar.a"] + select({
-        "//build/bazel_common_rules/platforms/arch:x86": ["-Wl,--exclude-libs=baz.a"],
-        "//build/bazel_common_rules/platforms/arch:x86_64": ["-Wl,--exclude-libs=qux.a"],
-        "//conditions:default": [],
-    })`,
-			"srcs": `["impl.cpp"] + select({
-        "//build/bazel_common_rules/platforms/arch:x86": ["x86.cpp"],
-        "//build/bazel_common_rules/platforms/arch:x86_64": ["x86_64.cpp"],
-        "//conditions:default": [],
-    }) + select({
-        "//build/bazel_common_rules/platforms/os:android": [
-            "bionic.cpp",
-            "android.cpp",
-        ],
-        "//build/bazel_common_rules/platforms/os:darwin": ["darwin.cpp"],
-        "//build/bazel_common_rules/platforms/os:linux_bionic": ["bionic.cpp"],
-        "//build/bazel_common_rules/platforms/os:linux_glibc": ["linux.cpp"],
-        "//conditions:default": [],
-    })`,
-			"sdk_version":        `"current"`,
-			"min_sdk_version":    `"29"`,
-			"use_version_lib":    `True`,
-			"whole_archive_deps": `["//build/soong/cc/libbuildversion:libbuildversion"]`,
-			"deps": `select({
-        "//build/bazel/rules/apex:unbundled_app": ["//build/bazel/rules/cc:ndk_sysroot"],
-        "//conditions:default": [],
-    })`,
-		}),
-	})
-}
-
-func TestCcLibraryTrimmedLdAndroid(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library - trimmed example of //bionic/linker:ld-android",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		StubbedBuildDefinitions:    []string{"libc_headers"},
-		Filesystem: map[string]string{
-			"ld-android.cpp":           "",
-			"linked_list.h":            "",
-			"linker.h":                 "",
-			"linker_block_allocator.h": "",
-			"linker_cfi.h":             "",
-		},
-		Blueprint: soongCcLibraryPreamble +
-			simpleModule("cc_library_headers", "libc_headers") + `
-cc_library {
-    name: "fake-ld-android",
-    srcs: ["ld_android.cpp"],
-    cflags: [
-        "-Wall",
-        "-Wextra",
-        "-Wunused",
-        "-Werror",
-    ],
-    header_libs: ["libc_headers"],
-    ldflags: [
-        "-Wl,--exclude-libs=libgcc.a",
-        "-Wl,--exclude-libs=libgcc_stripped.a",
-        "-Wl,--exclude-libs=libclang_rt.builtins-arm-android.a",
-        "-Wl,--exclude-libs=libclang_rt.builtins-aarch64-android.a",
-        "-Wl,--exclude-libs=libclang_rt.builtins-i686-android.a",
-        "-Wl,--exclude-libs=libclang_rt.builtins-x86_64-android.a",
-    ],
-    arch: {
-        x86: {
-            ldflags: ["-Wl,--exclude-libs=libgcc_eh.a"],
-        },
-        x86_64: {
-            ldflags: ["-Wl,--exclude-libs=libgcc_eh.a"],
-        },
-    },
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: makeCcLibraryTargets("fake-ld-android", AttrNameToString{
-			"srcs": `["ld_android.cpp"]`,
-			"copts": `[
-        "-Wall",
-        "-Wextra",
-        "-Wunused",
-        "-Werror",
-    ]`,
-			"implementation_deps": `[":libc_headers"]`,
-			"linkopts": `[
-        "-Wl,--exclude-libs=libgcc.a",
-        "-Wl,--exclude-libs=libgcc_stripped.a",
-        "-Wl,--exclude-libs=libclang_rt.builtins-arm-android.a",
-        "-Wl,--exclude-libs=libclang_rt.builtins-aarch64-android.a",
-        "-Wl,--exclude-libs=libclang_rt.builtins-i686-android.a",
-        "-Wl,--exclude-libs=libclang_rt.builtins-x86_64-android.a",
-    ] + select({
-        "//build/bazel_common_rules/platforms/arch:x86": ["-Wl,--exclude-libs=libgcc_eh.a"],
-        "//build/bazel_common_rules/platforms/arch:x86_64": ["-Wl,--exclude-libs=libgcc_eh.a"],
-        "//conditions:default": [],
-    })`,
-		}),
-	})
-}
-
-func TestCcLibraryExcludeSrcs(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library exclude_srcs - trimmed example of //external/arm-optimized-routines:libarm-optimized-routines-math",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Dir:                        "external",
-		Filesystem: map[string]string{
-			"external/math/cosf.c":      "",
-			"external/math/erf.c":       "",
-			"external/math/erf_data.c":  "",
-			"external/math/erff.c":      "",
-			"external/math/erff_data.c": "",
-			"external/Android.bp": `
-cc_library {
-    name: "fake-libarm-optimized-routines-math",
-    exclude_srcs: [
-        // Provided by:
-        // bionic/libm/upstream-freebsd/lib/msun/src/s_erf.c
-        // bionic/libm/upstream-freebsd/lib/msun/src/s_erff.c
-        "math/erf.c",
-        "math/erf_data.c",
-        "math/erff.c",
-        "math/erff_data.c",
-    ],
-    srcs: [
-        "math/*.c",
-    ],
-    // arch-specific settings
-    arch: {
-        arm64: {
-            cflags: [
-                "-DHAVE_FAST_FMA=1",
-            ],
-        },
-    },
-    bazel_module: { bp2build_available: true },
-}
-`,
-		},
-		Blueprint: soongCcLibraryPreamble,
-		ExpectedBazelTargets: makeCcLibraryTargets("fake-libarm-optimized-routines-math", AttrNameToString{
-			"copts": `select({
-        "//build/bazel_common_rules/platforms/arch:arm64": ["-DHAVE_FAST_FMA=1"],
-        "//conditions:default": [],
-    })`,
-			"local_includes": `["."]`,
-			"srcs_c":         `["math/cosf.c"]`,
-		}),
-	})
-}
-
-func TestCcLibrarySharedStaticProps(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library shared/static props",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Filesystem: map[string]string{
-			"both.cpp":       "",
-			"sharedonly.cpp": "",
-			"staticonly.cpp": "",
-		},
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-    name: "a",
-    srcs: ["both.cpp"],
-    cflags: ["bothflag"],
-    shared_libs: ["shared_dep_for_both"],
-    static_libs: ["static_dep_for_both", "whole_and_static_lib_for_both"],
-    whole_static_libs: ["whole_static_lib_for_both", "whole_and_static_lib_for_both"],
-    static: {
-        srcs: ["staticonly.cpp"],
-        cflags: ["staticflag"],
-        shared_libs: ["shared_dep_for_static"],
-        static_libs: ["static_dep_for_static"],
-        whole_static_libs: ["whole_static_lib_for_static"],
-    },
-    shared: {
-        srcs: ["sharedonly.cpp"],
-        cflags: ["sharedflag"],
-        shared_libs: ["shared_dep_for_shared"],
-        static_libs: ["static_dep_for_shared"],
-        whole_static_libs: ["whole_static_lib_for_shared"],
-    },
-    include_build_directory: false,
-}
-
-cc_library_static {
-    name: "static_dep_for_shared",
-}
-
-cc_library_static {
-    name: "static_dep_for_static",
-}
-
-cc_library_static {
-    name: "static_dep_for_both",
-}
-
-cc_library_static {
-    name: "whole_static_lib_for_shared",
-}
-
-cc_library_static {
-    name: "whole_static_lib_for_static",
-}
-
-cc_library_static {
-    name: "whole_static_lib_for_both",
-}
-
-cc_library_static {
-    name: "whole_and_static_lib_for_both",
-}
-
-cc_library {
-    name: "shared_dep_for_shared",
-}
-
-cc_library {
-    name: "shared_dep_for_static",
-}
-
-cc_library {
-    name: "shared_dep_for_both",
-}
-`,
-		StubbedBuildDefinitions: []string{"static_dep_for_shared", "static_dep_for_static",
-			"static_dep_for_both", "whole_static_lib_for_shared", "whole_static_lib_for_static",
-			"whole_static_lib_for_both", "whole_and_static_lib_for_both", "shared_dep_for_shared",
-			"shared_dep_for_static", "shared_dep_for_both",
-		},
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "a_bp2build_cc_library_static", AttrNameToString{
-				"copts": `[
-        "bothflag",
-        "staticflag",
-    ]`,
-				"implementation_deps": `[
-        ":static_dep_for_both",
-        ":static_dep_for_static",
-    ]`,
-				"implementation_dynamic_deps": `[
-        ":shared_dep_for_both",
-        ":shared_dep_for_static",
-    ]`,
-				"srcs": `[
-        "both.cpp",
-        "staticonly.cpp",
-    ]`,
-				"whole_archive_deps": `[
-        ":whole_static_lib_for_both",
-        ":whole_and_static_lib_for_both",
-        ":whole_static_lib_for_static",
-    ]`}),
-			MakeBazelTarget("cc_library_shared", "a", AttrNameToString{
-				"copts": `[
-        "bothflag",
-        "sharedflag",
-    ]`,
-				"implementation_deps": `[
-        ":static_dep_for_both",
-        ":static_dep_for_shared",
-    ]`,
-				"implementation_dynamic_deps": `[
-        ":shared_dep_for_both",
-        ":shared_dep_for_shared",
-    ]`,
-				"srcs": `[
-        "both.cpp",
-        "sharedonly.cpp",
-    ]`,
-				"whole_archive_deps": `[
-        ":whole_static_lib_for_both",
-        ":whole_and_static_lib_for_both",
-        ":whole_static_lib_for_shared",
-    ]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryDeps(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library shared/static props",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Filesystem: map[string]string{
-			"both.cpp":       "",
-			"sharedonly.cpp": "",
-			"staticonly.cpp": "",
-		},
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-    name: "a",
-    srcs: ["both.cpp"],
-    cflags: ["bothflag"],
-    shared_libs: ["implementation_shared_dep_for_both", "shared_dep_for_both"],
-    export_shared_lib_headers: ["shared_dep_for_both"],
-    static_libs: ["implementation_static_dep_for_both", "static_dep_for_both"],
-    export_static_lib_headers: ["static_dep_for_both", "whole_static_dep_for_both"],
-    whole_static_libs: ["not_explicitly_exported_whole_static_dep_for_both", "whole_static_dep_for_both"],
-    static: {
-        srcs: ["staticonly.cpp"],
-        cflags: ["staticflag"],
-        shared_libs: ["implementation_shared_dep_for_static", "shared_dep_for_static"],
-        export_shared_lib_headers: ["shared_dep_for_static"],
-        static_libs: ["implementation_static_dep_for_static", "static_dep_for_static"],
-        export_static_lib_headers: ["static_dep_for_static", "whole_static_dep_for_static"],
-        whole_static_libs: ["not_explicitly_exported_whole_static_dep_for_static", "whole_static_dep_for_static"],
-    },
-    shared: {
-        srcs: ["sharedonly.cpp"],
-        cflags: ["sharedflag"],
-        shared_libs: ["implementation_shared_dep_for_shared", "shared_dep_for_shared"],
-        export_shared_lib_headers: ["shared_dep_for_shared"],
-        static_libs: ["implementation_static_dep_for_shared", "static_dep_for_shared"],
-        export_static_lib_headers: ["static_dep_for_shared", "whole_static_dep_for_shared"],
-        whole_static_libs: ["not_explicitly_exported_whole_static_dep_for_shared", "whole_static_dep_for_shared"],
-    },
-    include_build_directory: false,
-}
-` + simpleModule("cc_library_static", "static_dep_for_shared") +
-			simpleModule("cc_library_static", "implementation_static_dep_for_shared") +
-			simpleModule("cc_library_static", "static_dep_for_static") +
-			simpleModule("cc_library_static", "implementation_static_dep_for_static") +
-			simpleModule("cc_library_static", "static_dep_for_both") +
-			simpleModule("cc_library_static", "implementation_static_dep_for_both") +
-			simpleModule("cc_library_static", "whole_static_dep_for_shared") +
-			simpleModule("cc_library_static", "not_explicitly_exported_whole_static_dep_for_shared") +
-			simpleModule("cc_library_static", "whole_static_dep_for_static") +
-			simpleModule("cc_library_static", "not_explicitly_exported_whole_static_dep_for_static") +
-			simpleModule("cc_library_static", "whole_static_dep_for_both") +
-			simpleModule("cc_library_static", "not_explicitly_exported_whole_static_dep_for_both") +
-			simpleModule("cc_library", "shared_dep_for_shared") +
-			simpleModule("cc_library", "implementation_shared_dep_for_shared") +
-			simpleModule("cc_library", "shared_dep_for_static") +
-			simpleModule("cc_library", "implementation_shared_dep_for_static") +
-			simpleModule("cc_library", "shared_dep_for_both") +
-			simpleModule("cc_library", "implementation_shared_dep_for_both"),
-		StubbedBuildDefinitions: []string{"static_dep_for_shared", "implementation_static_dep_for_shared",
-			"static_dep_for_static", "implementation_static_dep_for_static", "static_dep_for_both",
-			"implementation_static_dep_for_both", "whole_static_dep_for_shared",
-			"not_explicitly_exported_whole_static_dep_for_shared", "whole_static_dep_for_static",
-			"not_explicitly_exported_whole_static_dep_for_static", "whole_static_dep_for_both",
-			"not_explicitly_exported_whole_static_dep_for_both", "shared_dep_for_shared",
-			"implementation_shared_dep_for_shared", "shared_dep_for_static",
-			"implementation_shared_dep_for_static", "shared_dep_for_both",
-			"implementation_shared_dep_for_both",
-		},
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "a_bp2build_cc_library_static", AttrNameToString{
-				"copts": `[
-        "bothflag",
-        "staticflag",
-    ]`,
-				"deps": `[
-        ":static_dep_for_both",
-        ":static_dep_for_static",
-    ]`,
-				"dynamic_deps": `[
-        ":shared_dep_for_both",
-        ":shared_dep_for_static",
-    ]`,
-				"implementation_deps": `[
-        ":implementation_static_dep_for_both",
-        ":implementation_static_dep_for_static",
-    ]`,
-				"implementation_dynamic_deps": `[
-        ":implementation_shared_dep_for_both",
-        ":implementation_shared_dep_for_static",
-    ]`,
-				"srcs": `[
-        "both.cpp",
-        "staticonly.cpp",
-    ]`,
-				"whole_archive_deps": `[
-        ":not_explicitly_exported_whole_static_dep_for_both",
-        ":whole_static_dep_for_both",
-        ":not_explicitly_exported_whole_static_dep_for_static",
-        ":whole_static_dep_for_static",
-    ]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "a", AttrNameToString{
-				"copts": `[
-        "bothflag",
-        "sharedflag",
-    ]`,
-				"deps": `[
-        ":static_dep_for_both",
-        ":static_dep_for_shared",
-    ]`,
-				"dynamic_deps": `[
-        ":shared_dep_for_both",
-        ":shared_dep_for_shared",
-    ]`,
-				"implementation_deps": `[
-        ":implementation_static_dep_for_both",
-        ":implementation_static_dep_for_shared",
-    ]`,
-				"implementation_dynamic_deps": `[
-        ":implementation_shared_dep_for_both",
-        ":implementation_shared_dep_for_shared",
-    ]`,
-				"srcs": `[
-        "both.cpp",
-        "sharedonly.cpp",
-    ]`,
-				"whole_archive_deps": `[
-        ":not_explicitly_exported_whole_static_dep_for_both",
-        ":whole_static_dep_for_both",
-        ":not_explicitly_exported_whole_static_dep_for_shared",
-        ":whole_static_dep_for_shared",
-    ]`,
-			})},
-	},
-	)
-}
-
-func TestCcLibraryWholeStaticLibsAlwaysLink(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Dir:                        "foo/bar",
-		StubbedBuildDefinitions: []string{"//foo/bar:whole_static_lib_for_shared", "//foo/bar:whole_static_lib_for_static",
-			"//foo/bar:whole_static_lib_for_both"},
-		Filesystem: map[string]string{
-			"foo/bar/Android.bp": `
-cc_library {
-    name: "a",
-    whole_static_libs: ["whole_static_lib_for_both"],
-    static: {
-        whole_static_libs: ["whole_static_lib_for_static"],
-    },
-    shared: {
-        whole_static_libs: ["whole_static_lib_for_shared"],
-    },
-    bazel_module: { bp2build_available: true },
-    include_build_directory: false,
-}
-
-cc_prebuilt_library_static { name: "whole_static_lib_for_shared" }
-
-cc_prebuilt_library_static { name: "whole_static_lib_for_static" }
-
-cc_prebuilt_library_static { name: "whole_static_lib_for_both" }
-`,
-		},
-		Blueprint: soongCcLibraryPreamble,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "a_bp2build_cc_library_static", AttrNameToString{
-				"whole_archive_deps": `[
-        ":whole_static_lib_for_both_alwayslink",
-        ":whole_static_lib_for_static_alwayslink",
-    ]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "a", AttrNameToString{
-				"whole_archive_deps": `[
-        ":whole_static_lib_for_both_alwayslink",
-        ":whole_static_lib_for_shared_alwayslink",
-    ]`,
-			}),
-		},
-	},
-	)
-}
-
-func TestCcLibrarySharedStaticPropsInArch(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library shared/static props in arch",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Dir:                        "foo/bar",
-		Filesystem: map[string]string{
-			"foo/bar/arm.cpp":        "",
-			"foo/bar/x86.cpp":        "",
-			"foo/bar/sharedonly.cpp": "",
-			"foo/bar/staticonly.cpp": "",
-			"foo/bar/Android.bp": `
-cc_library {
-    name: "a",
-    arch: {
-        arm: {
-            shared: {
-                srcs: ["arm_shared.cpp"],
-                cflags: ["-DARM_SHARED"],
-                static_libs: ["arm_static_dep_for_shared"],
-                whole_static_libs: ["arm_whole_static_dep_for_shared"],
-                shared_libs: ["arm_shared_dep_for_shared"],
-            },
-        },
-        x86: {
-            static: {
-                srcs: ["x86_static.cpp"],
-                cflags: ["-DX86_STATIC"],
-                static_libs: ["x86_dep_for_static"],
-            },
-        },
-    },
-    target: {
-        android: {
-            shared: {
-                srcs: ["android_shared.cpp"],
-                cflags: ["-DANDROID_SHARED"],
-                static_libs: ["android_dep_for_shared"],
-            },
-        },
-        android_arm: {
-            shared: {
-                cflags: ["-DANDROID_ARM_SHARED"],
-            },
-        },
-    },
-    srcs: ["both.cpp"],
-    cflags: ["bothflag"],
-    static_libs: ["static_dep_for_both"],
-    static: {
-        srcs: ["staticonly.cpp"],
-        cflags: ["staticflag"],
-        static_libs: ["static_dep_for_static"],
-    },
-    shared: {
-        srcs: ["sharedonly.cpp"],
-        cflags: ["sharedflag"],
-        static_libs: ["static_dep_for_shared"],
-    },
-    bazel_module: { bp2build_available: true },
-}
-
-cc_library_static { name: "static_dep_for_shared" }
-cc_library_static { name: "static_dep_for_static" }
-cc_library_static { name: "static_dep_for_both" }
-
-cc_library_static { name: "arm_static_dep_for_shared" }
-cc_library_static { name: "arm_whole_static_dep_for_shared" }
-cc_library_static { name: "arm_shared_dep_for_shared" }
-
-cc_library_static { name: "x86_dep_for_static" }
-
-cc_library_static { name: "android_dep_for_shared" }
-`,
-		},
-		StubbedBuildDefinitions: []string{"//foo/bar:static_dep_for_shared", "//foo/bar:static_dep_for_static",
-			"//foo/bar:static_dep_for_both", "//foo/bar:arm_static_dep_for_shared", "//foo/bar:arm_whole_static_dep_for_shared",
-			"//foo/bar:arm_shared_dep_for_shared", "//foo/bar:x86_dep_for_static", "//foo/bar:android_dep_for_shared",
-		},
-		Blueprint: soongCcLibraryPreamble,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "a_bp2build_cc_library_static", AttrNameToString{
-				"copts": `[
-        "bothflag",
-        "staticflag",
-    ] + select({
-        "//build/bazel_common_rules/platforms/arch:x86": ["-DX86_STATIC"],
-        "//conditions:default": [],
-    })`,
-				"implementation_deps": `[
-        ":static_dep_for_both",
-        ":static_dep_for_static",
-    ] + select({
-        "//build/bazel_common_rules/platforms/arch:x86": [":x86_dep_for_static"],
-        "//conditions:default": [],
-    })`,
-				"local_includes": `["."]`,
-				"srcs": `[
-        "both.cpp",
-        "staticonly.cpp",
-    ] + select({
-        "//build/bazel_common_rules/platforms/arch:x86": ["x86_static.cpp"],
-        "//conditions:default": [],
-    })`,
-			}),
-			MakeBazelTarget("cc_library_shared", "a", AttrNameToString{
-				"copts": `[
-        "bothflag",
-        "sharedflag",
-    ] + select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["-DARM_SHARED"],
-        "//conditions:default": [],
-    }) + select({
-        "//build/bazel_common_rules/platforms/os:android": ["-DANDROID_SHARED"],
-        "//conditions:default": [],
-    }) + select({
-        "//build/bazel_common_rules/platforms/os_arch:android_arm": ["-DANDROID_ARM_SHARED"],
-        "//conditions:default": [],
-    })`,
-				"implementation_deps": `[
-        ":static_dep_for_both",
-        ":static_dep_for_shared",
-    ] + select({
-        "//build/bazel_common_rules/platforms/arch:arm": [":arm_static_dep_for_shared"],
-        "//conditions:default": [],
-    }) + select({
-        "//build/bazel_common_rules/platforms/os:android": [":android_dep_for_shared"],
-        "//conditions:default": [],
-    })`,
-				"implementation_dynamic_deps": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": [":arm_shared_dep_for_shared"],
-        "//conditions:default": [],
-    })`,
-				"local_includes": `["."]`,
-				"srcs": `[
-        "both.cpp",
-        "sharedonly.cpp",
-    ] + select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["arm_shared.cpp"],
-        "//conditions:default": [],
-    }) + select({
-        "//build/bazel_common_rules/platforms/os:android": ["android_shared.cpp"],
-        "//conditions:default": [],
-    })`,
-				"whole_archive_deps": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": [":arm_whole_static_dep_for_shared"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	},
-	)
-}
-
-func TestCcLibrarySharedStaticPropsWithMixedSources(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library shared/static props with c/cpp/s mixed sources",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Dir:                        "foo/bar",
-		StubbedBuildDefinitions:    []string{"//foo/bar:shared_filegroup", "//foo/bar:static_filegroup", "//foo/bar:both_filegroup"},
-		Filesystem: map[string]string{
-			"foo/bar/both_source.cpp":   "",
-			"foo/bar/both_source.cc":    "",
-			"foo/bar/both_source.c":     "",
-			"foo/bar/both_source.s":     "",
-			"foo/bar/both_source.S":     "",
-			"foo/bar/shared_source.cpp": "",
-			"foo/bar/shared_source.cc":  "",
-			"foo/bar/shared_source.c":   "",
-			"foo/bar/shared_source.s":   "",
-			"foo/bar/shared_source.S":   "",
-			"foo/bar/static_source.cpp": "",
-			"foo/bar/static_source.cc":  "",
-			"foo/bar/static_source.c":   "",
-			"foo/bar/static_source.s":   "",
-			"foo/bar/static_source.S":   "",
-			"foo/bar/Android.bp": `
-cc_library {
-    name: "a",
-    srcs: [
-    "both_source.cpp",
-    "both_source.cc",
-    "both_source.c",
-    "both_source.s",
-    "both_source.S",
-    ":both_filegroup",
-  ],
-    static: {
-        srcs: [
-          "static_source.cpp",
-          "static_source.cc",
-          "static_source.c",
-          "static_source.s",
-          "static_source.S",
-          ":static_filegroup",
-        ],
-    },
-    shared: {
-        srcs: [
-          "shared_source.cpp",
-          "shared_source.cc",
-          "shared_source.c",
-          "shared_source.s",
-          "shared_source.S",
-          ":shared_filegroup",
-        ],
-    },
-    bazel_module: { bp2build_available: true },
-}
-
-filegroup {
-    name: "both_filegroup",
-    srcs: [
-        // Not relevant, handled by filegroup macro
-  ],
-}
-
-filegroup {
-    name: "shared_filegroup",
-    srcs: [
-        // Not relevant, handled by filegroup macro
-  ],
-}
-
-filegroup {
-    name: "static_filegroup",
-    srcs: [
-        // Not relevant, handled by filegroup macro
-  ],
-}
-`,
-		},
-		Blueprint: soongCcLibraryPreamble,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "a_bp2build_cc_library_static", AttrNameToString{
-				"local_includes": `["."]`,
-				"srcs": `[
-        "both_source.cpp",
-        "both_source.cc",
-        ":both_filegroup_cpp_srcs",
-        "static_source.cpp",
-        "static_source.cc",
-        ":static_filegroup_cpp_srcs",
-    ]`,
-				"srcs_as": `[
-        "both_source.s",
-        "both_source.S",
-        ":both_filegroup_as_srcs",
-        "static_source.s",
-        "static_source.S",
-        ":static_filegroup_as_srcs",
-    ]`,
-				"srcs_c": `[
-        "both_source.c",
-        ":both_filegroup_c_srcs",
-        "static_source.c",
-        ":static_filegroup_c_srcs",
-    ]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "a", AttrNameToString{
-				"local_includes": `["."]`,
-				"srcs": `[
-        "both_source.cpp",
-        "both_source.cc",
-        ":both_filegroup_cpp_srcs",
-        "shared_source.cpp",
-        "shared_source.cc",
-        ":shared_filegroup_cpp_srcs",
-    ]`,
-				"srcs_as": `[
-        "both_source.s",
-        "both_source.S",
-        ":both_filegroup_as_srcs",
-        "shared_source.s",
-        "shared_source.S",
-        ":shared_filegroup_as_srcs",
-    ]`,
-				"srcs_c": `[
-        "both_source.c",
-        ":both_filegroup_c_srcs",
-        "shared_source.c",
-        ":shared_filegroup_c_srcs",
-    ]`,
-			})}})
-}
-
-func TestCcLibraryNonConfiguredVersionScriptAndDynamicList(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library non-configured version script and dynamic list",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Dir:                        "foo/bar",
-		Filesystem: map[string]string{
-			"foo/bar/Android.bp": `
-cc_library {
-    name: "a",
-    srcs: ["a.cpp"],
-    version_script: "v.map",
-    dynamic_list: "dynamic.list",
-    bazel_module: { bp2build_available: true },
-    include_build_directory: false,
-}
-`,
-		},
-		Blueprint: soongCcLibraryPreamble,
-		ExpectedBazelTargets: makeCcLibraryTargets("a", AttrNameToString{
-			"additional_linker_inputs": `[
-        "v.map",
-        "dynamic.list",
-    ]`,
-			"linkopts": `[
-        "-Wl,--version-script,$(location v.map)",
-        "-Wl,--dynamic-list,$(location dynamic.list)",
-    ]`,
-			"srcs":     `["a.cpp"]`,
-			"features": `["android_cfi_exports_map"]`,
-		}),
-	},
-	)
-}
-
-func TestCcLibraryConfiguredVersionScriptAndDynamicList(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library configured version script and dynamic list",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Dir:                        "foo/bar",
-		Filesystem: map[string]string{
-			"foo/bar/Android.bp": `
-cc_library {
-   name: "a",
-   srcs: ["a.cpp"],
-   arch: {
-     arm: {
-       version_script: "arm.map",
-       dynamic_list: "dynamic_arm.list",
-     },
-     arm64: {
-       version_script: "arm64.map",
-       dynamic_list: "dynamic_arm64.list",
-     },
-   },
-
-   bazel_module: { bp2build_available: true },
-    include_build_directory: false,
-}
-    `,
-		},
-		Blueprint: soongCcLibraryPreamble,
-		ExpectedBazelTargets: makeCcLibraryTargets("a", AttrNameToString{
-			"additional_linker_inputs": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": [
-            "arm.map",
-            "dynamic_arm.list",
-        ],
-        "//build/bazel_common_rules/platforms/arch:arm64": [
-            "arm64.map",
-            "dynamic_arm64.list",
-        ],
-        "//conditions:default": [],
-    })`,
-			"linkopts": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": [
-            "-Wl,--version-script,$(location arm.map)",
-            "-Wl,--dynamic-list,$(location dynamic_arm.list)",
-        ],
-        "//build/bazel_common_rules/platforms/arch:arm64": [
-            "-Wl,--version-script,$(location arm64.map)",
-            "-Wl,--dynamic-list,$(location dynamic_arm64.list)",
-        ],
-        "//conditions:default": [],
-    })`,
-			"srcs": `["a.cpp"]`,
-			"features": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["android_cfi_exports_map"],
-        "//build/bazel_common_rules/platforms/arch:arm64": ["android_cfi_exports_map"],
-        "//conditions:default": [],
-    })`,
-		}),
-	},
-	)
-}
-
-func TestCcLibraryLdflagsSplitBySpaceExceptSoongAdded(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "ldflags are split by spaces except for the ones added by soong (version script and dynamic list)",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Filesystem: map[string]string{
-			"version_script": "",
-			"dynamic.list":   "",
-		},
-		Blueprint: `
-cc_library {
-    name: "foo",
-    ldflags: [
-        "--nospace_flag",
-        "-z spaceflag",
-    ],
-    version_script: "version_script",
-    dynamic_list: "dynamic.list",
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"features": `["android_cfi_exports_map"]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"additional_linker_inputs": `[
-        "version_script",
-        "dynamic.list",
-    ]`,
-				"features": `["android_cfi_exports_map"]`,
-				"linkopts": `[
-        "--nospace_flag",
-        "-z",
-        "spaceflag",
-        "-Wl,--version-script,$(location version_script)",
-        "-Wl,--dynamic-list,$(location dynamic.list)",
-    ]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedLibs(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library shared_libs",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		StubbedBuildDefinitions:    []string{"mylib"},
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-    name: "mylib",
-}
-
-cc_library {
-    name: "a",
-    shared_libs: ["mylib",],
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: makeCcLibraryTargets("a", AttrNameToString{
-			"implementation_dynamic_deps": `[":mylib"]`,
-		}),
-	},
-	)
-}
-
-func TestCcLibraryFeatures(t *testing.T) {
-	expected_targets := []string{}
-	expected_targets = append(expected_targets, makeCcLibraryTargets("a", AttrNameToString{
-		"features": `[
-        "disable_pack_relocations",
-        "-no_undefined_symbols",
-    ]`,
-		"native_coverage": `False`,
-		"srcs":            `["a.cpp"]`,
-	})...)
-	expected_targets = append(expected_targets, makeCcLibraryTargets("b", AttrNameToString{
-		"features": `select({
-        "//build/bazel_common_rules/platforms/arch:x86_64": [
-            "disable_pack_relocations",
-            "-no_undefined_symbols",
-        ],
-        "//conditions:default": [],
-    })`,
-		"native_coverage": `False`,
-		"srcs":            `["b.cpp"]`,
-	})...)
-	expected_targets = append(expected_targets, makeCcLibraryTargets("c", AttrNameToString{
-		"features": `select({
-        "//build/bazel_common_rules/platforms/os:darwin": [
-            "disable_pack_relocations",
-            "-no_undefined_symbols",
-        ],
-        "//conditions:default": [],
-    })`,
-		"srcs": `["c.cpp"]`,
-	})...)
-
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library pack_relocations test",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-    name: "a",
-    srcs: ["a.cpp"],
-    pack_relocations: false,
-    allow_undefined_symbols: true,
-    include_build_directory: false,
-    native_coverage: false,
-}
-
-cc_library {
-    name: "b",
-    srcs: ["b.cpp"],
-    arch: {
-        x86_64: {
-            pack_relocations: false,
-            allow_undefined_symbols: true,
-        },
-    },
-    include_build_directory: false,
-    native_coverage: false,
-}
-
-cc_library {
-    name: "c",
-    srcs: ["c.cpp"],
-    target: {
-        darwin: {
-            pack_relocations: false,
-            allow_undefined_symbols: true,
-        },
-    },
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: expected_targets,
-	})
-}
-
-func TestCcLibrarySpacesInCopts(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library spaces in copts",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-    name: "a",
-    cflags: ["-include header.h",],
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: makeCcLibraryTargets("a", AttrNameToString{
-			"copts": `[
-        "-include",
-        "header.h",
-    ]`,
-		}),
-	},
-	)
-}
-
-func TestCcLibraryCppFlagsGoesIntoCopts(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library cppflags usage",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: soongCcLibraryPreamble + `cc_library {
-    name: "a",
-    srcs: ["a.cpp"],
-    cflags: ["-Wall"],
-    cppflags: [
-        "-fsigned-char",
-        "-pedantic",
-    ],
-    arch: {
-        arm64: {
-            cppflags: ["-DARM64=1"],
-        },
-    },
-    target: {
-        android: {
-            cppflags: ["-DANDROID=1"],
-        },
-    },
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: makeCcLibraryTargets("a", AttrNameToString{
-			"copts": `["-Wall"]`,
-			"cppflags": `[
-        "-fsigned-char",
-        "-pedantic",
-    ] + select({
-        "//build/bazel_common_rules/platforms/arch:arm64": ["-DARM64=1"],
-        "//conditions:default": [],
-    }) + select({
-        "//build/bazel_common_rules/platforms/os:android": ["-DANDROID=1"],
-        "//conditions:default": [],
-    })`,
-			"srcs": `["a.cpp"]`,
-		}),
-	},
-	)
-}
-
-func TestCcLibraryExcludeLibs(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Filesystem:                 map[string]string{},
-		StubbedBuildDefinitions: []string{"arm_whole_static_lib_excludes", "malloc_not_svelte_whole_static_lib",
-			"arm_static_lib_excludes", "malloc_not_svelte_whole_static_lib_excludes", "arm_shared_lib_excludes",
-			"malloc_not_svelte_static_lib_excludes", "arm_shared_lib_excludes", "malloc_not_svelte_shared_lib",
-		},
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library {
-    name: "foo_static",
-    srcs: ["common.c"],
-    whole_static_libs: [
-        "arm_whole_static_lib_excludes",
-        "malloc_not_svelte_whole_static_lib_excludes"
-    ],
-    static_libs: [
-        "arm_static_lib_excludes",
-        "malloc_not_svelte_static_lib_excludes"
-    ],
-    shared_libs: [
-        "arm_shared_lib_excludes",
-    ],
-    arch: {
-        arm: {
-            exclude_shared_libs: [
-                 "arm_shared_lib_excludes",
-            ],
-            exclude_static_libs: [
-                "arm_static_lib_excludes",
-                "arm_whole_static_lib_excludes",
-            ],
-        },
-    },
-    product_variables: {
-        malloc_not_svelte: {
-            shared_libs: ["malloc_not_svelte_shared_lib"],
-            whole_static_libs: ["malloc_not_svelte_whole_static_lib"],
-            exclude_static_libs: [
-                "malloc_not_svelte_static_lib_excludes",
-                "malloc_not_svelte_whole_static_lib_excludes",
-            ],
-        },
-    },
-    include_build_directory: false,
-}
-
-cc_library {
-    name: "arm_whole_static_lib_excludes",
-}
-
-cc_library {
-    name: "malloc_not_svelte_whole_static_lib",
-}
-
-cc_library {
-    name: "malloc_not_svelte_whole_static_lib_excludes",
-}
-
-cc_library {
-    name: "arm_static_lib_excludes",
-}
-
-cc_library {
-    name: "malloc_not_svelte_static_lib_excludes",
-}
-
-cc_library {
-    name: "arm_shared_lib_excludes",
-}
-
-cc_library {
-    name: "malloc_not_svelte_shared_lib",
-}
-`,
-		ExpectedBazelTargets: makeCcLibraryTargets("foo_static", AttrNameToString{
-			"implementation_deps": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": [],
-        "//conditions:default": [":arm_static_lib_excludes_bp2build_cc_library_static"],
-    }) + select({
-        "//build/bazel/product_config/config_settings:malloc_not_svelte": [],
-        "//conditions:default": [":malloc_not_svelte_static_lib_excludes_bp2build_cc_library_static"],
-    })`,
-			"implementation_dynamic_deps": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": [],
-        "//conditions:default": [":arm_shared_lib_excludes"],
-    }) + select({
-        "//build/bazel/product_config/config_settings:malloc_not_svelte": [":malloc_not_svelte_shared_lib"],
-        "//conditions:default": [],
-    })`,
-			"srcs_c": `["common.c"]`,
-			"whole_archive_deps": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": [],
-        "//conditions:default": [":arm_whole_static_lib_excludes_bp2build_cc_library_static"],
-    }) + select({
-        "//build/bazel/product_config/config_settings:malloc_not_svelte": [":malloc_not_svelte_whole_static_lib_bp2build_cc_library_static"],
-        "//conditions:default": [":malloc_not_svelte_whole_static_lib_excludes_bp2build_cc_library_static"],
-    })`,
-		}),
-	},
-	)
-}
-
-func TestCcLibraryProductVariablesHeaderLibs(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Filesystem:                 map[string]string{},
-		StubbedBuildDefinitions:    []string{"malloc_not_svelte_header_lib"},
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library {
-    name: "foo_static",
-    srcs: ["common.c"],
-    product_variables: {
-        malloc_not_svelte: {
-            header_libs: ["malloc_not_svelte_header_lib"],
-        },
-    },
-    include_build_directory: false,
-}
-
-cc_library {
-    name: "malloc_not_svelte_header_lib",
-}
-`,
-		ExpectedBazelTargets: makeCcLibraryTargets("foo_static", AttrNameToString{
-			"implementation_deps": `select({
-        "//build/bazel/product_config/config_settings:malloc_not_svelte": [":malloc_not_svelte_header_lib"],
-        "//conditions:default": [],
-    })`,
-			"srcs_c":                 `["common.c"]`,
-			"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
-		}),
-	},
-	)
-}
-
-func TestCCLibraryNoCrtTrue(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library - nocrt: true disables feature",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Filesystem: map[string]string{
-			"impl.cpp": "",
-		},
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-    name: "foo-lib",
-    srcs: ["impl.cpp"],
-    nocrt: true,
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: makeCcLibraryTargets("foo-lib", AttrNameToString{
-			"features": `["-link_crt"]`,
-			"srcs":     `["impl.cpp"]`,
-		}),
-	},
-	)
-}
-
-func TestCCLibraryNoCrtFalse(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library - nocrt: false - does not emit attribute",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Filesystem: map[string]string{
-			"impl.cpp": "",
-		},
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-    name: "foo-lib",
-    srcs: ["impl.cpp"],
-    nocrt: false,
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: makeCcLibraryTargets("foo-lib", AttrNameToString{
-			"srcs": `["impl.cpp"]`,
-		}),
-	})
-}
-
-func TestCCLibraryNoCrtArchVariant(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library - nocrt in select",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Filesystem: map[string]string{
-			"impl.cpp": "",
-		},
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-    name: "foo-lib",
-    srcs: ["impl.cpp"],
-    arch: {
-        arm: {
-            nocrt: true,
-        },
-        x86: {
-            nocrt: false,
-        },
-    },
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: makeCcLibraryTargets("foo-lib", AttrNameToString{
-			"features": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["-link_crt"],
-        "//conditions:default": [],
-    })`,
-			"srcs": `["impl.cpp"]`,
-		}),
-	})
-}
-
-func TestCCLibraryNoLibCrtTrue(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Filesystem: map[string]string{
-			"impl.cpp": "",
-		},
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-    name: "foo-lib",
-    srcs: ["impl.cpp"],
-    no_libcrt: true,
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: makeCcLibraryTargets("foo-lib", AttrNameToString{
-			"features": `["-use_libcrt"]`,
-			"srcs":     `["impl.cpp"]`,
-		}),
-	})
-}
-
-func makeCcLibraryTargets(name string, attrs AttrNameToString) []string {
-	STATIC_ONLY_ATTRS := map[string]bool{}
-	SHARED_ONLY_ATTRS := map[string]bool{
-		"link_crt":                 true,
-		"additional_linker_inputs": true,
-		"linkopts":                 true,
-		"strip":                    true,
-		"inject_bssl_hash":         true,
-		"stubs_symbol_file":        true,
-		"use_version_lib":          true,
-	}
-
-	sharedAttrs := AttrNameToString{}
-	staticAttrs := AttrNameToString{}
-	for key, val := range attrs {
-		if _, staticOnly := STATIC_ONLY_ATTRS[key]; !staticOnly {
-			sharedAttrs[key] = val
-		}
-		if _, sharedOnly := SHARED_ONLY_ATTRS[key]; !sharedOnly {
-			staticAttrs[key] = val
-		}
-	}
-	sharedTarget := MakeBazelTarget("cc_library_shared", name, sharedAttrs)
-	staticTarget := MakeBazelTarget("cc_library_static", name+"_bp2build_cc_library_static", staticAttrs)
-
-	return []string{staticTarget, sharedTarget}
-}
-
-func TestCCLibraryNoLibCrtFalse(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Filesystem: map[string]string{
-			"impl.cpp": "",
-		},
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-    name: "foo-lib",
-    srcs: ["impl.cpp"],
-    no_libcrt: false,
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: makeCcLibraryTargets("foo-lib", AttrNameToString{
-			"srcs": `["impl.cpp"]`,
-		}),
-	})
-}
-
-func TestCCLibraryNoLibCrtArchVariant(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Filesystem: map[string]string{
-			"impl.cpp": "",
-		},
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-    name: "foo-lib",
-    srcs: ["impl.cpp"],
-    arch: {
-        arm: {
-            no_libcrt: true,
-        },
-        x86: {
-            no_libcrt: true,
-        },
-    },
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: makeCcLibraryTargets("foo-lib", AttrNameToString{
-			"srcs": `["impl.cpp"]`,
-			"features": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["-use_libcrt"],
-        "//build/bazel_common_rules/platforms/arch:x86": ["-use_libcrt"],
-        "//conditions:default": [],
-    })`,
-		}),
-	})
-}
-
-func TestCCLibraryNoLibCrtArchAndTargetVariant(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Filesystem: map[string]string{
-			"impl.cpp": "",
-		},
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-    name: "foo-lib",
-    srcs: ["impl.cpp"],
-    arch: {
-        arm: {
-            no_libcrt: true,
-        },
-        x86: {
-            no_libcrt: true,
-        },
-    },
-    target: {
-        darwin: {
-            no_libcrt: true,
-        }
-    },
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: makeCcLibraryTargets("foo-lib", AttrNameToString{
-			"features": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["-use_libcrt"],
-        "//build/bazel_common_rules/platforms/arch:x86": ["-use_libcrt"],
-        "//conditions:default": [],
-    }) + select({
-        "//build/bazel_common_rules/platforms/os:darwin": ["-use_libcrt"],
-        "//conditions:default": [],
-    })`,
-			"srcs": `["impl.cpp"]`,
-		}),
-	})
-}
-
-func TestCCLibraryNoLibCrtArchAndTargetVariantConflict(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Filesystem: map[string]string{
-			"impl.cpp": "",
-		},
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-    name: "foo-lib",
-    srcs: ["impl.cpp"],
-    arch: {
-        arm: {
-            no_libcrt: true,
-        },
-        // This is expected to override the value for darwin_x86_64.
-        x86_64: {
-            no_libcrt: true,
-        },
-    },
-    target: {
-        darwin: {
-            no_libcrt: false,
-        }
-    },
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: makeCcLibraryTargets("foo-lib", AttrNameToString{
-			"srcs": `["impl.cpp"]`,
-			"features": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["-use_libcrt"],
-        "//build/bazel_common_rules/platforms/arch:x86_64": ["-use_libcrt"],
-        "//conditions:default": [],
-    })`,
-		}),
-	})
-}
-
-func TestCcLibraryStrip(t *testing.T) {
-	expectedTargets := []string{}
-	expectedTargets = append(expectedTargets, makeCcLibraryTargets("all", AttrNameToString{
-		"strip": `{
-        "all": True,
-    }`,
-	})...)
-	expectedTargets = append(expectedTargets, makeCcLibraryTargets("keep_symbols", AttrNameToString{
-		"strip": `{
-        "keep_symbols": True,
-    }`,
-	})...)
-	expectedTargets = append(expectedTargets, makeCcLibraryTargets("keep_symbols_and_debug_frame", AttrNameToString{
-		"strip": `{
-        "keep_symbols_and_debug_frame": True,
-    }`,
-	})...)
-	expectedTargets = append(expectedTargets, makeCcLibraryTargets("keep_symbols_list", AttrNameToString{
-		"strip": `{
-        "keep_symbols_list": ["symbol"],
-    }`,
-	})...)
-	expectedTargets = append(expectedTargets, makeCcLibraryTargets("none", AttrNameToString{
-		"strip": `{
-        "none": True,
-    }`,
-	})...)
-	expectedTargets = append(expectedTargets, makeCcLibraryTargets("nothing", AttrNameToString{})...)
-
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library strip args",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-    name: "nothing",
-    include_build_directory: false,
-}
-cc_library {
-    name: "keep_symbols",
-    strip: {
-        keep_symbols: true,
-    },
-    include_build_directory: false,
-}
-cc_library {
-    name: "keep_symbols_and_debug_frame",
-    strip: {
-        keep_symbols_and_debug_frame: true,
-    },
-    include_build_directory: false,
-}
-cc_library {
-    name: "none",
-    strip: {
-        none: true,
-    },
-    include_build_directory: false,
-}
-cc_library {
-    name: "keep_symbols_list",
-    strip: {
-        keep_symbols_list: ["symbol"],
-    },
-    include_build_directory: false,
-}
-cc_library {
-    name: "all",
-    strip: {
-        all: true,
-    },
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: expectedTargets,
-	})
-}
-
-func TestCcLibraryStripWithArch(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library strip args",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-    name: "multi-arch",
-    target: {
-        darwin: {
-            strip: {
-                keep_symbols_list: ["foo", "bar"]
-            }
-        },
-    },
-    arch: {
-        arm: {
-            strip: {
-                keep_symbols_and_debug_frame: true,
-            },
-        },
-        arm64: {
-            strip: {
-                keep_symbols: true,
-            },
-        },
-    },
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: makeCcLibraryTargets("multi-arch", AttrNameToString{
-			"strip": `{
-        "keep_symbols": select({
-            "//build/bazel_common_rules/platforms/arch:arm64": True,
-            "//conditions:default": None,
-        }),
-        "keep_symbols_and_debug_frame": select({
-            "//build/bazel_common_rules/platforms/arch:arm": True,
-            "//conditions:default": None,
-        }),
-        "keep_symbols_list": select({
-            "//build/bazel_common_rules/platforms/os:darwin": [
-                "foo",
-                "bar",
-            ],
-            "//conditions:default": [],
-        }),
-    }`,
-		}),
-	},
-	)
-}
-
-func TestCcLibrary_SystemSharedLibsRootEmpty(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library system_shared_libs empty at root",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-    name: "root_empty",
-    system_shared_libs: [],
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: makeCcLibraryTargets("root_empty", AttrNameToString{
-			"system_dynamic_deps": `[]`,
-		}),
-	},
-	)
-}
-
-func TestCcLibrary_SystemSharedLibsStaticEmpty(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library system_shared_libs empty for static variant",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-    name: "static_empty",
-    static: {
-        system_shared_libs: [],
-    },
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "static_empty_bp2build_cc_library_static", AttrNameToString{
-				"system_dynamic_deps": "[]",
-			}),
-			MakeBazelTarget("cc_library_shared", "static_empty", AttrNameToString{}),
-		},
-	})
-}
-
-func TestCcLibrary_SystemSharedLibsSharedEmpty(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library system_shared_libs empty for shared variant",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-    name: "shared_empty",
-    shared: {
-        system_shared_libs: [],
-    },
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "shared_empty_bp2build_cc_library_static", AttrNameToString{}),
-			MakeBazelTarget("cc_library_shared", "shared_empty", AttrNameToString{
-				"system_dynamic_deps": "[]",
-			}),
-		},
-	})
-}
-
-func TestCcLibrary_SystemSharedLibsSharedBionicEmpty(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library system_shared_libs empty for shared, bionic variant",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-    name: "shared_empty",
-    target: {
-        bionic: {
-            shared: {
-                system_shared_libs: [],
-            }
-        }
-    },
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "shared_empty_bp2build_cc_library_static", AttrNameToString{}),
-			MakeBazelTarget("cc_library_shared", "shared_empty", AttrNameToString{
-				"system_dynamic_deps": "[]",
-			}),
-		},
-	})
-}
-
-func TestCcLibrary_SystemSharedLibsLinuxBionicEmpty(t *testing.T) {
-	// Note that this behavior is technically incorrect (it's a simplification).
-	// The correct behavior would be if bp2build wrote `system_dynamic_deps = []`
-	// only for linux_bionic, but `android` had `["libc", "libdl", "libm"].
-	// b/195791252 tracks the fix.
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library system_shared_libs empty for linux_bionic variant",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		StubbedBuildDefinitions:    []string{"libc_musl"},
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-	name: "libc_musl",
-}
-
-cc_library {
-    name: "target_linux_bionic_empty",
-    target: {
-        linux_bionic: {
-            system_shared_libs: [],
-        },
-    },
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: makeCcLibraryTargets("target_linux_bionic_empty", AttrNameToString{
-			"system_dynamic_deps": `select({
-        "//build/bazel_common_rules/platforms/os:linux_musl": [":libc_musl"],
-        "//conditions:default": [],
-    })`,
-		}),
-	},
-	)
-}
-
-func TestCcLibrary_SystemSharedLibsBionicEmpty(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library system_shared_libs empty for bionic variant",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		StubbedBuildDefinitions:    []string{"libc_musl"},
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-	name: "libc_musl",
-}
-
-cc_library {
-    name: "target_bionic_empty",
-    target: {
-        bionic: {
-            system_shared_libs: [],
-        },
-    },
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: makeCcLibraryTargets("target_bionic_empty", AttrNameToString{
-			"system_dynamic_deps": `select({
-        "//build/bazel_common_rules/platforms/os:linux_musl": [":libc_musl"],
-        "//conditions:default": [],
-    })`,
-		}),
-	},
-	)
-}
-
-func TestCcLibrary_SystemSharedLibsMuslEmpty(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library system_shared_lib empty for musl variant",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		StubbedBuildDefinitions:    []string{"libc_musl"},
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-		name: "libc_musl",
-}
-
-cc_library {
-    name: "target_musl_empty",
-    target: {
-        musl: {
-            system_shared_libs: [],
-        },
-    },
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: makeCcLibraryTargets("target_musl_empty", AttrNameToString{
-			"system_dynamic_deps": `[]`,
-		}),
-	})
-}
-
-func TestCcLibrary_SystemSharedLibsLinuxMuslEmpty(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library system_shared_lib empty for linux_musl variant",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		StubbedBuildDefinitions:    []string{"libc_musl"},
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-		name: "libc_musl",
-}
-
-cc_library {
-    name: "target_linux_musl_empty",
-    target: {
-        linux_musl: {
-            system_shared_libs: [],
-        },
-    },
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: makeCcLibraryTargets("target_linux_musl_empty", AttrNameToString{
-			"system_dynamic_deps": `[]`,
-		}),
-	})
-}
-func TestCcLibrary_SystemSharedLibsSharedAndRoot(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library system_shared_libs set for shared and root",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		StubbedBuildDefinitions:    []string{"libc", "libm"},
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-    name: "libc",
-}
-cc_library {
-    name: "libm",
-}
-
-cc_library {
-    name: "foo",
-    system_shared_libs: ["libc"],
-    shared: {
-        system_shared_libs: ["libm"],
-    },
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"system_dynamic_deps": `[":libc"]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"system_dynamic_deps": `[
-        ":libc",
-        ":libm",
-    ]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryOsSelects(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library - selects for all os targets",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Filesystem:                 map[string]string{},
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-    name: "foo-lib",
-    srcs: ["base.cpp"],
-    target: {
-        android: {
-            srcs: ["android.cpp"],
-        },
-        linux: {
-            srcs: ["linux.cpp"],
-        },
-        linux_glibc: {
-            srcs: ["linux_glibc.cpp"],
-        },
-        darwin: {
-            srcs: ["darwin.cpp"],
-        },
-        bionic: {
-            srcs: ["bionic.cpp"],
-        },
-        linux_musl: {
-            srcs: ["linux_musl.cpp"],
-        },
-        windows: {
-            srcs: ["windows.cpp"],
-        },
-    },
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: makeCcLibraryTargets("foo-lib", AttrNameToString{
-			"srcs": `["base.cpp"] + select({
-        "//build/bazel_common_rules/platforms/os:android": [
-            "linux.cpp",
-            "bionic.cpp",
-            "android.cpp",
-        ],
-        "//build/bazel_common_rules/platforms/os:darwin": ["darwin.cpp"],
-        "//build/bazel_common_rules/platforms/os:linux_bionic": [
-            "linux.cpp",
-            "bionic.cpp",
-        ],
-        "//build/bazel_common_rules/platforms/os:linux_glibc": [
-            "linux.cpp",
-            "linux_glibc.cpp",
-        ],
-        "//build/bazel_common_rules/platforms/os:linux_musl": [
-            "linux.cpp",
-            "linux_musl.cpp",
-        ],
-        "//build/bazel_common_rules/platforms/os:windows": ["windows.cpp"],
-        "//conditions:default": [],
-    })`,
-		}),
-	},
-	)
-}
-
-func TestLibcryptoHashInjection(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library - libcrypto hash injection",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Filesystem:                 map[string]string{},
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-    name: "libcrypto",
-    target: {
-        android: {
-            inject_bssl_hash: true,
-        },
-    },
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: makeCcLibraryTargets("libcrypto", AttrNameToString{
-			"inject_bssl_hash": `select({
-        "//build/bazel_common_rules/platforms/os:android": True,
-        "//conditions:default": None,
-    })`,
-		}),
-	},
-	)
-}
-
-func TestCcLibraryCppStdWithGnuExtensions_ConvertsToFeatureAttr(t *testing.T) {
-	type testCase struct {
-		cpp_std        string
-		c_std          string
-		gnu_extensions string
-		bazel_cpp_std  string
-		bazel_c_std    string
-	}
-
-	testCases := []testCase{
-		// Existing usages of cpp_std in AOSP are:
-		// experimental, c++11, c++17, c++2a, c++98, gnu++11, gnu++17
-		//
-		// not set, only emit if gnu_extensions is disabled. the default (gnu+17
-		// is set in the toolchain.)
-		{cpp_std: "", gnu_extensions: "", bazel_cpp_std: ""},
-		{cpp_std: "", gnu_extensions: "false", bazel_cpp_std: "cpp_std_default_no_gnu", bazel_c_std: "c_std_default_no_gnu"},
-		{cpp_std: "", gnu_extensions: "true", bazel_cpp_std: ""},
-		// experimental defaults to gnu++2a
-		{cpp_std: "experimental", gnu_extensions: "", bazel_cpp_std: "cpp_std_experimental"},
-		{cpp_std: "experimental", gnu_extensions: "false", bazel_cpp_std: "cpp_std_experimental_no_gnu", bazel_c_std: "c_std_default_no_gnu"},
-		{cpp_std: "experimental", gnu_extensions: "true", bazel_cpp_std: "cpp_std_experimental"},
-		// Explicitly setting a c++ std does not use replace gnu++ std even if
-		// gnu_extensions is true.
-		// "c++11",
-		{cpp_std: "c++11", gnu_extensions: "", bazel_cpp_std: "c++11"},
-		{cpp_std: "c++11", gnu_extensions: "false", bazel_cpp_std: "c++11", bazel_c_std: "c_std_default_no_gnu"},
-		{cpp_std: "c++11", gnu_extensions: "true", bazel_cpp_std: "c++11"},
-		// "c++17",
-		{cpp_std: "c++17", gnu_extensions: "", bazel_cpp_std: "c++17"},
-		{cpp_std: "c++17", gnu_extensions: "false", bazel_cpp_std: "c++17", bazel_c_std: "c_std_default_no_gnu"},
-		{cpp_std: "c++17", gnu_extensions: "true", bazel_cpp_std: "c++17"},
-		// "c++2a",
-		{cpp_std: "c++2a", gnu_extensions: "", bazel_cpp_std: "c++2a"},
-		{cpp_std: "c++2a", gnu_extensions: "false", bazel_cpp_std: "c++2a", bazel_c_std: "c_std_default_no_gnu"},
-		{cpp_std: "c++2a", gnu_extensions: "true", bazel_cpp_std: "c++2a"},
-		// "c++98",
-		{cpp_std: "c++98", gnu_extensions: "", bazel_cpp_std: "c++98"},
-		{cpp_std: "c++98", gnu_extensions: "false", bazel_cpp_std: "c++98", bazel_c_std: "c_std_default_no_gnu"},
-		{cpp_std: "c++98", gnu_extensions: "true", bazel_cpp_std: "c++98"},
-		// gnu++ is replaced with c++ if gnu_extensions is explicitly false.
-		// "gnu++11",
-		{cpp_std: "gnu++11", gnu_extensions: "", bazel_cpp_std: "gnu++11"},
-		{cpp_std: "gnu++11", gnu_extensions: "false", bazel_cpp_std: "c++11", bazel_c_std: "c_std_default_no_gnu"},
-		{cpp_std: "gnu++11", gnu_extensions: "true", bazel_cpp_std: "gnu++11"},
-		// "gnu++17",
-		{cpp_std: "gnu++17", gnu_extensions: "", bazel_cpp_std: "gnu++17"},
-		{cpp_std: "gnu++17", gnu_extensions: "false", bazel_cpp_std: "c++17", bazel_c_std: "c_std_default_no_gnu"},
-		{cpp_std: "gnu++17", gnu_extensions: "true", bazel_cpp_std: "gnu++17"},
-
-		// some c_std test cases
-		{c_std: "experimental", gnu_extensions: "", bazel_c_std: "c_std_experimental"},
-		{c_std: "experimental", gnu_extensions: "false", bazel_cpp_std: "cpp_std_default_no_gnu", bazel_c_std: "c_std_experimental_no_gnu"},
-		{c_std: "experimental", gnu_extensions: "true", bazel_c_std: "c_std_experimental"},
-		{c_std: "gnu11", cpp_std: "gnu++17", gnu_extensions: "", bazel_cpp_std: "gnu++17", bazel_c_std: "gnu11"},
-		{c_std: "gnu11", cpp_std: "gnu++17", gnu_extensions: "false", bazel_cpp_std: "c++17", bazel_c_std: "c11"},
-		{c_std: "gnu11", cpp_std: "gnu++17", gnu_extensions: "true", bazel_cpp_std: "gnu++17", bazel_c_std: "gnu11"},
-	}
-	for i, tc := range testCases {
-		name := fmt.Sprintf("cpp std: %q, c std: %q, gnu_extensions: %q", tc.cpp_std, tc.c_std, tc.gnu_extensions)
-		t.Run(name, func(t *testing.T) {
-			name_prefix := fmt.Sprintf("a_%v", i)
-			cppStdProp := ""
-			if tc.cpp_std != "" {
-				cppStdProp = fmt.Sprintf("    cpp_std: \"%s\",", tc.cpp_std)
-			}
-			cStdProp := ""
-			if tc.c_std != "" {
-				cStdProp = fmt.Sprintf("    c_std: \"%s\",", tc.c_std)
-			}
-			gnuExtensionsProp := ""
-			if tc.gnu_extensions != "" {
-				gnuExtensionsProp = fmt.Sprintf("    gnu_extensions: %s,", tc.gnu_extensions)
-			}
-			attrs := AttrNameToString{}
-			if tc.bazel_cpp_std != "" {
-				attrs["cpp_std"] = fmt.Sprintf(`"%s"`, tc.bazel_cpp_std)
-			}
-			if tc.bazel_c_std != "" {
-				attrs["c_std"] = fmt.Sprintf(`"%s"`, tc.bazel_c_std)
-			}
-
-			runCcLibraryTestCase(t, Bp2buildTestCase{
-				Description: fmt.Sprintf(
-					"cc_library with cpp_std: %s and gnu_extensions: %s", tc.cpp_std, tc.gnu_extensions),
-				ModuleTypeUnderTest:        "cc_library",
-				ModuleTypeUnderTestFactory: cc.LibraryFactory,
-				Blueprint: soongCcLibraryPreamble + fmt.Sprintf(`
-cc_library {
-	name: "%s_full",
-%s // cpp_std: *string
-%s // c_std: *string
-%s // gnu_extensions: *bool
-	include_build_directory: false,
-}
-`, name_prefix, cppStdProp, cStdProp, gnuExtensionsProp),
-				ExpectedBazelTargets: makeCcLibraryTargets(name_prefix+"_full", attrs),
-			})
-
-			runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-				Description: fmt.Sprintf(
-					"cc_library_static with cpp_std: %s and gnu_extensions: %s", tc.cpp_std, tc.gnu_extensions),
-				ModuleTypeUnderTest:        "cc_library_static",
-				ModuleTypeUnderTestFactory: cc.LibraryStaticFactory,
-				Blueprint: soongCcLibraryPreamble + fmt.Sprintf(`
-cc_library_static {
-	name: "%s_static",
-%s // cpp_std: *string
-%s // c_std: *string
-%s // gnu_extensions: *bool
-	include_build_directory: false,
-}
-`, name_prefix, cppStdProp, cStdProp, gnuExtensionsProp),
-				ExpectedBazelTargets: []string{
-					MakeBazelTarget("cc_library_static", name_prefix+"_static", attrs),
-				},
-			})
-
-			runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-				Description: fmt.Sprintf(
-					"cc_library_shared with cpp_std: %s and gnu_extensions: %s", tc.cpp_std, tc.gnu_extensions),
-				ModuleTypeUnderTest:        "cc_library_shared",
-				ModuleTypeUnderTestFactory: cc.LibrarySharedFactory,
-				Blueprint: soongCcLibraryPreamble + fmt.Sprintf(`
-cc_library_shared {
-	name: "%s_shared",
-%s // cpp_std: *string
-%s // c_std: *string
-%s // gnu_extensions: *bool
-	include_build_directory: false,
-}
-`, name_prefix, cppStdProp, cStdProp, gnuExtensionsProp),
-				ExpectedBazelTargets: []string{
-					MakeBazelTarget("cc_library_shared", name_prefix+"_shared", attrs),
-				},
-			})
-		})
-	}
-}
-
-func TestCcLibraryProtoSimple(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: soongCcProtoPreamble + `cc_library {
-	name: "foo",
-	srcs: ["foo.proto"],
-	include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("proto_library", "foo_proto", AttrNameToString{
-				"srcs": `["foo.proto"]`,
-			}), MakeBazelTarget("cc_lite_proto_library", "foo_cc_proto_lite", AttrNameToString{
-				"deps": `[":foo_proto"]`,
-			}), MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"implementation_whole_archive_deps": `[":foo_cc_proto_lite"]`,
-				"deps":                              `[":libprotobuf-cpp-lite"]`,
-			}), MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"dynamic_deps":                      `[":libprotobuf-cpp-lite"]`,
-				"implementation_whole_archive_deps": `[":foo_cc_proto_lite"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryProtoNoCanonicalPathFromRoot(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: soongCcProtoPreamble + `cc_library {
-	name: "foo",
-	srcs: ["foo.proto"],
-	proto: { canonical_path_from_root: false},
-	include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("proto_library", "foo_proto", AttrNameToString{
-				"srcs":                `["foo.proto"]`,
-				"strip_import_prefix": `""`,
-			}), MakeBazelTarget("cc_lite_proto_library", "foo_cc_proto_lite", AttrNameToString{
-				"deps": `[":foo_proto"]`,
-			}), MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"implementation_whole_archive_deps": `[":foo_cc_proto_lite"]`,
-				"deps":                              `[":libprotobuf-cpp-lite"]`,
-			}), MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"dynamic_deps":                      `[":libprotobuf-cpp-lite"]`,
-				"implementation_whole_archive_deps": `[":foo_cc_proto_lite"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryProtoExplicitCanonicalPathFromRoot(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: soongCcProtoPreamble + `cc_library {
-	name: "foo",
-	srcs: ["foo.proto"],
-	proto: { canonical_path_from_root: true},
-	include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("proto_library", "foo_proto", AttrNameToString{
-				"srcs": `["foo.proto"]`,
-			}), MakeBazelTarget("cc_lite_proto_library", "foo_cc_proto_lite", AttrNameToString{
-				"deps": `[":foo_proto"]`,
-			}), MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"implementation_whole_archive_deps": `[":foo_cc_proto_lite"]`,
-				"deps":                              `[":libprotobuf-cpp-lite"]`,
-			}), MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"dynamic_deps":                      `[":libprotobuf-cpp-lite"]`,
-				"implementation_whole_archive_deps": `[":foo_cc_proto_lite"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryProtoFull(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: soongCcProtoPreamble + `cc_library {
-	name: "foo",
-	srcs: ["foo.proto"],
-	proto: {
-		type: "full",
-	},
-	include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("proto_library", "foo_proto", AttrNameToString{
-				"srcs": `["foo.proto"]`,
-			}), MakeBazelTarget("cc_proto_library", "foo_cc_proto", AttrNameToString{
-				"deps": `[":foo_proto"]`,
-			}), MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"implementation_whole_archive_deps": `[":foo_cc_proto"]`,
-				"deps":                              `[":libprotobuf-cpp-full"]`,
-			}), MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"dynamic_deps":                      `[":libprotobuf-cpp-full"]`,
-				"implementation_whole_archive_deps": `[":foo_cc_proto"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryProtoLite(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: soongCcProtoPreamble + `cc_library {
-	name: "foo",
-	srcs: ["foo.proto"],
-	proto: {
-		type: "lite",
-	},
-	include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("proto_library", "foo_proto", AttrNameToString{
-				"srcs": `["foo.proto"]`,
-			}), MakeBazelTarget("cc_lite_proto_library", "foo_cc_proto_lite", AttrNameToString{
-				"deps": `[":foo_proto"]`,
-			}), MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"implementation_whole_archive_deps": `[":foo_cc_proto_lite"]`,
-				"deps":                              `[":libprotobuf-cpp-lite"]`,
-			}), MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"dynamic_deps":                      `[":libprotobuf-cpp-lite"]`,
-				"implementation_whole_archive_deps": `[":foo_cc_proto_lite"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryProtoExportHeaders(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: soongCcProtoPreamble + `cc_library {
-	name: "foo",
-	srcs: ["foo.proto"],
-	proto: {
-		export_proto_headers: true,
-	},
-	include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("proto_library", "foo_proto", AttrNameToString{
-				"srcs": `["foo.proto"]`,
-			}), MakeBazelTarget("cc_lite_proto_library", "foo_cc_proto_lite", AttrNameToString{
-				"deps": `[":foo_proto"]`,
-			}), MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"deps":               `[":libprotobuf-cpp-lite"]`,
-				"whole_archive_deps": `[":foo_cc_proto_lite"]`,
-			}), MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"dynamic_deps":       `[":libprotobuf-cpp-lite"]`,
-				"whole_archive_deps": `[":foo_cc_proto_lite"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryProtoIncludeDirs(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: soongCcProtoPreamble + `cc_library {
-	name: "foo",
-	srcs: ["foo.proto"],
-	proto: {
-		include_dirs: ["external/protobuf/src"],
-	},
-	include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("proto_library", "foo_proto", AttrNameToString{
-				"srcs": `["foo.proto"]`,
-				"deps": `["//external/protobuf:libprotobuf-proto"]`,
-			}), MakeBazelTarget("cc_lite_proto_library", "foo_cc_proto_lite", AttrNameToString{
-				"deps": `[":foo_proto"]`,
-			}), MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"deps":                              `[":libprotobuf-cpp-lite"]`,
-				"implementation_whole_archive_deps": `[":foo_cc_proto_lite"]`,
-			}), MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"dynamic_deps":                      `[":libprotobuf-cpp-lite"]`,
-				"implementation_whole_archive_deps": `[":foo_cc_proto_lite"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryProtoIncludeDirsUnknown(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: soongCcProtoPreamble + `cc_library {
-	name: "foo",
-	srcs: ["foo.proto"],
-	proto: {
-		include_dirs: ["external/protobuf/abc"],
-	},
-	include_build_directory: false,
-}`,
-		ExpectedErr: fmt.Errorf("module \"foo\": TODO: Add support for proto.include_dir: external/protobuf/abc. This directory does not contain an Android.bp file"),
-	})
-}
-
-func TestCcLibraryConvertedProtoFilegroups(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: soongCcProtoPreamble + `
-filegroup {
-	name: "a_fg_proto",
-	srcs: ["a_fg.proto"],
-}
-
-cc_library {
-	name: "a",
-	srcs: [
-    ":a_fg_proto",
-    "a.proto",
-  ],
-	proto: {
-		export_proto_headers: true,
-	},
-	include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("proto_library", "a_proto", AttrNameToString{
-				"deps": `[":a_fg_proto_bp2build_converted"]`,
-				"srcs": `["a.proto"]`,
-			}), MakeBazelTarget("cc_lite_proto_library", "a_cc_proto_lite", AttrNameToString{
-				"deps": `[
-        ":a_fg_proto_bp2build_converted",
-        ":a_proto",
-    ]`,
-			}), MakeBazelTarget("cc_library_static", "a_bp2build_cc_library_static", AttrNameToString{
-				"deps":               `[":libprotobuf-cpp-lite"]`,
-				"whole_archive_deps": `[":a_cc_proto_lite"]`,
-			}), MakeBazelTarget("cc_library_shared", "a", AttrNameToString{
-				"dynamic_deps":       `[":libprotobuf-cpp-lite"]`,
-				"whole_archive_deps": `[":a_cc_proto_lite"]`,
-			}), MakeBazelTargetNoRestrictions("proto_library", "a_fg_proto_proto", AttrNameToString{
-				"srcs": `["a_fg.proto"]`,
-				"tags": `[
-        "apex_available=//apex_available:anyapex",
-        "manual",
-    ]`,
-			}), MakeBazelTargetNoRestrictions("alias", "a_fg_proto_bp2build_converted", AttrNameToString{
-				"actual": `"//.:a_fg_proto_proto"`,
-				"tags": `[
-        "apex_available=//apex_available:anyapex",
-        "manual",
-    ]`,
-			}), MakeBazelTargetNoRestrictions("filegroup", "a_fg_proto", AttrNameToString{
-				"srcs": `["a_fg.proto"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryConvertedProtoFilegroupsNoProtoFiles(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: soongCcProtoPreamble + `
-filegroup {
-	name: "a_fg_proto",
-	srcs: ["a_fg.proto"],
-}
-
-cc_library {
-	name: "a",
-	srcs: [
-    ":a_fg_proto",
-  ],
-	proto: {
-		export_proto_headers: true,
-	},
-	include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_lite_proto_library", "a_cc_proto_lite", AttrNameToString{
-				"deps": `[":a_fg_proto_bp2build_converted"]`,
-			}), MakeBazelTarget("cc_library_static", "a_bp2build_cc_library_static", AttrNameToString{
-				"deps":               `[":libprotobuf-cpp-lite"]`,
-				"whole_archive_deps": `[":a_cc_proto_lite"]`,
-			}), MakeBazelTarget("cc_library_shared", "a", AttrNameToString{
-				"dynamic_deps":       `[":libprotobuf-cpp-lite"]`,
-				"whole_archive_deps": `[":a_cc_proto_lite"]`,
-			}), MakeBazelTargetNoRestrictions("proto_library", "a_fg_proto_proto", AttrNameToString{
-				"srcs": `["a_fg.proto"]`,
-				"tags": `[
-        "apex_available=//apex_available:anyapex",
-        "manual",
-    ]`,
-			}), MakeBazelTargetNoRestrictions("alias", "a_fg_proto_bp2build_converted", AttrNameToString{
-				"actual": `"//.:a_fg_proto_proto"`,
-				"tags": `[
-        "apex_available=//apex_available:anyapex",
-        "manual",
-    ]`,
-			}), MakeBazelTargetNoRestrictions("filegroup", "a_fg_proto", AttrNameToString{
-				"srcs": `["a_fg.proto"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryExternalConvertedProtoFilegroups(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		StubbedBuildDefinitions:    []string{"//path/to/A:a_fg_proto"},
-		Filesystem: map[string]string{
-			"path/to/A/Android.bp": `
-filegroup {
-	name: "a_fg_proto",
-	srcs: ["a_fg.proto"],
-}`,
-		},
-		Blueprint: soongCcProtoPreamble + `
-cc_library {
-	name: "a",
-	srcs: [
-    ":a_fg_proto",
-    "a.proto",
-  ],
-	proto: {
-		export_proto_headers: true,
-	},
-	include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("proto_library", "a_proto", AttrNameToString{
-				"deps": `["//path/to/A:a_fg_proto_bp2build_converted"]`,
-				"srcs": `["a.proto"]`,
-			}), MakeBazelTarget("cc_lite_proto_library", "a_cc_proto_lite", AttrNameToString{
-				"deps": `[
-        "//path/to/A:a_fg_proto_bp2build_converted",
-        ":a_proto",
-    ]`,
-			}), MakeBazelTarget("cc_library_static", "a_bp2build_cc_library_static", AttrNameToString{
-				"deps":               `[":libprotobuf-cpp-lite"]`,
-				"whole_archive_deps": `[":a_cc_proto_lite"]`,
-			}), MakeBazelTarget("cc_library_shared", "a", AttrNameToString{
-				"dynamic_deps":       `[":libprotobuf-cpp-lite"]`,
-				"whole_archive_deps": `[":a_cc_proto_lite"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryProtoFilegroups(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		StubbedBuildDefinitions:    []string{"a_fg_proto", "b_protos", "c-proto-srcs", "proto-srcs-d"},
-		Blueprint: soongCcProtoPreamble +
-			simpleModule("filegroup", "a_fg_proto") +
-			simpleModule("filegroup", "b_protos") +
-			simpleModule("filegroup", "c-proto-srcs") +
-			simpleModule("filegroup", "proto-srcs-d") + `
-cc_library {
-	name: "a",
-	srcs: [":a_fg_proto"],
-	proto: {
-		export_proto_headers: true,
-	},
-	include_build_directory: false,
-}
-
-cc_library {
-	name: "b",
-	srcs: [":b_protos"],
-	proto: {
-		export_proto_headers: true,
-	},
-	include_build_directory: false,
-}
-
-cc_library {
-	name: "c",
-	srcs: [":c-proto-srcs"],
-	proto: {
-		export_proto_headers: true,
-	},
-	include_build_directory: false,
-}
-
-cc_library {
-	name: "d",
-	srcs: [":proto-srcs-d"],
-	proto: {
-		export_proto_headers: true,
-	},
-	include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("proto_library", "a_proto", AttrNameToString{
-				"srcs": `[":a_fg_proto"]`,
-			}), MakeBazelTarget("cc_lite_proto_library", "a_cc_proto_lite", AttrNameToString{
-				"deps": `[":a_proto"]`,
-			}), MakeBazelTarget("cc_library_static", "a_bp2build_cc_library_static", AttrNameToString{
-				"deps":               `[":libprotobuf-cpp-lite"]`,
-				"whole_archive_deps": `[":a_cc_proto_lite"]`,
-				"srcs":               `[":a_fg_proto_cpp_srcs"]`,
-				"srcs_as":            `[":a_fg_proto_as_srcs"]`,
-				"srcs_c":             `[":a_fg_proto_c_srcs"]`,
-			}), MakeBazelTarget("cc_library_shared", "a", AttrNameToString{
-				"dynamic_deps":       `[":libprotobuf-cpp-lite"]`,
-				"whole_archive_deps": `[":a_cc_proto_lite"]`,
-				"srcs":               `[":a_fg_proto_cpp_srcs"]`,
-				"srcs_as":            `[":a_fg_proto_as_srcs"]`,
-				"srcs_c":             `[":a_fg_proto_c_srcs"]`,
-			}), MakeBazelTarget("proto_library", "b_proto", AttrNameToString{
-				"srcs": `[":b_protos"]`,
-			}), MakeBazelTarget("cc_lite_proto_library", "b_cc_proto_lite", AttrNameToString{
-				"deps": `[":b_proto"]`,
-			}), MakeBazelTarget("cc_library_static", "b_bp2build_cc_library_static", AttrNameToString{
-				"deps":               `[":libprotobuf-cpp-lite"]`,
-				"whole_archive_deps": `[":b_cc_proto_lite"]`,
-				"srcs":               `[":b_protos_cpp_srcs"]`,
-				"srcs_as":            `[":b_protos_as_srcs"]`,
-				"srcs_c":             `[":b_protos_c_srcs"]`,
-			}), MakeBazelTarget("cc_library_shared", "b", AttrNameToString{
-				"dynamic_deps":       `[":libprotobuf-cpp-lite"]`,
-				"whole_archive_deps": `[":b_cc_proto_lite"]`,
-				"srcs":               `[":b_protos_cpp_srcs"]`,
-				"srcs_as":            `[":b_protos_as_srcs"]`,
-				"srcs_c":             `[":b_protos_c_srcs"]`,
-			}), MakeBazelTarget("proto_library", "c_proto", AttrNameToString{
-				"srcs": `[":c-proto-srcs"]`,
-			}), MakeBazelTarget("cc_lite_proto_library", "c_cc_proto_lite", AttrNameToString{
-				"deps": `[":c_proto"]`,
-			}), MakeBazelTarget("cc_library_static", "c_bp2build_cc_library_static", AttrNameToString{
-				"deps":               `[":libprotobuf-cpp-lite"]`,
-				"whole_archive_deps": `[":c_cc_proto_lite"]`,
-				"srcs":               `[":c-proto-srcs_cpp_srcs"]`,
-				"srcs_as":            `[":c-proto-srcs_as_srcs"]`,
-				"srcs_c":             `[":c-proto-srcs_c_srcs"]`,
-			}), MakeBazelTarget("cc_library_shared", "c", AttrNameToString{
-				"dynamic_deps":       `[":libprotobuf-cpp-lite"]`,
-				"whole_archive_deps": `[":c_cc_proto_lite"]`,
-				"srcs":               `[":c-proto-srcs_cpp_srcs"]`,
-				"srcs_as":            `[":c-proto-srcs_as_srcs"]`,
-				"srcs_c":             `[":c-proto-srcs_c_srcs"]`,
-			}), MakeBazelTarget("proto_library", "d_proto", AttrNameToString{
-				"srcs": `[":proto-srcs-d"]`,
-			}), MakeBazelTarget("cc_lite_proto_library", "d_cc_proto_lite", AttrNameToString{
-				"deps": `[":d_proto"]`,
-			}), MakeBazelTarget("cc_library_static", "d_bp2build_cc_library_static", AttrNameToString{
-				"deps":               `[":libprotobuf-cpp-lite"]`,
-				"whole_archive_deps": `[":d_cc_proto_lite"]`,
-				"srcs":               `[":proto-srcs-d_cpp_srcs"]`,
-				"srcs_as":            `[":proto-srcs-d_as_srcs"]`,
-				"srcs_c":             `[":proto-srcs-d_c_srcs"]`,
-			}), MakeBazelTarget("cc_library_shared", "d", AttrNameToString{
-				"dynamic_deps":       `[":libprotobuf-cpp-lite"]`,
-				"whole_archive_deps": `[":d_cc_proto_lite"]`,
-				"srcs":               `[":proto-srcs-d_cpp_srcs"]`,
-				"srcs_as":            `[":proto-srcs-d_as_srcs"]`,
-				"srcs_c":             `[":proto-srcs-d_c_srcs"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryDisabledArchAndTarget(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: soongCcProtoPreamble + `cc_library {
-	name: "foo",
-	srcs: ["foo.cpp"],
-	host_supported: true,
-	target: {
-		darwin: {
-			enabled: false,
-		},
-		windows: {
-			enabled: false,
-		},
-		linux_glibc_x86: {
-			enabled: false,
-		},
-	},
-	include_build_directory: false,
-}`,
-		ExpectedBazelTargets: makeCcLibraryTargets("foo", AttrNameToString{
-			"srcs": `["foo.cpp"]`,
-			"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os_arch:darwin_arm64": ["@platforms//:incompatible"],
-        "//build/bazel_common_rules/platforms/os_arch:darwin_x86_64": ["@platforms//:incompatible"],
-        "//build/bazel_common_rules/platforms/os_arch:linux_glibc_x86": ["@platforms//:incompatible"],
-        "//build/bazel_common_rules/platforms/os_arch:windows_x86": ["@platforms//:incompatible"],
-        "//build/bazel_common_rules/platforms/os_arch:windows_x86_64": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-		}),
-	})
-}
-
-func TestCcLibraryDisabledArchAndTargetWithDefault(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: soongCcProtoPreamble + `cc_library {
-	name: "foo",
-	srcs: ["foo.cpp"],
-  enabled: false,
-	host_supported: true,
-	target: {
-		darwin: {
-			enabled: true,
-		},
-		windows: {
-			enabled: false,
-		},
-		linux_glibc_x86: {
-			enabled: false,
-		},
-	},
-	include_build_directory: false,
-}`,
-		ExpectedBazelTargets: makeCcLibraryTargets("foo", AttrNameToString{
-			"srcs": `["foo.cpp"]`,
-			"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os_arch:darwin_arm64": [],
-        "//build/bazel_common_rules/platforms/os_arch:darwin_x86_64": [],
-        "//conditions:default": ["@platforms//:incompatible"],
-    })`,
-		}),
-	})
-}
-
-func TestCcLibrarySharedDisabled(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: soongCcProtoPreamble + `cc_library {
-	name: "foo",
-	srcs: ["foo.cpp"],
-	enabled: false,
-	shared: {
-		enabled: true,
-	},
-	target: {
-		android: {
-			shared: {
-				enabled: false,
-			},
-		}
-  },
-	include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-			"srcs":                   `["foo.cpp"]`,
-			"target_compatible_with": `["@platforms//:incompatible"]`,
-		}), MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-			"srcs": `["foo.cpp"]`,
-			"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-		}),
-		},
-	})
-}
-
-func TestCcLibraryStaticDisabledForSomeArch(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: soongCcProtoPreamble + `cc_library {
-	name: "foo",
-	host_supported: true,
-	srcs: ["foo.cpp"],
-	shared: {
-		enabled: false
-	},
-	target: {
-		darwin: {
-			enabled: true,
-		},
-		windows: {
-			enabled: false,
-		},
-		linux_glibc_x86: {
-			shared: {
-				enabled: true,
-			},
-		},
-	},
-	include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-			"srcs": `["foo.cpp"]`,
-			"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:windows": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-		}), MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-			"srcs": `["foo.cpp"]`,
-			"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os_arch:darwin_arm64": [],
-        "//build/bazel_common_rules/platforms/os_arch:darwin_x86_64": [],
-        "//build/bazel_common_rules/platforms/os_arch:linux_glibc_x86": [],
-        "//conditions:default": ["@platforms//:incompatible"],
-    })`,
-		}),
-		}})
-}
-
-func TestCcLibraryStubs(t *testing.T) {
-	expectedBazelTargets := makeCcLibraryTargets("a", AttrNameToString{
-		"stubs_symbol_file": `"a.map.txt"`,
-	})
-	expectedBazelTargets = append(expectedBazelTargets, makeCcStubSuiteTargets("a", AttrNameToString{
-		"api_surface":          `"module-libapi"`,
-		"soname":               `"a.so"`,
-		"source_library_label": `"//foo/bar:a"`,
-		"stubs_symbol_file":    `"a.map.txt"`,
-		"stubs_versions": `[
-        "28",
-        "29",
-        "current",
-    ]`,
-	}))
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library stubs",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Dir:                        "foo/bar",
-		Filesystem: map[string]string{
-			"foo/bar/Android.bp": `
-cc_library {
-    name: "a",
-    stubs: { symbol_file: "a.map.txt", versions: ["28", "29", "current"] },
-    bazel_module: { bp2build_available: true },
-    include_build_directory: false,
-}
-`,
-		},
-		Blueprint:            soongCcLibraryPreamble,
-		ExpectedBazelTargets: expectedBazelTargets,
-	},
-	)
-}
-
-func TestCcLibraryStubsAcrossConfigsDuplicatesRemoved(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "stub target generation of the same lib across configs should not result in duplicates",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Filesystem: map[string]string{
-			"bar.map.txt": "",
-		},
-		StubbedBuildDefinitions: []string{"barlib"},
-		Blueprint: `
-cc_library {
-	name: "barlib",
-	stubs: { symbol_file: "bar.map.txt", versions: ["28", "29", "current"] },
-}
-cc_library {
-	name: "foolib",
-	shared_libs: ["barlib"],
-	target: {
-		android: {
-			shared_libs: ["barlib"],
-		},
-	},
-	bazel_module: { bp2build_available: true },
-	apex_available: ["foo"],
-}`,
-		ExpectedBazelTargets: makeCcLibraryTargets("foolib", AttrNameToString{
-			"implementation_dynamic_deps": `select({
-        "//build/bazel/rules/apex:foo": ["@api_surfaces//module-libapi/current:barlib"],
-        "//conditions:default": [":barlib"],
-    })`,
-			"local_includes": `["."]`,
-			"tags":           `["apex_available=foo"]`,
-		}),
-	})
-}
-
-func TestCcLibraryExcludesLibsHost(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Filesystem: map[string]string{
-			"bar.map.txt": "",
-		},
-		StubbedBuildDefinitions: []string{"bazlib", "quxlib", "barlib"},
-		Blueprint: simpleModule("cc_library", "bazlib") + `
-cc_library {
-	name: "quxlib",
-	stubs: { symbol_file: "bar.map.txt", versions: ["current"] },
-}
-cc_library {
-	name: "barlib",
-	stubs: { symbol_file: "bar.map.txt", versions: ["28", "29", "current"] },
-}
-cc_library {
-	name: "foolib",
-	shared_libs: ["barlib", "quxlib"],
-	target: {
-		host: {
-			shared_libs: ["bazlib"],
-			exclude_shared_libs: ["barlib"],
-		},
-	},
-	include_build_directory: false,
-	bazel_module: { bp2build_available: true },
-	apex_available: ["foo"],
-}`,
-		ExpectedBazelTargets: makeCcLibraryTargets("foolib", AttrNameToString{
-			"implementation_dynamic_deps": `select({
-        "//build/bazel_common_rules/platforms/os:darwin": [":bazlib"],
-        "//build/bazel_common_rules/platforms/os:linux_bionic": [":bazlib"],
-        "//build/bazel_common_rules/platforms/os:linux_glibc": [":bazlib"],
-        "//build/bazel_common_rules/platforms/os:linux_musl": [":bazlib"],
-        "//build/bazel_common_rules/platforms/os:windows": [":bazlib"],
-        "//conditions:default": [],
-    }) + select({
-        "//build/bazel/rules/apex:foo": [
-            "@api_surfaces//module-libapi/current:barlib",
-            "@api_surfaces//module-libapi/current:quxlib",
-        ],
-        "//build/bazel_common_rules/platforms/os:darwin": [":quxlib"],
-        "//build/bazel_common_rules/platforms/os:linux_bionic": [":quxlib"],
-        "//build/bazel_common_rules/platforms/os:linux_glibc": [":quxlib"],
-        "//build/bazel_common_rules/platforms/os:linux_musl": [":quxlib"],
-        "//build/bazel_common_rules/platforms/os:windows": [":quxlib"],
-        "//conditions:default": [
-            ":barlib",
-            ":quxlib",
-        ],
-    })`,
-			"tags": `["apex_available=foo"]`,
-		}),
-	})
-}
-
-func TestCcLibraryEscapeLdflags(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: soongCcProtoPreamble + `cc_library {
-	name: "foo",
-	ldflags: ["-Wl,--rpath,${ORIGIN}"],
-	include_build_directory: false,
-}`,
-		ExpectedBazelTargets: makeCcLibraryTargets("foo", AttrNameToString{
-			"linkopts": `["-Wl,--rpath,$${ORIGIN}"]`,
-		}),
-	})
-}
-
-func TestCcLibraryConvertLex(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Filesystem: map[string]string{
-			"foo.c":   "",
-			"bar.cc":  "",
-			"foo1.l":  "",
-			"bar1.ll": "",
-			"foo2.l":  "",
-			"bar2.ll": "",
-		},
-		Blueprint: `cc_library {
-	name: "foo_lib",
-	srcs: ["foo.c", "bar.cc", "foo1.l", "foo2.l", "bar1.ll", "bar2.ll"],
-	lex: { flags: ["--foo_flags"] },
-	include_build_directory: false,
-	bazel_module: { bp2build_available: true },
-}`,
-		ExpectedBazelTargets: append([]string{
-			MakeBazelTarget("genlex", "foo_lib_genlex_l", AttrNameToString{
-				"srcs": `[
-        "foo1.l",
-        "foo2.l",
-    ]`,
-				"lexopts": `["--foo_flags"]`,
-			}),
-			MakeBazelTarget("genlex", "foo_lib_genlex_ll", AttrNameToString{
-				"srcs": `[
-        "bar1.ll",
-        "bar2.ll",
-    ]`,
-				"lexopts": `["--foo_flags"]`,
-			}),
-		},
-			makeCcLibraryTargets("foo_lib", AttrNameToString{
-				"srcs": `[
-        "bar.cc",
-        ":foo_lib_genlex_ll",
-    ]`,
-				"srcs_c": `[
-        "foo.c",
-        ":foo_lib_genlex_l",
-    ]`,
-			})...),
-	})
-}
-
-func TestCCLibraryRuntimeDeps(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Blueprint: `cc_library_shared {
-	name: "bar",
-}
-
-cc_library {
-  name: "foo",
-  runtime_libs: ["bar"],
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "bar", AttrNameToString{
-				"local_includes": `["."]`,
-			}),
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"runtime_deps":   `[":bar"]`,
-				"local_includes": `["."]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"runtime_deps":   `[":bar"]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryWithInstructionSet(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `cc_library {
-    name: "foo",
-    arch: {
-      arm: {
-        instruction_set: "arm",
-      }
-    }
-}
-`,
-		ExpectedBazelTargets: makeCcLibraryTargets("foo", AttrNameToString{
-			"features": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["arm_isa_arm"],
-        "//conditions:default": [],
-    })`,
-			"local_includes": `["."]`,
-		}),
-	})
-}
-
-func TestCcLibraryEmptySuffix(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library with empty suffix",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Filesystem: map[string]string{
-			"foo.c": "",
-		},
-		Blueprint: `cc_library {
-    name: "foo",
-    suffix: "",
-    srcs: ["foo.c"],
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"srcs_c": `["foo.c"]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"srcs_c": `["foo.c"]`,
-				"suffix": `""`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySuffix(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library with suffix",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Filesystem: map[string]string{
-			"foo.c": "",
-		},
-		Blueprint: `cc_library {
-    name: "foo",
-    suffix: "-suf",
-    srcs: ["foo.c"],
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"srcs_c": `["foo.c"]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"srcs_c": `["foo.c"]`,
-				"suffix": `"-suf"`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryArchVariantSuffix(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library with arch-variant suffix",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Filesystem: map[string]string{
-			"foo.c": "",
-		},
-		Blueprint: `cc_library {
-    name: "foo",
-    arch: {
-        arm64: { suffix: "-64" },
-        arm:   { suffix: "-32" },
-		},
-    srcs: ["foo.c"],
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"srcs_c": `["foo.c"]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"srcs_c": `["foo.c"]`,
-				"suffix": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": "-32",
-        "//build/bazel_common_rules/platforms/arch:arm64": "-64",
-        "//conditions:default": None,
-    })`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryWithAidlLibrary(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library with aidl_library",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-aidl_library {
-    name: "A_aidl",
-    srcs: ["aidl/A.aidl"],
-	hdrs: ["aidl/Header.aidl"],
-	strip_import_prefix: "aidl",
-}
-cc_library {
-	name: "foo",
-	aidl: {
-		libs: ["A_aidl"],
-	},
-	export_include_dirs: ["include"],
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTargetNoRestrictions("aidl_library", "A_aidl", AttrNameToString{
-				"srcs":                `["aidl/A.aidl"]`,
-				"hdrs":                `["aidl/Header.aidl"]`,
-				"strip_import_prefix": `"aidl"`,
-				"tags":                `["apex_available=//apex_available:anyapex"]`,
-			}),
-			MakeBazelTarget("cc_aidl_library", "foo_cc_aidl_library", AttrNameToString{
-				"deps":            `[":A_aidl"]`,
-				"local_includes":  `["."]`,
-				"export_includes": `["include"]`,
-			}),
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"implementation_whole_archive_deps": `[":foo_cc_aidl_library"]`,
-				"local_includes":                    `["."]`,
-				"export_includes":                   `["include"]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"implementation_whole_archive_deps": `[":foo_cc_aidl_library"]`,
-				"local_includes":                    `["."]`,
-				"export_includes":                   `["include"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryWithAidlSrcs(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library with aidl srcs",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-filegroup {
-    name: "A_aidl",
-    srcs: ["aidl/A.aidl"],
-	path: "aidl",
-}
-cc_library {
-	name: "foo",
-	srcs: [
-		":A_aidl",
-		"B.aidl",
-	],
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTargetNoRestrictions("aidl_library", "A_aidl", AttrNameToString{
-				"srcs":                `["aidl/A.aidl"]`,
-				"strip_import_prefix": `"aidl"`,
-				"tags":                `["apex_available=//apex_available:anyapex"]`,
-			}),
-			MakeBazelTarget("aidl_library", "foo_aidl_library", AttrNameToString{
-				"srcs": `["B.aidl"]`,
-			}),
-			MakeBazelTarget("cc_aidl_library", "foo_cc_aidl_library", AttrNameToString{
-				"local_includes": `["."]`,
-				"deps": `[
-        ":A_aidl",
-        ":foo_aidl_library",
-    ]`,
-			}),
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"implementation_whole_archive_deps": `[":foo_cc_aidl_library"]`,
-				"local_includes":                    `["."]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"implementation_whole_archive_deps": `[":foo_cc_aidl_library"]`,
-				"local_includes":                    `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryWithNonAdjacentAidlFilegroup(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library with non aidl filegroup",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		StubbedBuildDefinitions:    []string{"//path/to/A:A_aidl"},
-		Filesystem: map[string]string{
-			"path/to/A/Android.bp": `
-filegroup {
-    name: "A_aidl",
-    srcs: ["aidl/A.aidl"],
-    path: "aidl",
-}`,
-		},
-		Blueprint: `
-cc_library {
-    name: "foo",
-    srcs: [
-        ":A_aidl",
-    ],
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_aidl_library", "foo_cc_aidl_library", AttrNameToString{
-				"local_includes": `["."]`,
-				"deps":           `["//path/to/A:A_aidl"]`,
-			}),
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"implementation_whole_archive_deps": `[":foo_cc_aidl_library"]`,
-				"local_includes":                    `["."]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"local_includes":                    `["."]`,
-				"implementation_whole_archive_deps": `[":foo_cc_aidl_library"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryWithExportAidlHeaders(t *testing.T) {
-	t.Parallel()
-
-	expectedBazelTargets := []string{
-		MakeBazelTarget("cc_aidl_library", "foo_cc_aidl_library", AttrNameToString{
-			"local_includes": `["."]`,
-			"deps":           `[":foo_aidl_library"]`,
-		}),
-		MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-			"whole_archive_deps": `[":foo_cc_aidl_library"]`,
-			"local_includes":     `["."]`,
-		}),
-		MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-			"whole_archive_deps": `[":foo_cc_aidl_library"]`,
-			"local_includes":     `["."]`,
-		}),
-	}
-	testCases := []struct {
-		description          string
-		bp                   string
-		expectedBazelTargets []string
-	}{
-		{
-			description: "cc_library with aidl srcs and aidl.export_aidl_headers set",
-			bp: `
-			cc_library {
-				name: "foo",
-				srcs: [
-					"Foo.aidl",
-				],
-				aidl: {
-					export_aidl_headers: true,
-				}
-			}`,
-			expectedBazelTargets: append(
-				expectedBazelTargets,
-				MakeBazelTarget("aidl_library", "foo_aidl_library", AttrNameToString{
-					"srcs": `["Foo.aidl"]`,
-				})),
-		},
-		{
-			description: "cc_library with aidl.libs and aidl.export_aidl_headers set",
-			bp: `
-			aidl_library {
-				name: "foo_aidl_library",
-				srcs: ["Foo.aidl"],
-			}
-			cc_library {
-				name: "foo",
-				aidl: {
-					libs: ["foo_aidl_library"],
-					export_aidl_headers: true,
-				}
-			}`,
-			expectedBazelTargets: append(
-				expectedBazelTargets,
-				MakeBazelTargetNoRestrictions("aidl_library", "foo_aidl_library", AttrNameToString{
-					"srcs": `["Foo.aidl"]`,
-					"tags": `["apex_available=//apex_available:anyapex"]`,
-				}),
-			),
-		},
-	}
-
-	for _, testCase := range testCases {
-		runCcLibraryTestCase(t, Bp2buildTestCase{
-			Description:                "cc_library with export aidl headers",
-			ModuleTypeUnderTest:        "cc_library",
-			ModuleTypeUnderTestFactory: cc.LibraryFactory,
-			Blueprint:                  testCase.bp,
-			ExpectedBazelTargets:       testCase.expectedBazelTargets,
-		})
-	}
-}
-
-func TestCcLibraryWithTargetApex(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library with target.apex",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		StubbedBuildDefinitions:    []string{"bar", "baz", "buh"},
-		Blueprint: `
-cc_library {
-    name: "foo",
-	shared_libs: ["bar", "baz"],
-	static_libs: ["baz", "buh"],
-	target: {
-        apex: {
-            exclude_shared_libs: ["bar"],
-            exclude_static_libs: ["buh"],
-        }
-    }
-}` + simpleModule("cc_library_static", "baz") +
-			simpleModule("cc_library_static", "buh") +
-			simpleModule("cc_library_static", "bar"),
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"implementation_deps": `[":baz"] + select({
-        "//build/bazel/rules/apex:in_apex": [],
-        "//conditions:default": [":buh"],
-    })`,
-				"implementation_dynamic_deps": `[":baz"] + select({
-        "//build/bazel/rules/apex:in_apex": [],
-        "//conditions:default": [":bar"],
-    })`,
-				"local_includes": `["."]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"implementation_deps": `[":baz"] + select({
-        "//build/bazel/rules/apex:in_apex": [],
-        "//conditions:default": [":buh"],
-    })`,
-				"implementation_dynamic_deps": `[":baz"] + select({
-        "//build/bazel/rules/apex:in_apex": [],
-        "//conditions:default": [":bar"],
-    })`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryWithTargetApexAndExportLibHeaders(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library with target.apex and export_shared|static_lib_headers",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-cc_library_static {
-    name: "foo",
-	shared_libs: ["bar", "baz"],
-    static_libs: ["abc"],
-    export_shared_lib_headers: ["baz"],
-    export_static_lib_headers: ["abc"],
-	target: {
-        apex: {
-            exclude_shared_libs: ["baz", "bar"],
-            exclude_static_libs: ["abc"],
-        }
-    }
-}` + simpleModule("cc_library_static", "bar") +
-			simpleModule("cc_library_static", "baz") +
-			simpleModule("cc_library_static", "abc"),
-		StubbedBuildDefinitions: []string{"bar", "baz", "abc"},
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-				"implementation_dynamic_deps": `select({
-        "//build/bazel/rules/apex:in_apex": [],
-        "//conditions:default": [":bar"],
-    })`,
-				"dynamic_deps": `select({
-        "//build/bazel/rules/apex:in_apex": [],
-        "//conditions:default": [":baz"],
-    })`,
-				"deps": `select({
-        "//build/bazel/rules/apex:in_apex": [],
-        "//conditions:default": [":abc"],
-    })`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryWithSyspropSrcs(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library with sysprop sources",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-cc_library {
-	name: "foo",
-	srcs: [
-		"bar.sysprop",
-		"baz.sysprop",
-		"blah.cpp",
-	],
-	min_sdk_version: "5",
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("sysprop_library", "foo_sysprop_library", AttrNameToString{
-				"srcs": `[
-        "bar.sysprop",
-        "baz.sysprop",
-    ]`,
-			}),
-			MakeBazelTarget("cc_sysprop_library_static", "foo_cc_sysprop_library_static", AttrNameToString{
-				"dep":             `":foo_sysprop_library"`,
-				"min_sdk_version": `"5"`,
-			}),
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"srcs":               `["blah.cpp"]`,
-				"local_includes":     `["."]`,
-				"min_sdk_version":    `"5"`,
-				"whole_archive_deps": `[":foo_cc_sysprop_library_static"]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"srcs":               `["blah.cpp"]`,
-				"local_includes":     `["."]`,
-				"min_sdk_version":    `"5"`,
-				"whole_archive_deps": `[":foo_cc_sysprop_library_static"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryWithSyspropSrcsSomeConfigs(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library with sysprop sources in some configs but not others",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-cc_library {
-	name: "foo",
-	host_supported: true,
-	srcs: [
-		"blah.cpp",
-	],
-	target: {
-		android: {
-			srcs: ["bar.sysprop"],
-		},
-	},
-	min_sdk_version: "5",
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTargetNoRestrictions("sysprop_library", "foo_sysprop_library", AttrNameToString{
-				"srcs": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["bar.sysprop"],
-        "//conditions:default": [],
-    })`,
-			}),
-			MakeBazelTargetNoRestrictions("cc_sysprop_library_static", "foo_cc_sysprop_library_static", AttrNameToString{
-				"dep":             `":foo_sysprop_library"`,
-				"min_sdk_version": `"5"`,
-			}),
-			MakeBazelTargetNoRestrictions("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"srcs":            `["blah.cpp"]`,
-				"local_includes":  `["."]`,
-				"min_sdk_version": `"5"`,
-				"whole_archive_deps": `select({
-        "//build/bazel_common_rules/platforms/os:android": [":foo_cc_sysprop_library_static"],
-        "//conditions:default": [],
-    })`,
-			}),
-			MakeBazelTargetNoRestrictions("cc_library_shared", "foo", AttrNameToString{
-				"srcs":            `["blah.cpp"]`,
-				"local_includes":  `["."]`,
-				"min_sdk_version": `"5"`,
-				"whole_archive_deps": `select({
-        "//build/bazel_common_rules/platforms/os:android": [":foo_cc_sysprop_library_static"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryWithAidlAndLibs(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_aidl_library depends on libs from parent cc_library_static",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		StubbedBuildDefinitions:    []string{"bar-static", "baz-static", "bar-shared", "baz-shared"},
-		Blueprint: `
-cc_library_static {
-	name: "foo",
-	srcs: [
-		"Foo.aidl",
-	],
-	static_libs: [
-		"bar-static",
-		"baz-static",
-	],
-	shared_libs: [
-		"bar-shared",
-		"baz-shared",
-	],
-	export_static_lib_headers: [
-		"baz-static",
-	],
-	export_shared_lib_headers: [
-		"baz-shared",
-	],
-}` +
-			simpleModule("cc_library_static", "bar-static") +
-			simpleModule("cc_library_static", "baz-static") +
-			simpleModule("cc_library", "bar-shared") +
-			simpleModule("cc_library", "baz-shared"),
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("aidl_library", "foo_aidl_library", AttrNameToString{
-				"srcs": `["Foo.aidl"]`,
-			}),
-			MakeBazelTarget("cc_aidl_library", "foo_cc_aidl_library", AttrNameToString{
-				"local_includes": `["."]`,
-				"deps":           `[":foo_aidl_library"]`,
-				"implementation_deps": `[
-        ":baz-static",
-        ":bar-static",
-    ]`,
-				"implementation_dynamic_deps": `[
-        ":baz-shared",
-        ":bar-shared",
-    ]`,
-			}),
-			MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-				"implementation_whole_archive_deps": `[":foo_cc_aidl_library"]`,
-				"deps":                              `[":baz-static"]`,
-				"implementation_deps":               `[":bar-static"]`,
-				"dynamic_deps":                      `[":baz-shared"]`,
-				"implementation_dynamic_deps":       `[":bar-shared"]`,
-				"local_includes":                    `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryWithTidy(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library uses tidy properties",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-cc_library_static {
-	name: "foo",
-	srcs: ["foo.cpp"],
-}
-cc_library_static {
-	name: "foo-no-tidy",
-	srcs: ["foo.cpp"],
-	tidy: false,
-}
-cc_library_static {
-	name: "foo-tidy",
-	srcs: ["foo.cpp"],
-	tidy: true,
-	tidy_checks: ["check1", "check2"],
-	tidy_checks_as_errors: ["check1error", "check2error"],
-	tidy_disabled_srcs: ["bar.cpp"],
-	tidy_timeout_srcs: ["baz.cpp"],
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-				"local_includes": `["."]`,
-				"srcs":           `["foo.cpp"]`,
-			}),
-			MakeBazelTarget("cc_library_static", "foo-no-tidy", AttrNameToString{
-				"local_includes": `["."]`,
-				"srcs":           `["foo.cpp"]`,
-				"tidy":           `"never"`,
-			}),
-			MakeBazelTarget("cc_library_static", "foo-tidy", AttrNameToString{
-				"local_includes": `["."]`,
-				"srcs":           `["foo.cpp"]`,
-				"tidy":           `"local"`,
-				"tidy_checks": `[
-        "check1",
-        "check2",
-    ]`,
-				"tidy_checks_as_errors": `[
-        "check1error",
-        "check2error",
-    ]`,
-				"tidy_disabled_srcs": `["bar.cpp"]`,
-				"tidy_timeout_srcs":  `["baz.cpp"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryWithAfdoEnabled(t *testing.T) {
-	bp := `
-cc_library {
-	name: "foo",
-	afdo: true,
-	include_build_directory: false,
-}`
-
-	// TODO(b/260714900): Add test case for arch-specific afdo profile
-	testCases := []struct {
-		description          string
-		filesystem           map[string]string
-		expectedBazelTargets []string
-	}{
-		{
-			description: "cc_library with afdo enabled and existing profile",
-			filesystem: map[string]string{
-				"vendor/google_data/pgo_profile/sampling/Android.bp": "",
-				"vendor/google_data/pgo_profile/sampling/foo.afdo":   "",
-			},
-			expectedBazelTargets: []string{
-				MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{}),
-				MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-					"fdo_profile": `"//vendor/google_data/pgo_profile/sampling:foo"`,
-				}),
-			},
-		},
-		{
-			description: "cc_library with afdo enabled and existing profile in AOSP",
-			filesystem: map[string]string{
-				"toolchain/pgo-profiles/sampling/Android.bp": "",
-				"toolchain/pgo-profiles/sampling/foo.afdo":   "",
-			},
-			expectedBazelTargets: []string{
-				MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{}),
-				MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-					"fdo_profile": `"//toolchain/pgo-profiles/sampling:foo"`,
-				}),
-			},
-		},
-		{
-			description: "cc_library with afdo enabled but profile filename doesn't match with module name",
-			filesystem: map[string]string{
-				"toolchain/pgo-profiles/sampling/Android.bp": "",
-				"toolchain/pgo-profiles/sampling/bar.afdo":   "",
-			},
-			expectedBazelTargets: []string{
-				MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{}),
-				MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{}),
-			},
-		},
-		{
-			description: "cc_library with afdo enabled but profile doesn't exist",
-			expectedBazelTargets: []string{
-				MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{}),
-				MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{}),
-			},
-		},
-		{
-			description: "cc_library with afdo enabled and existing profile but BUILD file doesn't exist",
-			filesystem: map[string]string{
-				"vendor/google_data/pgo_profile/sampling/foo.afdo": "",
-			},
-			expectedBazelTargets: []string{
-				MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{}),
-				MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{}),
-			},
-		},
-	}
-	for _, testCase := range testCases {
-		t.Run(testCase.description, func(t *testing.T) {
-			runCcLibraryTestCase(t, Bp2buildTestCase{
-				ExpectedBazelTargets:       testCase.expectedBazelTargets,
-				ModuleTypeUnderTest:        "cc_library",
-				ModuleTypeUnderTestFactory: cc.LibraryFactory,
-				Description:                testCase.description,
-				Blueprint:                  binaryReplacer.Replace(bp),
-				Filesystem:                 testCase.filesystem,
-			})
-		})
-	}
-}
-
-func TestCcLibraryHeaderAbiChecker(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library with header abi checker",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `cc_library {
-    name: "foo",
-    header_abi_checker: {
-        enabled: true,
-        symbol_file: "a.map.txt",
-        exclude_symbol_versions: [
-						"29",
-						"30",
-				],
-        exclude_symbol_tags: [
-						"tag1",
-						"tag2",
-				],
-        check_all_apis: true,
-        diff_flags: ["-allow-adding-removing-weak-symbols"],
-    },
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"abi_checker_enabled":     `True`,
-				"abi_checker_symbol_file": `"a.map.txt"`,
-				"abi_checker_exclude_symbol_versions": `[
-        "29",
-        "30",
-    ]`,
-				"abi_checker_exclude_symbol_tags": `[
-        "tag1",
-        "tag2",
-    ]`,
-				"abi_checker_check_all_apis": `True`,
-				"abi_checker_diff_flags":     `["-allow-adding-removing-weak-symbols"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryApexAvailable(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library apex_available converted to tags",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-    name: "a",
-    srcs: ["a.cpp"],
-    apex_available: ["com.android.foo"],
-}
-`,
-		ExpectedBazelTargets: makeCcLibraryTargets("a", AttrNameToString{
-			"tags":           `["apex_available=com.android.foo"]`,
-			"srcs":           `["a.cpp"]`,
-			"local_includes": `["."]`,
-		}),
-	},
-	)
-}
-
-func TestCcLibraryApexAvailableMultiple(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library apex_available converted to multiple tags",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-    name: "a",
-    srcs: ["a.cpp"],
-    apex_available: ["com.android.foo", "//apex_available:platform", "com.android.bar"],
-}
-`,
-		ExpectedBazelTargets: makeCcLibraryTargets("a", AttrNameToString{
-			"tags": `[
-        "apex_available=com.android.foo",
-        "apex_available=//apex_available:platform",
-        "apex_available=com.android.bar",
-    ]`,
-			"srcs":           `["a.cpp"]`,
-			"local_includes": `["."]`,
-		}),
-	},
-	)
-}
-
-// Export_include_dirs and Export_system_include_dirs have "variant_prepend" tag.
-// In bp2build output, variant info(select) should go before general info.
-// Internal order of the property should be unchanged. (e.g. ["eid1", "eid2"])
-func TestCcLibraryVariantPrependPropOrder(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library variant prepend properties order",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-  name: "a",
-  srcs: ["a.cpp"],
-  export_include_dirs: ["eid1", "eid2"],
-  export_system_include_dirs: ["esid1", "esid2"],
-    target: {
-      android: {
-        export_include_dirs: ["android_eid1", "android_eid2"],
-        export_system_include_dirs: ["android_esid1", "android_esid2"],
-      },
-      android_arm: {
-        export_include_dirs: ["android_arm_eid1", "android_arm_eid2"],
-        export_system_include_dirs: ["android_arm_esid1", "android_arm_esid2"],
-      },
-      linux: {
-        export_include_dirs: ["linux_eid1", "linux_eid2"],
-        export_system_include_dirs: ["linux_esid1", "linux_esid2"],
-      },
-    },
-    multilib: {
-      lib32: {
-        export_include_dirs: ["lib32_eid1", "lib32_eid2"],
-        export_system_include_dirs: ["lib32_esid1", "lib32_esid2"],
-      },
-    },
-    arch: {
-      arm: {
-        export_include_dirs: ["arm_eid1", "arm_eid2"],
-        export_system_include_dirs: ["arm_esid1", "arm_esid2"],
-      },
-    }
-}
-`,
-		ExpectedBazelTargets: makeCcLibraryTargets("a", AttrNameToString{
-			"export_includes": `select({
-        "//build/bazel_common_rules/platforms/os_arch:android_arm": [
-            "android_arm_eid1",
-            "android_arm_eid2",
-        ],
-        "//conditions:default": [],
-    }) + select({
-        "//build/bazel_common_rules/platforms/os:android": [
-            "android_eid1",
-            "android_eid2",
-            "linux_eid1",
-            "linux_eid2",
-        ],
-        "//build/bazel_common_rules/platforms/os:linux_bionic": [
-            "linux_eid1",
-            "linux_eid2",
-        ],
-        "//build/bazel_common_rules/platforms/os:linux_glibc": [
-            "linux_eid1",
-            "linux_eid2",
-        ],
-        "//build/bazel_common_rules/platforms/os:linux_musl": [
-            "linux_eid1",
-            "linux_eid2",
-        ],
-        "//conditions:default": [],
-    }) + select({
-        "//build/bazel_common_rules/platforms/arch:arm": [
-            "lib32_eid1",
-            "lib32_eid2",
-            "arm_eid1",
-            "arm_eid2",
-        ],
-        "//build/bazel_common_rules/platforms/arch:x86": [
-            "lib32_eid1",
-            "lib32_eid2",
-        ],
-        "//conditions:default": [],
-    }) + [
-        "eid1",
-        "eid2",
-    ]`,
-			"export_system_includes": `select({
-        "//build/bazel_common_rules/platforms/os_arch:android_arm": [
-            "android_arm_esid1",
-            "android_arm_esid2",
-        ],
-        "//conditions:default": [],
-    }) + select({
-        "//build/bazel_common_rules/platforms/os:android": [
-            "android_esid1",
-            "android_esid2",
-            "linux_esid1",
-            "linux_esid2",
-        ],
-        "//build/bazel_common_rules/platforms/os:linux_bionic": [
-            "linux_esid1",
-            "linux_esid2",
-        ],
-        "//build/bazel_common_rules/platforms/os:linux_glibc": [
-            "linux_esid1",
-            "linux_esid2",
-        ],
-        "//build/bazel_common_rules/platforms/os:linux_musl": [
-            "linux_esid1",
-            "linux_esid2",
-        ],
-        "//conditions:default": [],
-    }) + select({
-        "//build/bazel_common_rules/platforms/arch:arm": [
-            "lib32_esid1",
-            "lib32_esid2",
-            "arm_esid1",
-            "arm_esid2",
-        ],
-        "//build/bazel_common_rules/platforms/arch:x86": [
-            "lib32_esid1",
-            "lib32_esid2",
-        ],
-        "//conditions:default": [],
-    }) + [
-        "esid1",
-        "esid2",
-    ]`,
-			"srcs":                   `["a.cpp"]`,
-			"local_includes":         `["."]`,
-			"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
-		}),
-	},
-	)
-}
-
-func TestCcLibraryWithIntegerOverflowProperty(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library has correct features when integer_overflow property is provided",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-cc_library {
-		name: "foo",
-		sanitize: {
-				integer_overflow: true,
-		},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"features":       `["ubsan_integer_overflow"]`,
-				"local_includes": `["."]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"features":       `["ubsan_integer_overflow"]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryWithMiscUndefinedProperty(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library has correct features when misc_undefined property is provided",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-cc_library {
-		name: "foo",
-		sanitize: {
-				misc_undefined: ["undefined", "nullability"],
-		},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"features": `[
-        "ubsan_undefined",
-        "ubsan_nullability",
-    ]`,
-				"local_includes": `["."]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"features": `[
-        "ubsan_undefined",
-        "ubsan_nullability",
-    ]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryWithSanitizerBlocklist(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library has correct feature when sanitize.blocklist is provided",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-cc_library {
-		name: "foo",
-		sanitize: {
-			blocklist: "foo_blocklist.txt",
-		},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"copts": `select({
-        "//build/bazel/rules/cc:sanitizers_enabled": ["-fsanitize-ignorelist=$(location foo_blocklist.txt)"],
-        "//conditions:default": [],
-    })`,
-				"additional_compiler_inputs": `select({
-        "//build/bazel/rules/cc:sanitizers_enabled": [":foo_blocklist.txt"],
-        "//conditions:default": [],
-    })`,
-				"local_includes": `["."]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"copts": `select({
-        "//build/bazel/rules/cc:sanitizers_enabled": ["-fsanitize-ignorelist=$(location foo_blocklist.txt)"],
-        "//conditions:default": [],
-    })`,
-				"additional_compiler_inputs": `select({
-        "//build/bazel/rules/cc:sanitizers_enabled": [":foo_blocklist.txt"],
-        "//conditions:default": [],
-    })`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryWithUBSanPropertiesArchSpecific(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library has correct feature select when UBSan props are specified in arch specific blocks",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-cc_library {
-		name: "foo",
-		sanitize: {
-				misc_undefined: ["undefined", "nullability"],
-		},
-		target: {
-				android: {
-						sanitize: {
-								misc_undefined: ["alignment"],
-						},
-				},
-				linux_glibc: {
-						sanitize: {
-								integer_overflow: true,
-						},
-				},
-		},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"features": `[
-        "ubsan_undefined",
-        "ubsan_nullability",
-    ] + select({
-        "//build/bazel_common_rules/platforms/os:android": ["ubsan_alignment"],
-        "//build/bazel_common_rules/platforms/os:linux_glibc": ["ubsan_integer_overflow"],
-        "//conditions:default": [],
-    })`,
-				"local_includes": `["."]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"features": `[
-        "ubsan_undefined",
-        "ubsan_nullability",
-    ] + select({
-        "//build/bazel_common_rules/platforms/os:android": ["ubsan_alignment"],
-        "//build/bazel_common_rules/platforms/os:linux_glibc": ["ubsan_integer_overflow"],
-        "//conditions:default": [],
-    })`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryInApexWithStubSharedLibs(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library with in apex with stub shared_libs and export_shared_lib_headers",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		StubbedBuildDefinitions:    []string{"barlib", "bazlib"},
-		Blueprint: `
-cc_library {
-	name: "barlib",
-	stubs: { symbol_file: "bar.map.txt", versions: ["28", "29", "current"] },
-	apex_available: ["//apex_available:platform",],
-}
-cc_library {
-	name: "bazlib",
-	stubs: { symbol_file: "bar.map.txt", versions: ["28", "29", "current"] },
-	apex_available: ["//apex_available:platform",],
-}
-cc_library {
-    name: "foo",
-	  shared_libs: ["barlib", "bazlib"],
-    export_shared_lib_headers: ["bazlib"],
-    apex_available: [
-        "//apex_available:platform",
-    ],
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"implementation_dynamic_deps": `[":barlib"]`,
-				"dynamic_deps":                `[":bazlib"]`,
-				"local_includes":              `["."]`,
-				"tags":                        `["apex_available=//apex_available:platform"]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"implementation_dynamic_deps": `[":barlib"]`,
-				"dynamic_deps":                `[":bazlib"]`,
-				"local_includes":              `["."]`,
-				"tags":                        `["apex_available=//apex_available:platform"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryWithThinLto(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library has correct features when thin LTO is enabled",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-cc_library {
-	name: "foo",
-	lto: {
-		thin: true,
-	},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"features":       `["android_thin_lto"]`,
-				"local_includes": `["."]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"features":       `["android_thin_lto"]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryWithLtoNever(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library has correct features when LTO is explicitly disabled",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-cc_library {
-	name: "foo",
-	lto: {
-		never: true,
-	},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"features":       `["-android_thin_lto"]`,
-				"local_includes": `["."]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"features":       `["-android_thin_lto"]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryWithThinLtoArchSpecific(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library has correct features when LTO differs across arch and os variants",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-cc_library {
-	name: "foo",
-	target: {
-		android: {
-			lto: {
-				thin: true,
-			},
-		},
-	},
-	arch: {
-		riscv64: {
-			lto: {
-				thin: false,
-			},
-		},
-	},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"local_includes": `["."]`,
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os_arch:android_arm": ["android_thin_lto"],
-        "//build/bazel_common_rules/platforms/os_arch:android_arm64": ["android_thin_lto"],
-        "//build/bazel_common_rules/platforms/os_arch:android_riscv64": ["-android_thin_lto"],
-        "//build/bazel_common_rules/platforms/os_arch:android_x86": ["android_thin_lto"],
-        "//build/bazel_common_rules/platforms/os_arch:android_x86_64": ["android_thin_lto"],
-        "//conditions:default": [],
-    })`}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"local_includes": `["."]`,
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os_arch:android_arm": ["android_thin_lto"],
-        "//build/bazel_common_rules/platforms/os_arch:android_arm64": ["android_thin_lto"],
-        "//build/bazel_common_rules/platforms/os_arch:android_riscv64": ["-android_thin_lto"],
-        "//build/bazel_common_rules/platforms/os_arch:android_x86": ["android_thin_lto"],
-        "//build/bazel_common_rules/platforms/os_arch:android_x86_64": ["android_thin_lto"],
-        "//conditions:default": [],
-    })`}),
-		},
-	})
-}
-
-func TestCcLibraryWithThinLtoDisabledDefaultEnabledVariant(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library has correct features when LTO disabled by default but enabled on a particular variant",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-cc_library {
-	name: "foo",
-	lto: {
-		never: true,
-	},
-	target: {
-		android: {
-			lto: {
-				thin: true,
-				never: false,
-			},
-		},
-	},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"local_includes": `["."]`,
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["android_thin_lto"],
-        "//conditions:default": ["-android_thin_lto"],
-    })`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"local_includes": `["."]`,
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["android_thin_lto"],
-        "//conditions:default": ["-android_thin_lto"],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryWithThinLtoWholeProgramVtables(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library has correct features when thin LTO is enabled with whole_program_vtables",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-cc_library {
-	name: "foo",
-	lto: {
-		thin: true,
-	},
-	whole_program_vtables: true,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"features": `[
-        "android_thin_lto",
-        "android_thin_lto_whole_program_vtables",
-    ]`,
-				"local_includes": `["."]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"features": `[
-        "android_thin_lto",
-        "android_thin_lto_whole_program_vtables",
-    ]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryHiddenVisibilityConvertedToFeature(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library changes hidden visibility flag to feature",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-cc_library {
-	name: "foo",
-	cflags: ["-fvisibility=hidden"],
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"features":       `["visibility_hidden"]`,
-				"local_includes": `["."]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"features":       `["visibility_hidden"]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryHiddenVisibilityConvertedToFeatureSharedSpecific(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library changes hidden visibility flag to feature when specific to shared variant",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-cc_library {
-	name: "foo",
-	shared: {
-		cflags: ["-fvisibility=hidden"],
-	},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"local_includes": `["."]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"features":       `["visibility_hidden"]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryHiddenVisibilityConvertedToFeatureStaticSpecific(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library changes hidden visibility flag to feature when specific to static variant",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-cc_library {
-	name: "foo",
-	static: {
-		cflags: ["-fvisibility=hidden"],
-	},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"features":       `["visibility_hidden"]`,
-				"local_includes": `["."]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryHiddenVisibilityConvertedToFeatureOsSpecific(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library changes hidden visibility flag to feature when specific to an os",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-cc_library {
-	name: "foo",
-	target: {
-		android: {
-			cflags: ["-fvisibility=hidden"],
-		},
-	},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["visibility_hidden"],
-        "//conditions:default": [],
-    })`,
-				"local_includes": `["."]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["visibility_hidden"],
-        "//conditions:default": [],
-    })`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-// Test that a config_setting specific to an apex is created by cc_library.
-func TestCcLibraryCreatesInApexConfigSetting(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library creates a config_setting for each apex in apex_available",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Dir:                        "build/bazel/rules/apex",
-		Blueprint: `
-cc_library {
-	name: "foo",
-	apex_available: [
-	"//apex_available:platform", // This will be skipped, since it is equivalent to //build/bazel/rules/apex:android-non_apex
-	"myapex"
-	],
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTargetNoRestrictions(
-				"config_setting",
-				"myapex",
-				AttrNameToString{
-					"flag_values": `{
-        "//build/bazel/rules/apex:api_domain": "myapex",
-    }`,
-					"constraint_values": `["//build/bazel_common_rules/platforms/os:android"]`,
-				},
-			),
-		},
-	})
-}
-
-func TestCcLibraryCppFlagsInProductVariables(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library cppflags in product variables",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: soongCcLibraryPreamble + `cc_library {
-    name: "a",
-    srcs: ["a.cpp"],
-    cppflags: [
-        "-Wextra",
-        "-DDEBUG_ONLY_CODE=0",
-    ],
-    product_variables: {
-        eng: {
-            cppflags: [
-                "-UDEBUG_ONLY_CODE",
-                "-DDEBUG_ONLY_CODE=1",
-            ],
-        },
-    },
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: makeCcLibraryTargets("a", AttrNameToString{
-			"cppflags": `[
-        "-Wextra",
-        "-DDEBUG_ONLY_CODE=0",
-    ] + select({
-        "//build/bazel/product_config/config_settings:eng": [
-            "-UDEBUG_ONLY_CODE",
-            "-DDEBUG_ONLY_CODE=1",
-        ],
-        "//conditions:default": [],
-    })`,
-			"srcs": `["a.cpp"]`,
-		}),
-	},
-	)
-}
-
-func TestCcLibraryYaccConversion(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library is built from .y/.yy files",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		StubbedBuildDefinitions:    []string{"staticlib", "sharedlib"},
-		Blueprint: soongCcLibraryPreamble + `cc_library {
-    name: "a",
-    srcs: [
-	"a.cpp",
-	"a.yy",
-    ],
-    shared_libs: ["sharedlib"],
-    static_libs: ["staticlib"],
-    yacc: {
-	    flags: ["someYaccFlag"],
-	    gen_location_hh: true,
-	    gen_position_hh: true,
-	},
-}
-cc_library_static {
-	name: "staticlib",
-}
-cc_library {
-	name: "sharedlib",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_yacc_static_library", "a_yacc", AttrNameToString{
-				"src":                         `"a.yy"`,
-				"implementation_deps":         `[":staticlib"]`,
-				"implementation_dynamic_deps": `[":sharedlib"]`,
-				"flags":                       `["someYaccFlag"]`,
-				"gen_location_hh":             "True",
-				"gen_position_hh":             "True",
-				"local_includes":              `["."]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "a", AttrNameToString{
-				"srcs":                              `["a.cpp"]`,
-				"implementation_deps":               `[":staticlib"]`,
-				"implementation_dynamic_deps":       `[":sharedlib"]`,
-				"implementation_whole_archive_deps": `[":a_yacc"]`,
-				"local_includes":                    `["."]`,
-			}),
-			MakeBazelTarget("cc_library_static", "a_bp2build_cc_library_static", AttrNameToString{
-				"srcs":                              `["a.cpp"]`,
-				"implementation_deps":               `[":staticlib"]`,
-				"implementation_dynamic_deps":       `[":sharedlib"]`,
-				"implementation_whole_archive_deps": `[":a_yacc"]`,
-				"local_includes":                    `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryHostLdLibs(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_binary linker flags for host_ldlibs",
-		ModuleTypeUnderTest:        "cc_binary",
-		ModuleTypeUnderTestFactory: cc.BinaryFactory,
-		Blueprint: soongCcLibraryPreamble + `cc_binary {
-    name: "a",
-    host_supported: true,
-    ldflags: ["-lcommon"],
-    target: {
-	linux: {
-		host_ldlibs: [
-			"-llinux",
-		],
-	},
-	darwin: {
-		ldflags: ["-ldarwinadditional"],
-		host_ldlibs: [
-			"-ldarwin",
-		],
-	},
-	windows: {
-		host_ldlibs: [
-			"-lwindows",
-		],
-	},
-    },
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTargetNoRestrictions("cc_binary", "a", AttrNameToString{
-				"linkopts": `["-lcommon"] + select({
-        "//build/bazel_common_rules/platforms/os:darwin": [
-            "-ldarwinadditional",
-            "-ldarwin",
-        ],
-        "//build/bazel_common_rules/platforms/os:linux_glibc": ["-llinux"],
-        "//build/bazel_common_rules/platforms/os:windows": ["-lwindows"],
-        "//conditions:default": [],
-    })`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryWithCfi(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library has correct features when cfi is enabled",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-cc_library {
-	name: "foo",
-	sanitize: {
-		cfi: true,
-	},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"features":       `["android_cfi"]`,
-				"local_includes": `["."]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"features":       `["android_cfi"]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryWithCfiOsSpecific(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library has correct features when cfi is enabled for specific variants",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-cc_library {
-	name: "foo",
-	target: {
-		android: {
-			sanitize: {
-				cfi: true,
-			},
-		},
-	},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["android_cfi"],
-        "//conditions:default": [],
-    })`,
-				"local_includes": `["."]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["android_cfi"],
-        "//conditions:default": [],
-    })`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryWithCfiAndCfiAssemblySupport(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library has correct features when cfi is enabled with cfi_assembly_support",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-cc_library {
-	name: "foo",
-	sanitize: {
-		cfi: true,
-		config: {
-			cfi_assembly_support: true,
-		},
-	},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"features": `[
-        "android_cfi",
-        "android_cfi_assembly_support",
-    ]`,
-				"local_includes": `["."]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"features": `[
-        "android_cfi",
-        "android_cfi_assembly_support",
-    ]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryExplicitlyDisablesCfiWhenFalse(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library disables cfi when explciitly set to false in the bp",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-cc_library {
-	name: "foo",
-	sanitize: {
-		cfi: false,
-	},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_bp2build_cc_library_static", AttrNameToString{
-				"features":       `["-android_cfi"]`,
-				"local_includes": `["."]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"features":       `["-android_cfi"]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryWithStem(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library with stem property",
-		ModuleTypeUnderTest:        "cc_library_shared",
-		ModuleTypeUnderTestFactory: cc.LibrarySharedFactory,
-		Blueprint: soongCcLibraryPreamble + `
-cc_library_shared {
-	name: "foo_with_stem_simple",
-	stem: "foo",
-}
-cc_library_shared {
-	name: "foo_with_arch_variant_stem",
-	arch: {
-		arm: {
-			stem: "foo-arm",
-		},
-		arm64: {
-			stem: "foo-arm64",
-		},
-	},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo_with_stem_simple", AttrNameToString{
-				"stem":           `"foo"`,
-				"local_includes": `["."]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo_with_arch_variant_stem", AttrNameToString{
-				"stem": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": "foo-arm",
-        "//build/bazel_common_rules/platforms/arch:arm64": "foo-arm64",
-        "//conditions:default": None,
-    })`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-// Bazel enforces that proto_library and the .proto file are in the same bazel package
-func TestGenerateProtoLibraryInSamePackage(t *testing.T) {
-	tc := Bp2buildTestCase{
-		Description:                "cc_library depends on .proto files from multiple packages",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-cc_library_static {
-	name: "foo",
-	srcs: [
-	   "foo.proto",
-	   "bar/bar.proto", // Different package because there is a bar/Android.bp
-	   "baz/subbaz/baz.proto", // Different package because there is baz/subbaz/Android.bp
-	],
-	proto: {
-		canonical_path_from_root: true,
-	}
-}
-` + simpleModule("cc_library", "libprotobuf-cpp-lite"),
-		Filesystem: map[string]string{
-			"bar/Android.bp":        "",
-			"baz/subbaz/Android.bp": "",
-		},
-	}
-
-	// We will run the test 3 times and check in the root, bar and baz/subbaz directories
-	// Root dir
-	tc.ExpectedBazelTargets = []string{
-		MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-			"local_includes":                    `["."]`,
-			"deps":                              `[":libprotobuf-cpp-lite"]`,
-			"implementation_whole_archive_deps": `[":foo_cc_proto_lite"]`,
-		}),
-		MakeBazelTarget("proto_library", "foo_proto", AttrNameToString{
-			"srcs": `["foo.proto"]`,
-			"tags": `["manual"]`,
-		}),
-		MakeBazelTarget("cc_lite_proto_library", "foo_cc_proto_lite", AttrNameToString{
-			"deps": `[
-        ":foo_proto",
-        "//bar:foo_proto",
-        "//baz/subbaz:foo_proto",
-    ]`,
-		}),
-	}
-	runCcLibraryTestCase(t, tc)
-
-	// bar dir
-	tc.Dir = "bar"
-	tc.ExpectedBazelTargets = []string{
-		MakeBazelTarget("proto_library", "foo_proto", AttrNameToString{
-			"srcs": `["//bar:bar.proto"]`,
-			"tags": `["manual"]`,
-		}),
-	}
-	runCcLibraryTestCase(t, tc)
-
-	// baz/subbaz dir
-	tc.Dir = "baz/subbaz"
-	tc.ExpectedBazelTargets = []string{
-		MakeBazelTarget("proto_library", "foo_proto", AttrNameToString{
-			"srcs": `["//baz/subbaz:baz.proto"]`,
-			"tags": `["manual"]`,
-		}),
-	}
-	runCcLibraryTestCase(t, tc)
-}
-
-// Bazel enforces that proto_library and the .proto file are in the same bazel package
-func TestGenerateProtoLibraryInSamePackageNotCanonicalFromRoot(t *testing.T) {
-	tc := Bp2buildTestCase{
-		Description:                "cc_library depends on .proto files from multiple packages",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-cc_library_static {
-	name: "foo",
-	srcs: [
-	   "foo.proto",
-	   "bar/bar.proto", // Different package because there is a bar/Android.bp
-	   "baz/subbaz/baz.proto", // Different package because there is baz/subbaz/Android.bp
-	],
-	proto: {
-		canonical_path_from_root: false,
-	}
-}
-` + simpleModule("cc_library", "libprotobuf-cpp-lite"),
-		Filesystem: map[string]string{
-			"bar/Android.bp":        "",
-			"baz/subbaz/Android.bp": "",
-		},
-	}
-
-	// We will run the test 3 times and check in the root, bar and baz/subbaz directories
-	// Root dir
-	tc.ExpectedBazelTargets = []string{
-		MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-			"local_includes":                    `["."]`,
-			"deps":                              `[":libprotobuf-cpp-lite"]`,
-			"implementation_whole_archive_deps": `[":foo_cc_proto_lite"]`,
-		}),
-		MakeBazelTarget("proto_library", "foo_proto", AttrNameToString{
-			"srcs":                `["foo.proto"]`,
-			"strip_import_prefix": `""`,
-			"tags":                `["manual"]`,
-		}),
-		MakeBazelTarget("cc_lite_proto_library", "foo_cc_proto_lite", AttrNameToString{
-			"deps": `[
-        ":foo_proto",
-        "//bar:foo_proto",
-        "//baz/subbaz:foo_proto",
-    ]`,
-		}),
-	}
-	runCcLibraryTestCase(t, tc)
-
-	// bar dir
-	tc.Dir = "bar"
-	tc.ExpectedBazelTargets = []string{
-		MakeBazelTarget("proto_library", "foo_proto", AttrNameToString{
-			"srcs":                `["//bar:bar.proto"]`,
-			"strip_import_prefix": `""`,
-			"import_prefix":       `"bar"`,
-			"tags":                `["manual"]`,
-		}),
-	}
-	runCcLibraryTestCase(t, tc)
-
-	// baz/subbaz dir
-	tc.Dir = "baz/subbaz"
-	tc.ExpectedBazelTargets = []string{
-		MakeBazelTarget("proto_library", "foo_proto", AttrNameToString{
-			"srcs":                `["//baz/subbaz:baz.proto"]`,
-			"strip_import_prefix": `""`,
-			"import_prefix":       `"baz/subbaz"`,
-			"tags":                `["manual"]`,
-		}),
-	}
-	runCcLibraryTestCase(t, tc)
-}
-
-func TestProtoIncludeDirs(t *testing.T) {
-	tc := Bp2buildTestCase{
-		Description:                "cc_library depends on .proto files using proto.include_dirs",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-cc_library_static {
-	name: "foo",
-	srcs: [
-	   "foo.proto",
-	],
-	proto: {
-		include_dirs: ["bar"],
-	}
-}
-` + simpleModule("cc_library", "libprotobuf-cpp-lite"),
-		Filesystem: map[string]string{
-			"bar/Android.bp":     "",
-			"bar/bar.proto":      "",
-			"bar/baz/Android.bp": "",
-			"bar/baz/baz.proto":  "",
-		},
-	}
-
-	// We will run the test 3 times and check in the root, bar and bar/baz directories
-	// Root dir
-	tc.ExpectedBazelTargets = []string{
-		MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-			"local_includes":                    `["."]`,
-			"deps":                              `[":libprotobuf-cpp-lite"]`,
-			"implementation_whole_archive_deps": `[":foo_cc_proto_lite"]`,
-		}),
-		MakeBazelTarget("proto_library", "foo_proto", AttrNameToString{
-			"srcs": `["foo.proto"]`,
-			"tags": `["manual"]`,
-		}),
-		MakeBazelTarget("cc_lite_proto_library", "foo_cc_proto_lite", AttrNameToString{
-			"deps": `[":foo_proto"]`,
-			"transitive_deps": `[
-        "//bar:bar.include_dir_bp2build_generated_proto",
-        "//bar/baz:bar.include_dir_bp2build_generated_proto",
-    ]`,
-		}),
-	}
-	runCcLibraryTestCase(t, tc)
-
-	// bar dir
-	tc.Dir = "bar"
-	tc.ExpectedBazelTargets = []string{
-		MakeBazelTargetNoRestrictions("proto_library", "bar.include_dir_bp2build_generated_proto", AttrNameToString{
-			"srcs":                `["bar.proto"]`,
-			"strip_import_prefix": `""`,
-			"tags":                `["manual"]`,
-		}),
-	}
-	runCcLibraryTestCase(t, tc)
-
-	// bar/baz dir
-	tc.Dir = "bar/baz"
-	tc.ExpectedBazelTargets = []string{
-		MakeBazelTargetNoRestrictions("proto_library", "bar.include_dir_bp2build_generated_proto", AttrNameToString{
-			"srcs":                `["//bar/baz:baz.proto"]`,
-			"strip_import_prefix": `""`,
-			"import_prefix":       `"baz"`,
-			"tags":                `["manual"]`,
-		}),
-	}
-	runCcLibraryTestCase(t, tc)
-}
-
-func TestProtoIncludeDirsWithSrcsInMultiplePackages(t *testing.T) {
-	tc := Bp2buildTestCase{
-		Description:                "cc_library has srcs in multiple bazel packages and uses proto.include_dirs",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-cc_library_static {
-	name: "foo",
-	srcs: [
-	   "foo.proto",
-	   "bar/bar.proto",
-	],
-	proto: {
-		include_dirs: ["baz"],
-	}
-}
-` + simpleModule("cc_library", "libprotobuf-cpp-lite"),
-		Filesystem: map[string]string{
-			"bar/Android.bp": "", // package boundary
-			"baz/Android.bp": "",
-			"baz/baz.proto":  "",
-		},
-	}
-
-	tc.ExpectedBazelTargets = []string{
-		MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-			"local_includes":                    `["."]`,
-			"deps":                              `[":libprotobuf-cpp-lite"]`,
-			"implementation_whole_archive_deps": `[":foo_cc_proto_lite"]`,
-		}),
-		MakeBazelTarget("proto_library", "foo_proto", AttrNameToString{
-			"srcs": `["foo.proto"]`,
-			"tags": `["manual"]`,
-		}),
-		MakeBazelTarget("cc_lite_proto_library", "foo_cc_proto_lite", AttrNameToString{
-			"deps": `[
-        ":foo_proto",
-        "//bar:foo_proto",
-    ]`,
-			"transitive_deps": `["//baz:baz.include_dir_bp2build_generated_proto"]`,
-		}),
-	}
-	runCcLibraryTestCase(t, tc)
-
-}
-
-func TestProtoLocalIncludeDirs(t *testing.T) {
-	tc := Bp2buildTestCase{
-		Description:                "cc_library depends on .proto files using proto.local_include_dirs",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-cc_library {
-	name: "libprotobuf-cpp-lite",
-  // TODO: b/285631638 - A stubbed proto library dependency does not work as a protolib
-  // dependency of cc_library_static.
-	bazel_module: { bp2build_available: false },
-}
-`,
-		Filesystem: map[string]string{
-			"foo/Android.bp": `cc_library_static {
-	name: "foo",
-	srcs: [
-	   "foo.proto",
-	],
-	proto: {
-		local_include_dirs: ["foo_subdir"],
-	},
-	bazel_module: { bp2build_available: true },
-}`,
-			"foo/foo.proto":                   "",
-			"foo/foo_subdir/Android.bp":       "",
-			"foo/foo_subdir/foo_subdir.proto": "",
-		},
-	}
-
-	// We will run the test 2 times and check in foo and foo/foo_subdir directories
-	// foo dir
-	tc.Dir = "foo"
-	tc.ExpectedBazelTargets = []string{
-		MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-			"local_includes":                    `["."]`,
-			"deps":                              `["//:libprotobuf-cpp-lite"]`,
-			"implementation_whole_archive_deps": `[":foo_cc_proto_lite"]`,
-		}),
-		MakeBazelTarget("proto_library", "foo_proto", AttrNameToString{
-			"srcs": `["foo.proto"]`,
-			"tags": `["manual"]`,
-		}),
-		MakeBazelTarget("cc_lite_proto_library", "foo_cc_proto_lite", AttrNameToString{
-			"deps":            `[":foo_proto"]`,
-			"transitive_deps": `["//foo/foo_subdir:foo.foo_subdir.include_dir_bp2build_generated_proto"]`,
-		}),
-	}
-	runCcLibraryTestCase(t, tc)
-
-	// foo/foo_subdir
-	tc.Dir = "foo/foo_subdir"
-	tc.ExpectedBazelTargets = []string{
-		MakeBazelTargetNoRestrictions("proto_library", "foo.foo_subdir.include_dir_bp2build_generated_proto", AttrNameToString{
-			"srcs":                `["foo_subdir.proto"]`,
-			"strip_import_prefix": `""`,
-			"tags":                `["manual"]`,
-		}),
-	}
-	runCcLibraryTestCase(t, tc)
-}
-
-// `foo_device` and `bar_host` can depend on .proto files of a specific dir,
-// the dynamically generated proto_library should not have any target_compatible_with
-func TestProtoLibraryForIncludeDirsIsOsAgnostic(t *testing.T) {
-	tc := Bp2buildTestCase{
-		Description:                "proto_library generated for proto.include_dirs is compatible for all axes",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: simpleModule("cc_library", "libprotobuf-cpp-lite") + `
-cc_library {
-	name: "foo_device",
-	device_supported: true, // this is the default behavior, but added explicitly here for illustration
-	host_supported: false,
-	proto: {include_dirs: ["dir"]},
-}
-cc_library {
-	name: "bar_host",
-	device_supported: false,
-	host_supported: true,
-	srcs: ["bar.proto"],
-	proto: {include_dirs: ["dir"]},
-}
-`,
-		Filesystem: map[string]string{
-			"dir/Android.bp": "",
-			"dir/dir.proto":  "",
-		},
-		Dir: "dir", // check for the generated proto_library
-		ExpectedBazelTargets: []string{
-			MakeBazelTargetNoRestrictions("proto_library", "dir.include_dir_bp2build_generated_proto", AttrNameToString{
-				"srcs":                `["dir.proto"]`,
-				"strip_import_prefix": `""`,
-				"tags":                `["manual"]`,
-			}),
-		},
-	}
-	runCcLibraryTestCase(t, tc)
-}
-
-func TestCcCompileMultilibConversion(t *testing.T) {
-	tc := Bp2buildTestCase{
-		Description:                "cc_library with compile_multilib",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-cc_library {
-	name: "lib32",
-	compile_multilib: "32",
-}
-cc_library {
-	name: "lib64",
-	compile_multilib: "64",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTargetNoRestrictions("cc_library_shared", "lib32", AttrNameToString{
-				"local_includes": `["."]`,
-				"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"] + select({
-        "//build/bazel_common_rules/platforms/arch:arm64": ["@platforms//:incompatible"],
-        "//build/bazel_common_rules/platforms/arch:riscv64": ["@platforms//:incompatible"],
-        "//build/bazel_common_rules/platforms/arch:x86_64": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-			MakeBazelTargetNoRestrictions("cc_library_static", "lib32_bp2build_cc_library_static", AttrNameToString{
-				"local_includes": `["."]`,
-				"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"] + select({
-        "//build/bazel_common_rules/platforms/arch:arm64": ["@platforms//:incompatible"],
-        "//build/bazel_common_rules/platforms/arch:riscv64": ["@platforms//:incompatible"],
-        "//build/bazel_common_rules/platforms/arch:x86_64": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-			MakeBazelTargetNoRestrictions("cc_library_shared", "lib64", AttrNameToString{
-				"local_includes": `["."]`,
-				"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"] + select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["@platforms//:incompatible"],
-        "//build/bazel_common_rules/platforms/arch:x86": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-			MakeBazelTargetNoRestrictions("cc_library_static", "lib64_bp2build_cc_library_static", AttrNameToString{
-				"local_includes": `["."]`,
-				"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"] + select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["@platforms//:incompatible"],
-        "//build/bazel_common_rules/platforms/arch:x86": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	}
-	runCcLibraryTestCase(t, tc)
-}
-
-func TestNdkLibraryConversion(t *testing.T) {
-	tc := Bp2buildTestCase{
-		Description:                "ndk_library conversion",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-cc_library {
-	name: "libfoo",
-}
-ndk_library {
-	name: "libfoo",
-	first_version: "29",
-	symbol_file: "libfoo.map.txt",
-}
-`,
-		StubbedBuildDefinitions: []string{"libfoo"},
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_stub_suite", "libfoo.ndk_stub_libs", AttrNameToString{
-				"api_surface":          `"publicapi"`,
-				"included_in_ndk":      `True`,
-				"soname":               `"libfoo.so"`,
-				"source_library_label": `"//:libfoo"`,
-				"symbol_file":          `"libfoo.map.txt"`,
-				"versions": `[
-        "29",
-        "30",
-        "S",
-        "Tiramisu",
-        "current",
-    ]`,
-			}),
-		},
-	}
-	runCcLibraryTestCase(t, tc)
-}
-
-func TestNdkHeadersConversion(t *testing.T) {
-	tc := Bp2buildTestCase{
-		Description:                "ndk_headers conversion",
-		ModuleTypeUnderTest:        "ndk_headers",
-		ModuleTypeUnderTestFactory: cc.NdkHeadersFactory,
-		Blueprint: `
-ndk_headers {
-	name: "libfoo_headers",
-	from: "from",
-	to: "to",
-	srcs: ["foo.h", "foo_other.h"]
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTargetNoRestrictions("ndk_headers", "libfoo_headers", AttrNameToString{
-				"strip_import_prefix": `"from"`,
-				"import_prefix":       `"to"`,
-				"hdrs": `[
-        "foo.h",
-        "foo_other.h",
-    ]`,
-			}),
-		},
-	}
-	runCcLibraryTestCase(t, tc)
-}
-
-func TestVersionedNdkHeadersConversion(t *testing.T) {
-	tc := Bp2buildTestCase{
-		Description:                "versioned_ndk_headers conversion",
-		ModuleTypeUnderTest:        "versioned_ndk_headers",
-		ModuleTypeUnderTestFactory: cc.VersionedNdkHeadersFactory,
-		Blueprint: `
-versioned_ndk_headers {
-	name: "libfoo_headers",
-	from: "from",
-	to: "to",
-}
-`,
-		Filesystem: map[string]string{
-			"from/foo.h":       "",
-			"from/foo_other.h": "",
-		},
-		ExpectedBazelTargets: []string{
-			MakeBazelTargetNoRestrictions("ndk_headers", "libfoo_headers", AttrNameToString{
-				"strip_import_prefix": `"from"`,
-				"import_prefix":       `"to"`,
-				"hdrs": `[
-        "from/foo.h",
-        "from/foo_other.h",
-    ]`,
-				"run_versioner": "True",
-			}),
-		},
-	}
-	runCcLibraryTestCase(t, tc)
-}
-
-// Regression test for b/303307456.
-// TODO: b/202299295 - Remove this test when cc rules have proper support
-// for the `required` property
-func TestCcModules_requiredProperty(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc modules do not use the required property",
-		Filesystem: map[string]string{
-			"foo.c": "",
-			"bar.c": "",
-		},
-		Blueprint: soongCcLibraryPreamble + `
-cc_library {
-    name: "foo_both",
-    srcs: ["foo.c"],
-    include_build_directory: false,
-    required: ["bar"],
-}
-cc_library_shared {
-    name: "foo_shared",
-    srcs: ["foo.c"],
-    include_build_directory: false,
-    required: ["bar"],
-}
-cc_library_static {
-    name: "foo_static",
-    srcs: ["foo.c"],
-    include_build_directory: false,
-    required: ["bar"],
-}
-cc_library_static {
-    name: "bar",
-    srcs: ["bar.c"],
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_both_bp2build_cc_library_static", AttrNameToString{
-				"srcs_c": `["foo.c"]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo_both", AttrNameToString{
-				"srcs_c": `["foo.c"]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo_shared", AttrNameToString{
-				"srcs_c": `["foo.c"]`,
-			}),
-			MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
-				"srcs_c": `["foo.c"]`,
-			}),
-			MakeBazelTarget("cc_library_static", "bar", AttrNameToString{
-				"srcs_c": `["bar.c"]`,
-			}),
-		},
-	})
-}
-
-func TestPropertiesIfStubLibraryIsInNdk(t *testing.T) {
-	tc := Bp2buildTestCase{
-		Description:                "If an equivalent ndk_library exists, set included_in_ndk=true for module-libapi stubs",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Blueprint: `
-// libfoo is an ndk library and contributes to module-libapi
-cc_library {
-	name: "libfoo",
-	stubs: {symbol_file: "libfoo.map.txt"},
-}
-ndk_library {
-	name: "libfoo",
-	first_version: "29",
-	symbol_file: "libfoo.map.txt",
-}
-// libbar is not an ndk library, but contributes to module-libapi
-cc_library {
-	name: "libbar",
-	stubs: {symbol_file: "libbar.map.txt"},
-}
-`,
-		StubbedBuildDefinitions: []string{"libfoo.ndk"},
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "libfoo_bp2build_cc_library_static", AttrNameToString{
-				"local_includes": `["."]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "libfoo", AttrNameToString{
-				"local_includes":    `["."]`,
-				"stubs_symbol_file": `"libfoo.map.txt"`,
-			}),
-			MakeBazelTarget("cc_stub_suite", "libfoo_stub_libs", AttrNameToString{
-				"api_surface":          `"module-libapi"`,
-				"soname":               `"libfoo.so"`,
-				"source_library_label": `"//:libfoo"`,
-				"symbol_file":          `"libfoo.map.txt"`,
-				"versions":             `["current"]`,
-				"included_in_ndk":      `True`,
-			}),
-			MakeBazelTarget("cc_library_static", "libbar_bp2build_cc_library_static", AttrNameToString{
-				"local_includes": `["."]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "libbar", AttrNameToString{
-				"local_includes":    `["."]`,
-				"stubs_symbol_file": `"libbar.map.txt"`,
-			}),
-			MakeBazelTarget("cc_stub_suite", "libbar_stub_libs", AttrNameToString{
-				"api_surface":          `"module-libapi"`,
-				"soname":               `"libbar.so"`,
-				"source_library_label": `"//:libbar"`,
-				"symbol_file":          `"libbar.map.txt"`,
-				"versions":             `["current"]`,
-			}),
-		},
-	}
-	runCcLibraryTestCase(t, tc)
-}
diff --git a/bp2build/cc_library_headers_conversion_test.go b/bp2build/cc_library_headers_conversion_test.go
deleted file mode 100644
index 7655986..0000000
--- a/bp2build/cc_library_headers_conversion_test.go
+++ /dev/null
@@ -1,486 +0,0 @@
-// Copyright 2021 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"testing"
-
-	"android/soong/android"
-	"android/soong/cc"
-)
-
-const (
-	// See cc/testing.go for more context
-	soongCcLibraryHeadersPreamble = `
-cc_defaults {
-    name: "linux_bionic_supported",
-}`
-)
-
-func TestCcLibraryHeadersLoadStatement(t *testing.T) {
-	testCases := []struct {
-		bazelTargets           BazelTargets
-		expectedLoadStatements string
-	}{
-		{
-			bazelTargets: BazelTargets{
-				BazelTarget{
-					name:      "cc_library_headers_target",
-					ruleClass: "cc_library_headers",
-					// Note: no bzlLoadLocation for native rules
-				},
-			},
-			expectedLoadStatements: ``,
-		},
-	}
-
-	for _, testCase := range testCases {
-		actual := testCase.bazelTargets.LoadStatements()
-		expected := testCase.expectedLoadStatements
-		if actual != expected {
-			t.Fatalf("Expected load statements to be %s, got %s", expected, actual)
-		}
-	}
-}
-
-func registerCcLibraryHeadersModuleTypes(ctx android.RegistrationContext) {
-	cc.RegisterCCBuildComponents(ctx)
-	cc.RegisterLibraryHeadersBuildComponents(ctx)
-	ctx.RegisterModuleType("cc_library_shared", cc.LibrarySharedFactory)
-}
-
-func runCcLibraryHeadersTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	RunBp2BuildTestCase(t, registerCcLibraryHeadersModuleTypes, tc)
-}
-
-func TestCcLibraryHeadersSimple(t *testing.T) {
-	runCcLibraryHeadersTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_headers test",
-		Filesystem: map[string]string{
-			"dir-1/dir1a.h":                        "",
-			"dir-1/dir1b.h":                        "",
-			"dir-2/dir2a.h":                        "",
-			"dir-2/dir2b.h":                        "",
-			"arch_arm64_exported_include_dir/a.h":  "",
-			"arch_x86_exported_include_dir/b.h":    "",
-			"arch_x86_64_exported_include_dir/c.h": "",
-		},
-		Blueprint: soongCcLibraryHeadersPreamble + `
-cc_library_headers {
-    name: "foo_headers",
-    export_include_dirs: ["dir-1", "dir-2"],
-
-    arch: {
-        arm64: {
-      // We expect dir-1 headers to be dropped, because dir-1 is already in export_include_dirs
-            export_include_dirs: ["arch_arm64_exported_include_dir", "dir-1"],
-        },
-        x86: {
-            export_include_dirs: ["arch_x86_exported_include_dir"],
-        },
-        x86_64: {
-            export_include_dirs: ["arch_x86_64_exported_include_dir"],
-        },
-    },
-    sdk_version: "current",
-    min_sdk_version: "29",
-
-    // TODO: Also support export_header_lib_headers
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_headers", "foo_headers", AttrNameToString{
-				"export_includes": `select({
-        "//build/bazel_common_rules/platforms/arch:arm64": ["arch_arm64_exported_include_dir"],
-        "//build/bazel_common_rules/platforms/arch:x86": ["arch_x86_exported_include_dir"],
-        "//build/bazel_common_rules/platforms/arch:x86_64": ["arch_x86_64_exported_include_dir"],
-        "//conditions:default": [],
-    }) + [
-        "dir-1",
-        "dir-2",
-    ]`,
-				"sdk_version":     `"current"`,
-				"min_sdk_version": `"29"`,
-				"deps": `select({
-        "//build/bazel/rules/apex:unbundled_app": ["//build/bazel/rules/cc:ndk_sysroot"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-// header_libs has "variant_prepend" tag. In bp2build output,
-// variant info(select) should go before general info.
-func TestCcLibraryHeadersOsSpecificHeader(t *testing.T) {
-	runCcLibraryHeadersTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_headers test with os-specific header_libs props",
-		Filesystem:  map[string]string{},
-		StubbedBuildDefinitions: []string{"android-lib", "base-lib", "darwin-lib",
-			"linux-lib", "linux_bionic-lib", "windows-lib"},
-		Blueprint: soongCcLibraryPreamble + `
-cc_library_headers {
-    name: "android-lib",
-}
-cc_library_headers {
-    name: "base-lib",
-}
-cc_library_headers {
-    name: "darwin-lib",
-}
-cc_library_headers {
-    name: "linux-lib",
-}
-cc_library_headers {
-    name: "linux_bionic-lib",
-}
-cc_library_headers {
-    name: "windows-lib",
-}
-cc_library_headers {
-    name: "foo_headers",
-    header_libs: ["base-lib"],
-		export_header_lib_headers: ["base-lib"],
-    target: {
-        android: {
-						header_libs: ["android-lib"],
-						export_header_lib_headers: ["android-lib"],
-				},
-        darwin: {
-						header_libs: ["darwin-lib"],
-						export_header_lib_headers: ["darwin-lib"],
-				},
-        linux_bionic: {
-						header_libs: ["linux_bionic-lib"],
-						export_header_lib_headers: ["linux_bionic-lib"],
-				},
-        linux_glibc: {
-						header_libs: ["linux-lib"],
-						export_header_lib_headers: ["linux-lib"],
-				},
-        windows: {
-						header_libs: ["windows-lib"],
-						export_header_lib_headers: ["windows-lib"],
-				},
-    },
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_headers", "foo_headers", AttrNameToString{
-				"deps": `select({
-        "//build/bazel_common_rules/platforms/os:android": [":android-lib"],
-        "//build/bazel_common_rules/platforms/os:darwin": [":darwin-lib"],
-        "//build/bazel_common_rules/platforms/os:linux_bionic": [":linux_bionic-lib"],
-        "//build/bazel_common_rules/platforms/os:linux_glibc": [":linux-lib"],
-        "//build/bazel_common_rules/platforms/os:windows": [":windows-lib"],
-        "//conditions:default": [],
-    }) + [":base-lib"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryHeadersOsSpecficHeaderLibsExportHeaderLibHeaders(t *testing.T) {
-	runCcLibraryHeadersTestCase(t, Bp2buildTestCase{
-		Description:             "cc_library_headers test with os-specific header_libs and export_header_lib_headers props",
-		Filesystem:              map[string]string{},
-		StubbedBuildDefinitions: []string{"android-lib", "exported-lib"},
-		Blueprint: soongCcLibraryPreamble + `
-cc_library_headers {
-    name: "android-lib",
-  }
-cc_library_headers {
-    name: "exported-lib",
-}
-cc_library_headers {
-    name: "foo_headers",
-    target: {
-        android: {
-            header_libs: ["android-lib", "exported-lib"],
-            export_header_lib_headers: ["exported-lib"]
-        },
-    },
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_headers", "foo_headers", AttrNameToString{
-				"deps": `select({
-        "//build/bazel_common_rules/platforms/os:android": [":exported-lib"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryHeadersArchAndTargetExportSystemIncludes(t *testing.T) {
-	runCcLibraryHeadersTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_headers test with arch-specific and target-specific export_system_include_dirs props",
-		Filesystem:  map[string]string{},
-		Blueprint: soongCcLibraryPreamble + `cc_library_headers {
-    name: "foo_headers",
-    export_system_include_dirs: [
-        "shared_include_dir",
-    ],
-    target: {
-        android: {
-            export_system_include_dirs: [
-                "android_include_dir",
-            ],
-        },
-        linux_glibc: {
-            export_system_include_dirs: [
-                "linux_include_dir",
-            ],
-        },
-        darwin: {
-            export_system_include_dirs: [
-                "darwin_include_dir",
-            ],
-        },
-    },
-    arch: {
-        arm: {
-            export_system_include_dirs: [
-                "arm_include_dir",
-            ],
-        },
-        x86_64: {
-            export_system_include_dirs: [
-                "x86_64_include_dir",
-            ],
-        },
-    },
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_headers", "foo_headers", AttrNameToString{
-				"export_system_includes": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["android_include_dir"],
-        "//build/bazel_common_rules/platforms/os:darwin": ["darwin_include_dir"],
-        "//build/bazel_common_rules/platforms/os:linux_glibc": ["linux_include_dir"],
-        "//conditions:default": [],
-    }) + select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["arm_include_dir"],
-        "//build/bazel_common_rules/platforms/arch:x86_64": ["x86_64_include_dir"],
-        "//conditions:default": [],
-    }) + ["shared_include_dir"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryHeadersNoCrtIgnored(t *testing.T) {
-	runCcLibraryHeadersTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_headers test",
-		Filesystem: map[string]string{
-			"lib-1/lib1a.h":                        "",
-			"lib-1/lib1b.h":                        "",
-			"lib-2/lib2a.h":                        "",
-			"lib-2/lib2b.h":                        "",
-			"dir-1/dir1a.h":                        "",
-			"dir-1/dir1b.h":                        "",
-			"dir-2/dir2a.h":                        "",
-			"dir-2/dir2b.h":                        "",
-			"arch_arm64_exported_include_dir/a.h":  "",
-			"arch_x86_exported_include_dir/b.h":    "",
-			"arch_x86_64_exported_include_dir/c.h": "",
-		},
-		Blueprint: soongCcLibraryHeadersPreamble + `
-cc_library_headers {
-    name: "lib-1",
-    export_include_dirs: ["lib-1"],
-    no_libcrt: true,
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_headers", "lib-1", AttrNameToString{
-				"export_includes": `["lib-1"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryHeadersExportedStaticLibHeadersReexported(t *testing.T) {
-	runCcLibraryHeadersTestCase(t, Bp2buildTestCase{
-		Description:             "cc_library_headers exported_static_lib_headers is reexported",
-		Filesystem:              map[string]string{},
-		StubbedBuildDefinitions: []string{"foo_export", "foo_no_reexport"},
-		Blueprint: soongCcLibraryHeadersPreamble + `
-cc_library_headers {
-		name: "foo_headers",
-		export_static_lib_headers: ["foo_export"],
-		static_libs: ["foo_export", "foo_no_reexport"],
-    bazel_module: { bp2build_available: true },
-}
-` + simpleModule("cc_library_headers", "foo_export") +
-			simpleModule("cc_library_headers", "foo_no_reexport"),
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_headers", "foo_headers", AttrNameToString{
-				"deps": `[":foo_export"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryHeadersExportedSharedLibHeadersReexported(t *testing.T) {
-	runCcLibraryHeadersTestCase(t, Bp2buildTestCase{
-		Description:             "cc_library_headers exported_shared_lib_headers is reexported",
-		Filesystem:              map[string]string{},
-		StubbedBuildDefinitions: []string{"foo_export", "foo_no_reexport"},
-		Blueprint: soongCcLibraryHeadersPreamble + `
-cc_library_headers {
-		name: "foo_headers",
-		export_shared_lib_headers: ["foo_export"],
-		shared_libs: ["foo_export", "foo_no_reexport"],
-    bazel_module: { bp2build_available: true },
-}
-` + simpleModule("cc_library_headers", "foo_export") +
-			simpleModule("cc_library_headers", "foo_no_reexport"),
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_headers", "foo_headers", AttrNameToString{
-				"deps": `[":foo_export"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryHeadersExportedHeaderLibHeadersReexported(t *testing.T) {
-	runCcLibraryHeadersTestCase(t, Bp2buildTestCase{
-		Description:             "cc_library_headers exported_header_lib_headers is reexported",
-		Filesystem:              map[string]string{},
-		StubbedBuildDefinitions: []string{"foo_export", "foo_no_reexport"},
-		Blueprint: soongCcLibraryHeadersPreamble + `
-cc_library_headers {
-		name: "foo_headers",
-		export_header_lib_headers: ["foo_export"],
-		header_libs: ["foo_export", "foo_no_reexport"],
-    bazel_module: { bp2build_available: true },
-}
-` + simpleModule("cc_library_headers", "foo_export") +
-			simpleModule("cc_library_headers", "foo_no_reexport"),
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_headers", "foo_headers", AttrNameToString{
-				"deps": `[":foo_export"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryHeadersWholeStaticLibsReexported(t *testing.T) {
-	runCcLibraryHeadersTestCase(t, Bp2buildTestCase{
-		Description:             "cc_library_headers whole_static_libs is reexported",
-		Filesystem:              map[string]string{},
-		StubbedBuildDefinitions: []string{"foo_export"},
-		Blueprint: soongCcLibraryHeadersPreamble + `
-cc_library_headers {
-		name: "foo_headers",
-		whole_static_libs: ["foo_export"],
-    bazel_module: { bp2build_available: true },
-}
-` + simpleModule("cc_library_headers", "foo_export"),
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_headers", "foo_headers", AttrNameToString{
-				"deps": `[":foo_export"]`,
-			}),
-		},
-	})
-}
-
-func TestPrebuiltCcLibraryHeadersWholeStaticLibsReexported(t *testing.T) {
-	runCcLibraryHeadersTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_headers whole_static_libs is reexported",
-		Filesystem: map[string]string{
-			"foo/bar/Android.bp": simpleModule("cc_library_headers", "foo_headers"),
-		},
-		StubbedBuildDefinitions: []string{"foo_export"},
-		Blueprint: soongCcLibraryHeadersPreamble + `
-cc_prebuilt_library_headers {
-		name: "foo_headers",
-		whole_static_libs: ["foo_export"],
-    bazel_module: { bp2build_available: true },
-}
-` + simpleModule("cc_library_headers", "foo_export"),
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_headers", "foo_headers", AttrNameToString{
-				"deps": `[":foo_export"]`,
-			}),
-		},
-	})
-}
-
-func TestPrebuiltCcLibraryHeadersPreferredRdepUpdated(t *testing.T) {
-	runCcLibraryHeadersTestCase(t, Bp2buildTestCase{
-		Description:             "cc_library_headers prebuilt preferred is used as rdep",
-		StubbedBuildDefinitions: []string{"foo_export", "//foo/bar:foo_headers"},
-		Filesystem: map[string]string{
-			"foo/bar/Android.bp": simpleModule("cc_library_headers", "foo_headers"),
-		},
-		Blueprint: soongCcLibraryHeadersPreamble + `
-cc_prebuilt_library_headers {
-		name: "foo_headers",
-		whole_static_libs: ["foo_export"],
-		bazel_module: { bp2build_available: true },
-		prefer: true,
-}
-
-cc_library_shared {
-	name: "foo",
-	header_libs: ["foo_headers"],
-	include_build_directory: false,
-}
-` + simpleModule("cc_library_headers", "foo_export"),
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_headers", "foo_headers", AttrNameToString{
-				"deps": `[":foo_export"]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"implementation_deps": `[":foo_headers"]`,
-			}),
-		},
-	})
-}
-
-func TestPrebuiltCcLibraryHeadersRdepUpdated(t *testing.T) {
-	runCcLibraryHeadersTestCase(t, Bp2buildTestCase{
-		Description:             "cc_library_headers not preferred is not used for rdep",
-		StubbedBuildDefinitions: []string{"foo_export", "//foo/bar:foo_headers"},
-		Filesystem: map[string]string{
-			"foo/bar/Android.bp": simpleModule("cc_library_headers", "foo_headers"),
-		},
-		Blueprint: soongCcLibraryHeadersPreamble + `
-cc_prebuilt_library_headers {
-		name: "foo_headers",
-		whole_static_libs: ["foo_export"],
-		bazel_module: { bp2build_available: true },
-		prefer: false,
-}
-
-cc_library_shared {
-	name: "foo",
-	header_libs: ["foo_headers"],
-	include_build_directory: false,
-}
-` + simpleModule("cc_library_headers", "foo_export"),
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_headers", "foo_headers", AttrNameToString{
-				"deps": `[":foo_export"]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"implementation_deps": `["//foo/bar:foo_headers"]`,
-			}),
-		},
-	})
-}
diff --git a/bp2build/cc_library_shared_conversion_test.go b/bp2build/cc_library_shared_conversion_test.go
deleted file mode 100644
index 9f9fcf9..0000000
--- a/bp2build/cc_library_shared_conversion_test.go
+++ /dev/null
@@ -1,1656 +0,0 @@
-// Copyright 2021 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"testing"
-
-	"android/soong/android"
-	"android/soong/cc"
-)
-
-const (
-	// See cc/testing.go for more context
-	// TODO(alexmarquez): Split out the preamble into common code?
-	soongCcLibrarySharedPreamble = soongCcLibraryStaticPreamble
-)
-
-func registerCcLibrarySharedModuleTypes(ctx android.RegistrationContext) {
-	cc.RegisterCCBuildComponents(ctx)
-	ctx.RegisterModuleType("cc_library_headers", cc.LibraryHeaderFactory)
-	ctx.RegisterModuleType("cc_library_static", cc.LibraryStaticFactory)
-	ctx.RegisterModuleType("cc_library", cc.LibraryFactory)
-	ctx.RegisterModuleType("ndk_library", cc.NdkLibraryFactory)
-}
-
-func runCcLibrarySharedTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	t.Parallel()
-	tc.StubbedBuildDefinitions = append(tc.StubbedBuildDefinitions, "libbuildversion", "libprotobuf-cpp-lite", "libprotobuf-cpp-full")
-	(&tc).ModuleTypeUnderTest = "cc_library_shared"
-	(&tc).ModuleTypeUnderTestFactory = cc.LibrarySharedFactory
-	RunBp2BuildTestCase(t, registerCcLibrarySharedModuleTypes, tc)
-}
-
-func TestCcLibrarySharedSimple(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description:             "cc_library_shared simple overall test",
-		StubbedBuildDefinitions: []string{"header_lib_1", "header_lib_2", "whole_static_lib_1", "whole_static_lib_2", "shared_lib_1", "shared_lib_2"},
-		Filesystem: map[string]string{
-			// NOTE: include_dir headers *should not* appear in Bazel hdrs later (?)
-			"include_dir_1/include_dir_1_a.h": "",
-			"include_dir_1/include_dir_1_b.h": "",
-			"include_dir_2/include_dir_2_a.h": "",
-			"include_dir_2/include_dir_2_b.h": "",
-			// NOTE: local_include_dir headers *should not* appear in Bazel hdrs later (?)
-			"local_include_dir_1/local_include_dir_1_a.h": "",
-			"local_include_dir_1/local_include_dir_1_b.h": "",
-			"local_include_dir_2/local_include_dir_2_a.h": "",
-			"local_include_dir_2/local_include_dir_2_b.h": "",
-			// NOTE: export_include_dir headers *should* appear in Bazel hdrs later
-			"export_include_dir_1/export_include_dir_1_a.h": "",
-			"export_include_dir_1/export_include_dir_1_b.h": "",
-			"export_include_dir_2/export_include_dir_2_a.h": "",
-			"export_include_dir_2/export_include_dir_2_b.h": "",
-			// NOTE: Soong implicitly includes headers in the current directory
-			"implicit_include_1.h": "",
-			"implicit_include_2.h": "",
-		},
-		Blueprint: soongCcLibrarySharedPreamble + `
-cc_library_headers {
-    name: "header_lib_1",
-    export_include_dirs: ["header_lib_1"],
-}
-
-cc_library_headers {
-    name: "header_lib_2",
-    export_include_dirs: ["header_lib_2"],
-}
-
-cc_library_shared {
-    name: "shared_lib_1",
-    srcs: ["shared_lib_1.cc"],
-}
-
-cc_library_shared {
-    name: "shared_lib_2",
-    srcs: ["shared_lib_2.cc"],
-}
-
-cc_library_static {
-    name: "whole_static_lib_1",
-    srcs: ["whole_static_lib_1.cc"],
-}
-
-cc_library_static {
-    name: "whole_static_lib_2",
-    srcs: ["whole_static_lib_2.cc"],
-}
-
-cc_library_shared {
-    name: "foo_shared",
-    srcs: [
-        "foo_shared1.cc",
-        "foo_shared2.cc",
-    ],
-    cflags: [
-        "-Dflag1",
-        "-Dflag2"
-    ],
-    shared_libs: [
-        "shared_lib_1",
-        "shared_lib_2"
-    ],
-    whole_static_libs: [
-        "whole_static_lib_1",
-        "whole_static_lib_2"
-    ],
-    include_dirs: [
-        "include_dir_1",
-        "include_dir_2",
-    ],
-    local_include_dirs: [
-        "local_include_dir_1",
-        "local_include_dir_2",
-    ],
-    export_include_dirs: [
-        "export_include_dir_1",
-        "export_include_dir_2"
-    ],
-    header_libs: [
-        "header_lib_1",
-        "header_lib_2"
-    ],
-    sdk_version: "current",
-    min_sdk_version: "29",
-
-    // TODO: Also support export_header_lib_headers
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo_shared", AttrNameToString{
-				"absolute_includes": `[
-        "include_dir_1",
-        "include_dir_2",
-    ]`,
-				"copts": `[
-        "-Dflag1",
-        "-Dflag2",
-    ]`,
-				"export_includes": `[
-        "export_include_dir_1",
-        "export_include_dir_2",
-    ]`,
-				"implementation_deps": `[
-        ":header_lib_1",
-        ":header_lib_2",
-    ]`,
-				"implementation_dynamic_deps": `[
-        ":shared_lib_1",
-        ":shared_lib_2",
-    ]`,
-				"local_includes": `[
-        "local_include_dir_1",
-        "local_include_dir_2",
-        ".",
-    ]`,
-				"srcs": `[
-        "foo_shared1.cc",
-        "foo_shared2.cc",
-    ]`,
-				"whole_archive_deps": `[
-        ":whole_static_lib_1",
-        ":whole_static_lib_2",
-    ]`,
-				"sdk_version":     `"current"`,
-				"min_sdk_version": `"29"`,
-				"deps": `select({
-        "//build/bazel/rules/apex:unbundled_app": ["//build/bazel/rules/cc:ndk_sysroot"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedArchSpecificSharedLib(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description:             "cc_library_shared arch-specific shared_libs with whole_static_libs",
-		Filesystem:              map[string]string{},
-		StubbedBuildDefinitions: []string{"static_dep", "shared_dep"},
-		Blueprint: soongCcLibrarySharedPreamble + `
-cc_library_static {
-    name: "static_dep",
-}
-cc_library_shared {
-    name: "shared_dep",
-}
-cc_library_shared {
-    name: "foo_shared",
-    arch: { arm64: { shared_libs: ["shared_dep"], whole_static_libs: ["static_dep"] } },
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo_shared", AttrNameToString{
-				"implementation_dynamic_deps": `select({
-        "//build/bazel_common_rules/platforms/arch:arm64": [":shared_dep"],
-        "//conditions:default": [],
-    })`,
-				"whole_archive_deps": `select({
-        "//build/bazel_common_rules/platforms/arch:arm64": [":static_dep"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedOsSpecificSharedLib(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		StubbedBuildDefinitions: []string{"shared_dep"},
-		Description:             "cc_library_shared os-specific shared_libs",
-		Filesystem:              map[string]string{},
-		Blueprint: soongCcLibrarySharedPreamble + `
-cc_library_shared {
-    name: "shared_dep",
-}
-cc_library_shared {
-    name: "foo_shared",
-    target: { android: { shared_libs: ["shared_dep"], } },
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo_shared", AttrNameToString{
-				"implementation_dynamic_deps": `select({
-        "//build/bazel_common_rules/platforms/os:android": [":shared_dep"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedBaseArchOsSpecificSharedLib(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		StubbedBuildDefinitions: []string{"shared_dep", "shared_dep2", "shared_dep3"},
-		Description:             "cc_library_shared base, arch, and os-specific shared_libs",
-		Filesystem:              map[string]string{},
-		Blueprint: soongCcLibrarySharedPreamble + `
-cc_library_shared {
-    name: "shared_dep",
-}
-cc_library_shared {
-    name: "shared_dep2",
-}
-cc_library_shared {
-    name: "shared_dep3",
-}
-cc_library_shared {
-    name: "foo_shared",
-    shared_libs: ["shared_dep"],
-    target: { android: { shared_libs: ["shared_dep2"] } },
-    arch: { arm64: { shared_libs: ["shared_dep3"] } },
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo_shared", AttrNameToString{
-				"implementation_dynamic_deps": `[":shared_dep"] + select({
-        "//build/bazel_common_rules/platforms/arch:arm64": [":shared_dep3"],
-        "//conditions:default": [],
-    }) + select({
-        "//build/bazel_common_rules/platforms/os:android": [":shared_dep2"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedSimpleExcludeSrcs(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_shared simple exclude_srcs",
-		Filesystem: map[string]string{
-			"common.c":       "",
-			"foo-a.c":        "",
-			"foo-excluded.c": "",
-		},
-		Blueprint: soongCcLibrarySharedPreamble + `
-cc_library_shared {
-    name: "foo_shared",
-    srcs: ["common.c", "foo-*.c"],
-    exclude_srcs: ["foo-excluded.c"],
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo_shared", AttrNameToString{
-				"srcs_c": `[
-        "common.c",
-        "foo-a.c",
-    ]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedStrip(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_shared stripping",
-		Filesystem:  map[string]string{},
-		Blueprint: soongCcLibrarySharedPreamble + `
-cc_library_shared {
-    name: "foo_shared",
-    strip: {
-        keep_symbols: false,
-        keep_symbols_and_debug_frame: true,
-        keep_symbols_list: ["sym", "sym2"],
-        all: true,
-        none: false,
-    },
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo_shared", AttrNameToString{
-				"strip": `{
-        "all": True,
-        "keep_symbols": False,
-        "keep_symbols_and_debug_frame": True,
-        "keep_symbols_list": [
-            "sym",
-            "sym2",
-        ],
-        "none": False,
-    }`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedVersionScriptAndDynamicList(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_shared version script and dynamic list",
-		Filesystem: map[string]string{
-			"version_script": "",
-			"dynamic.list":   "",
-		},
-		Blueprint: soongCcLibrarySharedPreamble + `
-cc_library_shared {
-    name: "foo_shared",
-    version_script: "version_script",
-    dynamic_list: "dynamic.list",
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo_shared", AttrNameToString{
-				"additional_linker_inputs": `[
-        "version_script",
-        "dynamic.list",
-    ]`,
-				"linkopts": `[
-        "-Wl,--version-script,$(location version_script)",
-        "-Wl,--dynamic-list,$(location dynamic.list)",
-    ]`,
-				"features": `["android_cfi_exports_map"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryLdflagsSplitBySpaceSoongAdded(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "ldflags are split by spaces except for the ones added by soong (version script and dynamic list)",
-		Filesystem: map[string]string{
-			"version_script": "",
-			"dynamic.list":   "",
-		},
-		Blueprint: `
-cc_library_shared {
-    name: "foo",
-    ldflags: [
-        "--nospace_flag",
-        "-z spaceflag",
-    ],
-    version_script: "version_script",
-    dynamic_list: "dynamic.list",
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"additional_linker_inputs": `[
-        "version_script",
-        "dynamic.list",
-    ]`,
-				"linkopts": `[
-        "--nospace_flag",
-        "-z",
-        "spaceflag",
-        "-Wl,--version-script,$(location version_script)",
-        "-Wl,--dynamic-list,$(location dynamic.list)",
-    ]`,
-				"features": `["android_cfi_exports_map"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedNoCrtTrue(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_shared - nocrt: true disables feature",
-		Filesystem: map[string]string{
-			"impl.cpp": "",
-		},
-		Blueprint: soongCcLibraryPreamble + `
-cc_library_shared {
-    name: "foo_shared",
-    srcs: ["impl.cpp"],
-    nocrt: true,
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo_shared", AttrNameToString{
-				"features": `["-link_crt"]`,
-				"srcs":     `["impl.cpp"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedNoCrtFalse(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_shared - nocrt: false doesn't disable feature",
-		Filesystem: map[string]string{
-			"impl.cpp": "",
-		},
-		Blueprint: soongCcLibraryPreamble + `
-cc_library_shared {
-    name: "foo_shared",
-    srcs: ["impl.cpp"],
-    nocrt: false,
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo_shared", AttrNameToString{
-				"srcs": `["impl.cpp"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedNoCrtArchVariant(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_shared - nocrt in select",
-		Filesystem: map[string]string{
-			"impl.cpp": "",
-		},
-		Blueprint: soongCcLibraryPreamble + `
-cc_library_shared {
-    name: "foo_shared",
-    srcs: ["impl.cpp"],
-    arch: {
-        arm: {
-            nocrt: true,
-        },
-        x86: {
-            nocrt: false,
-        },
-    },
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo_shared", AttrNameToString{
-				"features": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["-link_crt"],
-        "//conditions:default": [],
-    })`,
-				"srcs": `["impl.cpp"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedProto(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Blueprint: soongCcProtoPreamble + `cc_library_shared {
-	name: "foo",
-	srcs: ["foo.proto"],
-	proto: {
-		export_proto_headers: true,
-	},
-	include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("proto_library", "foo_proto", AttrNameToString{
-				"srcs": `["foo.proto"]`,
-			}), MakeBazelTarget("cc_lite_proto_library", "foo_cc_proto_lite", AttrNameToString{
-				"deps": `[":foo_proto"]`,
-			}), MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"dynamic_deps":       `[":libprotobuf-cpp-lite"]`,
-				"whole_archive_deps": `[":foo_cc_proto_lite"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedUseVersionLib(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Filesystem: map[string]string{
-			soongCcVersionLibBpPath: soongCcVersionLibBp,
-		},
-		StubbedBuildDefinitions: []string{"//build/soong/cc/libbuildversion:libbuildversion"},
-		Blueprint: soongCcProtoPreamble + `cc_library_shared {
-        name: "foo",
-        use_version_lib: true,
-        include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"use_version_lib":    "True",
-				"whole_archive_deps": `["//build/soong/cc/libbuildversion:libbuildversion"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedStubs(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library_shared stubs",
-		ModuleTypeUnderTest:        "cc_library_shared",
-		ModuleTypeUnderTestFactory: cc.LibrarySharedFactory,
-		Dir:                        "foo/bar",
-		Filesystem: map[string]string{
-			"foo/bar/Android.bp": `
-cc_library_shared {
-	name: "a",
-	stubs: { symbol_file: "a.map.txt", versions: ["28", "29", "current"] },
-	bazel_module: { bp2build_available: true },
-	include_build_directory: false,
-}
-`,
-		},
-		Blueprint: soongCcLibraryPreamble,
-		ExpectedBazelTargets: []string{makeCcStubSuiteTargets("a", AttrNameToString{
-			"api_surface":          `"module-libapi"`,
-			"soname":               `"a.so"`,
-			"source_library_label": `"//foo/bar:a"`,
-			"stubs_symbol_file":    `"a.map.txt"`,
-			"stubs_versions": `[
-        "28",
-        "29",
-        "current",
-    ]`,
-		}),
-			MakeBazelTarget("cc_library_shared", "a", AttrNameToString{
-				"stubs_symbol_file": `"a.map.txt"`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedStubs_UseImplementationInSameApex(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library_shared stubs",
-		ModuleTypeUnderTest:        "cc_library_shared",
-		ModuleTypeUnderTestFactory: cc.LibrarySharedFactory,
-		StubbedBuildDefinitions:    []string{"a"},
-		Blueprint: soongCcLibrarySharedPreamble + `
-cc_library_shared {
-	name: "a",
-	stubs: { symbol_file: "a.map.txt", versions: ["28", "29", "current"] },
-	include_build_directory: false,
-	apex_available: ["made_up_apex"],
-}
-cc_library_shared {
-	name: "b",
-	shared_libs: [":a"],
-	include_build_directory: false,
-	apex_available: ["made_up_apex"],
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "b", AttrNameToString{
-				"implementation_dynamic_deps": `[":a"]`,
-				"tags":                        `["apex_available=made_up_apex"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedStubs_UseStubsInDifferentApex(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library_shared stubs",
-		ModuleTypeUnderTest:        "cc_library_shared",
-		ModuleTypeUnderTestFactory: cc.LibrarySharedFactory,
-		StubbedBuildDefinitions:    []string{"a"},
-		Blueprint: soongCcLibrarySharedPreamble + `
-cc_library_shared {
-	name: "a",
-	stubs: { symbol_file: "a.map.txt", versions: ["28", "29", "current"] },
-	include_build_directory: false,
-	apex_available: ["apex_a"],
-}
-cc_library_shared {
-	name: "b",
-	shared_libs: [":a"],
-	include_build_directory: false,
-	apex_available: ["apex_b"],
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "b", AttrNameToString{
-				"implementation_dynamic_deps": `select({
-        "//build/bazel/rules/apex:apex_b": ["@api_surfaces//module-libapi/current:a"],
-        "//build/bazel/rules/apex:system": ["@api_surfaces//module-libapi/current:a"],
-        "//conditions:default": [":a"],
-    })`,
-				"tags": `["apex_available=apex_b"]`,
-			}),
-		},
-	})
-}
-
-// Tests that library in apexfoo links against stubs of platform_lib and otherapex_lib
-func TestCcLibrarySharedStubs_UseStubsFromMultipleApiDomains(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library_shared stubs",
-		ModuleTypeUnderTest:        "cc_library_shared",
-		ModuleTypeUnderTestFactory: cc.LibrarySharedFactory,
-		StubbedBuildDefinitions:    []string{"libplatform_stable", "libapexfoo_stable"},
-		Blueprint: soongCcLibrarySharedPreamble + `
-cc_library_shared {
-	name: "libplatform_stable",
-	stubs: { symbol_file: "libplatform_stable.map.txt", versions: ["28", "29", "current"] },
-	apex_available: ["//apex_available:platform"],
-	include_build_directory: false,
-}
-cc_library_shared {
-	name: "libapexfoo_stable",
-	stubs: { symbol_file: "libapexfoo_stable.map.txt", versions: ["28", "29", "current"] },
-	apex_available: ["apexfoo"],
-	include_build_directory: false,
-}
-cc_library_shared {
-	name: "libutils",
-	shared_libs: ["libplatform_stable", "libapexfoo_stable",],
-	apex_available: ["//apex_available:platform", "apexfoo", "apexbar"],
-	include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "libutils", AttrNameToString{
-				"implementation_dynamic_deps": `select({
-        "//build/bazel/rules/apex:apexbar": [
-            "@api_surfaces//module-libapi/current:libplatform_stable",
-            "@api_surfaces//module-libapi/current:libapexfoo_stable",
-        ],
-        "//build/bazel/rules/apex:apexfoo": [
-            "@api_surfaces//module-libapi/current:libplatform_stable",
-            ":libapexfoo_stable",
-        ],
-        "//build/bazel/rules/apex:system": [
-            ":libplatform_stable",
-            "@api_surfaces//module-libapi/current:libapexfoo_stable",
-        ],
-        "//conditions:default": [
-            ":libplatform_stable",
-            ":libapexfoo_stable",
-        ],
-    })`,
-				"tags": `[
-        "apex_available=//apex_available:platform",
-        "apex_available=apexfoo",
-        "apex_available=apexbar",
-    ]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedStubs_IgnorePlatformAvailable(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library_shared stubs",
-		ModuleTypeUnderTest:        "cc_library_shared",
-		ModuleTypeUnderTestFactory: cc.LibrarySharedFactory,
-		StubbedBuildDefinitions:    []string{"a"},
-		Blueprint: soongCcLibrarySharedPreamble + `
-cc_library_shared {
-	name: "a",
-	stubs: { symbol_file: "a.map.txt", versions: ["28", "29", "current"] },
-	include_build_directory: false,
-	apex_available: ["//apex_available:platform", "apex_a"],
-}
-cc_library_shared {
-	name: "b",
-	shared_libs: [":a"],
-	include_build_directory: false,
-	apex_available: ["//apex_available:platform", "apex_b"],
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "b", AttrNameToString{
-				"implementation_dynamic_deps": `select({
-        "//build/bazel/rules/apex:apex_b": ["@api_surfaces//module-libapi/current:a"],
-        "//build/bazel/rules/apex:system": ["@api_surfaces//module-libapi/current:a"],
-        "//conditions:default": [":a"],
-    })`,
-				"tags": `[
-        "apex_available=//apex_available:platform",
-        "apex_available=apex_b",
-    ]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryDoesNotDropStubDepIfNoVariationAcrossAxis(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library depeends on impl for all configurations",
-		ModuleTypeUnderTest:        "cc_library_shared",
-		ModuleTypeUnderTestFactory: cc.LibrarySharedFactory,
-		StubbedBuildDefinitions:    []string{"a"},
-		Blueprint: soongCcLibrarySharedPreamble + `
-cc_library_shared {
-	name: "a",
-	stubs: { symbol_file: "a.map.txt", versions: ["28", "29", "current"] },
-	apex_available: ["//apex_available:platform"],
-}
-cc_library_shared {
-	name: "b",
-	shared_libs: [":a"],
-	include_build_directory: false,
-	apex_available: ["//apex_available:platform"],
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "b", AttrNameToString{
-				"implementation_dynamic_deps": `[":a"]`,
-				"tags":                        `["apex_available=//apex_available:platform"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedStubs_MultipleApexAvailable(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		ModuleTypeUnderTest:        "cc_library_shared",
-		ModuleTypeUnderTestFactory: cc.LibrarySharedFactory,
-		StubbedBuildDefinitions:    []string{"a"},
-		Blueprint: soongCcLibrarySharedPreamble + `
-cc_library_shared {
-	name: "a",
-	stubs: { symbol_file: "a.map.txt", versions: ["28", "29", "current"] },
-	include_build_directory: false,
-	apex_available: ["//apex_available:platform", "apex_a", "apex_b"],
-}
-cc_library_shared {
-	name: "b",
-	shared_libs: [":a"],
-	include_build_directory: false,
-	apex_available: ["//apex_available:platform", "apex_b"],
-}
-
-cc_library_shared {
-	name: "c",
-	shared_libs: [":a"],
-	include_build_directory: false,
-	apex_available: ["//apex_available:platform", "apex_a", "apex_b"],
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "b", AttrNameToString{
-				"implementation_dynamic_deps": `select({
-        "//build/bazel/rules/apex:system": ["@api_surfaces//module-libapi/current:a"],
-        "//conditions:default": [":a"],
-    })`,
-				"tags": `[
-        "apex_available=//apex_available:platform",
-        "apex_available=apex_b",
-    ]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "c", AttrNameToString{
-				"implementation_dynamic_deps": `[":a"]`,
-				"tags": `[
-        "apex_available=//apex_available:platform",
-        "apex_available=apex_a",
-        "apex_available=apex_b",
-    ]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedSystemSharedLibsSharedEmpty(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library_shared system_shared_libs empty shared default",
-		ModuleTypeUnderTest:        "cc_library_shared",
-		ModuleTypeUnderTestFactory: cc.LibrarySharedFactory,
-		Blueprint: soongCcLibrarySharedPreamble + `
-cc_defaults {
-    name: "empty_defaults",
-    shared: {
-        system_shared_libs: [],
-    },
-    include_build_directory: false,
-}
-cc_library_shared {
-    name: "empty",
-    defaults: ["empty_defaults"],
-}
-`,
-		ExpectedBazelTargets: []string{MakeBazelTarget("cc_library_shared", "empty", AttrNameToString{
-			"system_dynamic_deps": "[]",
-		})},
-	})
-}
-
-func TestCcLibrarySharedConvertLex(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library_shared with lex files",
-		ModuleTypeUnderTest:        "cc_library_shared",
-		ModuleTypeUnderTestFactory: cc.LibrarySharedFactory,
-		Filesystem: map[string]string{
-			"foo.c":   "",
-			"bar.cc":  "",
-			"foo1.l":  "",
-			"bar1.ll": "",
-			"foo2.l":  "",
-			"bar2.ll": "",
-		},
-		Blueprint: `cc_library_shared {
-	name: "foo_lib",
-	srcs: ["foo.c", "bar.cc", "foo1.l", "foo2.l", "bar1.ll", "bar2.ll"],
-	lex: { flags: ["--foo_flags"] },
-	include_build_directory: false,
-	bazel_module: { bp2build_available: true },
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("genlex", "foo_lib_genlex_l", AttrNameToString{
-				"srcs": `[
-        "foo1.l",
-        "foo2.l",
-    ]`,
-				"lexopts": `["--foo_flags"]`,
-			}),
-			MakeBazelTarget("genlex", "foo_lib_genlex_ll", AttrNameToString{
-				"srcs": `[
-        "bar1.ll",
-        "bar2.ll",
-    ]`,
-				"lexopts": `["--foo_flags"]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo_lib", AttrNameToString{
-				"srcs": `[
-        "bar.cc",
-        ":foo_lib_genlex_ll",
-    ]`,
-				"srcs_c": `[
-        "foo.c",
-        ":foo_lib_genlex_l",
-    ]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedClangUnknownFlags(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Blueprint: soongCcProtoPreamble + `cc_library_shared {
-	name: "foo",
-	conlyflags: ["-a", "-finline-functions"],
-	cflags: ["-b","-finline-functions"],
-	cppflags: ["-c", "-finline-functions"],
-	ldflags: ["-d","-finline-functions", "-e"],
-	include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"conlyflags": `["-a"]`,
-				"copts":      `["-b"]`,
-				"cppflags":   `["-c"]`,
-				"linkopts": `[
-        "-d",
-        "-e",
-    ]`,
-			}),
-		},
-	})
-}
-
-func TestCCLibraryFlagSpaceSplitting(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Blueprint: soongCcProtoPreamble + `cc_library_shared {
-	name: "foo",
-	conlyflags: [ "-include header.h"],
-	cflags: ["-include header.h"],
-	cppflags: ["-include header.h"],
-	version_script: "version_script",
-	include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"additional_linker_inputs": `["version_script"]`,
-				"conlyflags": `[
-        "-include",
-        "header.h",
-    ]`,
-				"copts": `[
-        "-include",
-        "header.h",
-    ]`,
-				"cppflags": `[
-        "-include",
-        "header.h",
-    ]`,
-				"linkopts": `["-Wl,--version-script,$(location version_script)"]`,
-				"features": `["android_cfi_exports_map"]`,
-			}),
-		},
-	})
-}
-
-func TestCCLibrarySharedRuntimeDeps(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Blueprint: `cc_library_shared {
-	name: "bar",
-}
-
-cc_library_shared {
-  name: "foo",
-  runtime_libs: ["bar"],
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "bar", AttrNameToString{
-				"local_includes": `["."]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"runtime_deps":   `[":bar"]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedEmptySuffix(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_shared with empty suffix",
-		Filesystem: map[string]string{
-			"foo.c": "",
-		},
-		Blueprint: soongCcLibrarySharedPreamble + `
-cc_library_shared {
-    name: "foo_shared",
-    suffix: "",
-    srcs: ["foo.c"],
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo_shared", AttrNameToString{
-				"srcs_c": `["foo.c"]`,
-				"suffix": `""`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedSuffix(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_shared with suffix",
-		Filesystem: map[string]string{
-			"foo.c": "",
-		},
-		Blueprint: soongCcLibrarySharedPreamble + `
-cc_library_shared {
-    name: "foo_shared",
-    suffix: "-suf",
-    srcs: ["foo.c"],
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo_shared", AttrNameToString{
-				"srcs_c": `["foo.c"]`,
-				"suffix": `"-suf"`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedArchVariantSuffix(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_shared with arch-variant suffix",
-		Filesystem: map[string]string{
-			"foo.c": "",
-		},
-		Blueprint: soongCcLibrarySharedPreamble + `
-cc_library_shared {
-    name: "foo_shared",
-    arch: {
-        arm64: { suffix: "-64" },
-        arm:   { suffix: "-32" },
-		},
-    srcs: ["foo.c"],
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo_shared", AttrNameToString{
-				"srcs_c": `["foo.c"]`,
-				"suffix": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": "-32",
-        "//build/bazel_common_rules/platforms/arch:arm64": "-64",
-        "//conditions:default": None,
-    })`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedWithSyspropSrcs(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_shared with sysprop sources",
-		Blueprint: `
-cc_library_shared {
-	name: "foo",
-	srcs: [
-		"bar.sysprop",
-		"baz.sysprop",
-		"blah.cpp",
-	],
-	min_sdk_version: "5",
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("sysprop_library", "foo_sysprop_library", AttrNameToString{
-				"srcs": `[
-        "bar.sysprop",
-        "baz.sysprop",
-    ]`,
-			}),
-			MakeBazelTarget("cc_sysprop_library_static", "foo_cc_sysprop_library_static", AttrNameToString{
-				"dep":             `":foo_sysprop_library"`,
-				"min_sdk_version": `"5"`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"srcs":               `["blah.cpp"]`,
-				"local_includes":     `["."]`,
-				"min_sdk_version":    `"5"`,
-				"whole_archive_deps": `[":foo_cc_sysprop_library_static"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedWithSyspropSrcsSomeConfigs(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_shared with sysprop sources in some configs but not others",
-		Blueprint: `
-cc_library_shared {
-	name: "foo",
-	srcs: [
-		"blah.cpp",
-	],
-	target: {
-		android: {
-			srcs: ["bar.sysprop"],
-		},
-	},
-	min_sdk_version: "5",
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("sysprop_library", "foo_sysprop_library", AttrNameToString{
-				"srcs": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["bar.sysprop"],
-        "//conditions:default": [],
-    })`,
-			}),
-			MakeBazelTarget("cc_sysprop_library_static", "foo_cc_sysprop_library_static", AttrNameToString{
-				"dep":             `":foo_sysprop_library"`,
-				"min_sdk_version": `"5"`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"srcs":            `["blah.cpp"]`,
-				"local_includes":  `["."]`,
-				"min_sdk_version": `"5"`,
-				"whole_archive_deps": `select({
-        "//build/bazel_common_rules/platforms/os:android": [":foo_cc_sysprop_library_static"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedHeaderAbiChecker(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_shared with header abi checker",
-		Blueprint: `cc_library_shared {
-    name: "foo",
-    header_abi_checker: {
-        enabled: true,
-        symbol_file: "a.map.txt",
-        exclude_symbol_versions: [
-						"29",
-						"30",
-				],
-        exclude_symbol_tags: [
-						"tag1",
-						"tag2",
-				],
-        check_all_apis: true,
-        diff_flags: ["-allow-adding-removing-weak-symbols"],
-    },
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"abi_checker_enabled":     `True`,
-				"abi_checker_symbol_file": `"a.map.txt"`,
-				"abi_checker_exclude_symbol_versions": `[
-        "29",
-        "30",
-    ]`,
-				"abi_checker_exclude_symbol_tags": `[
-        "tag1",
-        "tag2",
-    ]`,
-				"abi_checker_check_all_apis": `True`,
-				"abi_checker_diff_flags":     `["-allow-adding-removing-weak-symbols"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedWithIntegerOverflowProperty(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_shared has correct features when integer_overflow property is provided",
-		Blueprint: `
-cc_library_shared {
-		name: "foo",
-		sanitize: {
-				integer_overflow: true,
-		},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"features":       `["ubsan_integer_overflow"]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedWithMiscUndefinedProperty(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_shared has correct features when misc_undefined property is provided",
-		Blueprint: `
-cc_library_shared {
-		name: "foo",
-		sanitize: {
-				misc_undefined: ["undefined", "nullability"],
-		},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"features": `[
-        "ubsan_undefined",
-        "ubsan_nullability",
-    ]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedWithUBSanPropertiesArchSpecific(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_shared has correct feature select when UBSan props are specified in arch specific blocks",
-		Blueprint: `
-cc_library_shared {
-		name: "foo",
-		sanitize: {
-				misc_undefined: ["undefined", "nullability"],
-		},
-		target: {
-				android: {
-						sanitize: {
-								misc_undefined: ["alignment"],
-						},
-				},
-				linux_glibc: {
-						sanitize: {
-								integer_overflow: true,
-						},
-				},
-		},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"features": `[
-        "ubsan_undefined",
-        "ubsan_nullability",
-    ] + select({
-        "//build/bazel_common_rules/platforms/os:android": ["ubsan_alignment"],
-        "//build/bazel_common_rules/platforms/os:linux_glibc": ["ubsan_integer_overflow"],
-        "//conditions:default": [],
-    })`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedWithSanitizerBlocklist(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_shared has correct features when sanitize.blocklist is provided",
-		Blueprint: `
-cc_library_shared {
-	name: "foo",
-	sanitize: {
-		blocklist: "foo_blocklist.txt",
-	},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"copts": `select({
-        "//build/bazel/rules/cc:sanitizers_enabled": ["-fsanitize-ignorelist=$(location foo_blocklist.txt)"],
-        "//conditions:default": [],
-    })`,
-				"additional_compiler_inputs": `select({
-        "//build/bazel/rules/cc:sanitizers_enabled": [":foo_blocklist.txt"],
-        "//conditions:default": [],
-    })`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedWithThinLto(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_shared has correct features when thin lto is enabled",
-		Blueprint: `
-cc_library_shared {
-	name: "foo",
-	lto: {
-		thin: true,
-	},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"features":       `["android_thin_lto"]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedWithLtoNever(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_shared has correct features when thin lto is enabled",
-		Blueprint: `
-cc_library_shared {
-	name: "foo",
-	lto: {
-		never: true,
-	},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"features":       `["-android_thin_lto"]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedWithThinLtoArchSpecific(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_shared has correct features when LTO differs across arch and os variants",
-		Blueprint: `
-cc_library_shared {
-	name: "foo",
-	target: {
-		android: {
-			lto: {
-				thin: true,
-			},
-		},
-	},
-	arch: {
-		riscv64: {
-			lto: {
-				thin: false,
-			},
-		},
-	},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"local_includes": `["."]`,
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os_arch:android_arm": ["android_thin_lto"],
-        "//build/bazel_common_rules/platforms/os_arch:android_arm64": ["android_thin_lto"],
-        "//build/bazel_common_rules/platforms/os_arch:android_riscv64": ["-android_thin_lto"],
-        "//build/bazel_common_rules/platforms/os_arch:android_x86": ["android_thin_lto"],
-        "//build/bazel_common_rules/platforms/os_arch:android_x86_64": ["android_thin_lto"],
-        "//conditions:default": [],
-    })`}),
-		},
-	})
-}
-
-func TestCcLibrarySharedWithThinLtoDisabledDefaultEnabledVariant(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_shared with thin lto disabled by default but enabled on a particular variant",
-		Blueprint: `
-cc_library_shared {
-	name: "foo",
-	lto: {
-		never: true,
-	},
-	target: {
-		android: {
-			lto: {
-				thin: true,
-				never: false,
-			},
-		},
-	},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"local_includes": `["."]`,
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["android_thin_lto"],
-        "//conditions:default": ["-android_thin_lto"],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedWithThinLtoAndWholeProgramVtables(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_shared has correct features when thin LTO is enabled with whole_program_vtables",
-		Blueprint: `
-cc_library_shared {
-	name: "foo",
-	lto: {
-		thin: true,
-	},
-	whole_program_vtables: true,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"features": `[
-        "android_thin_lto",
-        "android_thin_lto_whole_program_vtables",
-    ]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedHiddenVisibilityConvertedToFeature(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_shared changes hidden visibility flag to feature",
-		Blueprint: `
-cc_library_shared{
-	name: "foo",
-	cflags: ["-fvisibility=hidden"],
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"features":       `["visibility_hidden"]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedHiddenVisibilityConvertedToFeatureOsSpecific(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_shared changes hidden visibility flag to feature for specific os",
-		Blueprint: `
-cc_library_shared{
-	name: "foo",
-	target: {
-		android: {
-			cflags: ["-fvisibility=hidden"],
-		},
-	},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["visibility_hidden"],
-        "//conditions:default": [],
-    })`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedStubsDessertVersionConversion(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_shared converts dessert codename versions to numerical versions",
-		Blueprint: `
-cc_library_shared {
-	name: "a",
-	include_build_directory: false,
-	stubs: {
-		symbol_file: "a.map.txt",
-		versions: [
-			"Q",
-			"R",
-			"31",
-		],
-	},
-}
-cc_library_shared {
-	name: "b",
-	include_build_directory: false,
-	stubs: {
-		symbol_file: "b.map.txt",
-		versions: [
-			"Q",
-			"R",
-			"31",
-			"current",
-		],
-	},
-}
-`,
-		ExpectedBazelTargets: []string{
-			makeCcStubSuiteTargets("a", AttrNameToString{
-				"api_surface":          `"module-libapi"`,
-				"soname":               `"a.so"`,
-				"source_library_label": `"//:a"`,
-				"stubs_symbol_file":    `"a.map.txt"`,
-				"stubs_versions": `[
-        "29",
-        "30",
-        "31",
-        "current",
-    ]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "a", AttrNameToString{
-				"stubs_symbol_file": `"a.map.txt"`,
-			}),
-			makeCcStubSuiteTargets("b", AttrNameToString{
-				"api_surface":          `"module-libapi"`,
-				"soname":               `"b.so"`,
-				"source_library_label": `"//:b"`,
-				"stubs_symbol_file":    `"b.map.txt"`,
-				"stubs_versions": `[
-        "29",
-        "30",
-        "31",
-        "current",
-    ]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "b", AttrNameToString{
-				"stubs_symbol_file": `"b.map.txt"`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedWithCfi(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_shared has correct features when cfi is enabled for specific variants",
-		Blueprint: `
-cc_library_shared {
-	name: "foo",
-	sanitize: {
-		cfi: true,
-	},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"features":       `["android_cfi"]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedWithCfiOsSpecific(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_shared has correct features when cfi is enabled",
-		Blueprint: `
-cc_library_shared {
-	name: "foo",
-	target: {
-		android: {
-			sanitize: {
-				cfi: true,
-			},
-		},
-	},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["android_cfi"],
-        "//conditions:default": [],
-    })`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedWithCfiAndCfiAssemblySupport(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_shared has correct features when cfi is enabled with cfi assembly support",
-		Blueprint: `
-cc_library_static {
-	name: "foo",
-	sanitize: {
-		cfi: true,
-		config: {
-			cfi_assembly_support: true,
-		},
-	},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-				"features": `[
-        "android_cfi",
-        "android_cfi_assembly_support",
-    ]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySharedExplicitlyDisablesCfiWhenFalse(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_shared disables cfi when explciitly set to false in the bp",
-		Blueprint: `
-cc_library_shared {
-	name: "foo",
-	sanitize: {
-		cfi: false,
-	},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"features":       `["-android_cfi"]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCCLibrarySharedRscriptSrc(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: ``,
-		Blueprint: `
-cc_library_shared{
-    name : "foo",
-    srcs : [
-        "ccSrc.cc",
-        "rsSrc.rscript",
-    ],
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("rscript_to_cpp", "foo_renderscript", AttrNameToString{
-				"srcs": `["rsSrc.rscript"]`,
-			}),
-			MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
-				"absolute_includes": `[
-        "frameworks/rs",
-        "frameworks/rs/cpp",
-    ]`,
-				"local_includes": `["."]`,
-				"srcs": `[
-        "ccSrc.cc",
-        "foo_renderscript",
-    ]`,
-			})}})
-}
-
-func TestCcLibrarySdkVariantUsesStubs(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library_shared stubs",
-		ModuleTypeUnderTest:        "cc_library_shared",
-		ModuleTypeUnderTestFactory: cc.LibrarySharedFactory,
-		StubbedBuildDefinitions:    []string{"libNoStubs", "libHasApexStubs", "libHasApexAndNdkStubs", "libHasApexAndNdkStubs.ndk_stub_libs"},
-		Blueprint: soongCcLibrarySharedPreamble + `
-cc_library_shared {
-	name: "libUsesSdk",
-	sdk_version: "current",
-	shared_libs: [
-		"libNoStubs",
-		"libHasApexStubs",
-		"libHasApexAndNdkStubs",
-	]
-}
-cc_library_shared {
-	name: "libNoStubs",
-}
-cc_library_shared {
-	name: "libHasApexStubs",
-	stubs: { symbol_file: "a.map.txt", versions: ["28", "29", "current"] },
-	apex_available: ["apex_a"],
-}
-cc_library_shared {
-	name: "libHasApexAndNdkStubs",
-	stubs: { symbol_file: "b.map.txt", versions: ["28", "29", "current"] },
-	apex_available: ["apex_b"],
-}
-ndk_library {
-	name: "libHasApexAndNdkStubs",
-	first_version: "28",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "libUsesSdk", AttrNameToString{
-				"implementation_dynamic_deps": `[":libNoStubs"] + select({
-        "//build/bazel/rules/apex:system": [
-            "@api_surfaces//module-libapi/current:libHasApexStubs",
-            "@api_surfaces//module-libapi/current:libHasApexAndNdkStubs",
-        ],
-        "//build/bazel/rules/apex:unbundled_app": [
-            ":libHasApexStubs",
-            "//.:libHasApexAndNdkStubs.ndk_stub_libs-current",
-        ],
-        "//conditions:default": [
-            ":libHasApexStubs",
-            ":libHasApexAndNdkStubs",
-        ],
-    })`,
-				"local_includes": `["."]`,
-				"sdk_version":    `"current"`,
-				"deps": `select({
-        "//build/bazel/rules/apex:unbundled_app": ["//build/bazel/rules/cc:ndk_sysroot"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
diff --git a/bp2build/cc_library_static_conversion_test.go b/bp2build/cc_library_static_conversion_test.go
deleted file mode 100644
index d7bbd68..0000000
--- a/bp2build/cc_library_static_conversion_test.go
+++ /dev/null
@@ -1,2295 +0,0 @@
-// Copyright 2021 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"fmt"
-	"testing"
-
-	"android/soong/android"
-	"android/soong/cc"
-	"android/soong/genrule"
-)
-
-const (
-	// See cc/testing.go for more context
-	soongCcLibraryStaticPreamble = `
-cc_defaults {
-    name: "linux_bionic_supported",
-}`
-)
-
-func TestCcLibraryStaticLoadStatement(t *testing.T) {
-	testCases := []struct {
-		bazelTargets           BazelTargets
-		expectedLoadStatements string
-	}{
-		{
-			bazelTargets: BazelTargets{
-				BazelTarget{
-					name:      "cc_library_static_target",
-					ruleClass: "cc_library_static",
-					// NOTE: No bzlLoadLocation for native rules
-				},
-			},
-			expectedLoadStatements: ``,
-		},
-	}
-
-	for _, testCase := range testCases {
-		actual := testCase.bazelTargets.LoadStatements()
-		expected := testCase.expectedLoadStatements
-		if actual != expected {
-			t.Fatalf("Expected load statements to be %s, got %s", expected, actual)
-		}
-	}
-}
-
-func registerCcLibraryStaticModuleTypes(ctx android.RegistrationContext) {
-	cc.RegisterCCBuildComponents(ctx)
-	ctx.RegisterModuleType("cc_library_headers", cc.LibraryHeaderFactory)
-	ctx.RegisterModuleType("genrule", genrule.GenRuleFactory)
-	// Required for system_shared_libs dependencies.
-	ctx.RegisterModuleType("cc_library", cc.LibraryFactory)
-}
-
-func runCcLibraryStaticTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-
-	(&tc).ModuleTypeUnderTest = "cc_library_static"
-	(&tc).ModuleTypeUnderTestFactory = cc.LibraryStaticFactory
-	RunBp2BuildTestCase(t, registerCcLibraryStaticModuleTypes, tc)
-}
-
-func TestCcLibraryStaticSimple(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static test",
-		Filesystem: map[string]string{
-			// NOTE: include_dir headers *should not* appear in Bazel hdrs later (?)
-			"include_dir_1/include_dir_1_a.h": "",
-			"include_dir_1/include_dir_1_b.h": "",
-			"include_dir_2/include_dir_2_a.h": "",
-			"include_dir_2/include_dir_2_b.h": "",
-			// NOTE: local_include_dir headers *should not* appear in Bazel hdrs later (?)
-			"local_include_dir_1/local_include_dir_1_a.h": "",
-			"local_include_dir_1/local_include_dir_1_b.h": "",
-			"local_include_dir_2/local_include_dir_2_a.h": "",
-			"local_include_dir_2/local_include_dir_2_b.h": "",
-			// NOTE: export_include_dir headers *should* appear in Bazel hdrs later
-			"export_include_dir_1/export_include_dir_1_a.h": "",
-			"export_include_dir_1/export_include_dir_1_b.h": "",
-			"export_include_dir_2/export_include_dir_2_a.h": "",
-			"export_include_dir_2/export_include_dir_2_b.h": "",
-			// NOTE: Soong implicitly includes headers in the current directory
-			"implicit_include_1.h": "",
-			"implicit_include_2.h": "",
-		},
-		StubbedBuildDefinitions: []string{"header_lib_1", "header_lib_2",
-			"static_lib_1", "static_lib_2", "whole_static_lib_1", "whole_static_lib_2"},
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library_headers {
-    name: "header_lib_1",
-    export_include_dirs: ["header_lib_1"],
-}
-
-cc_library_headers {
-    name: "header_lib_2",
-    export_include_dirs: ["header_lib_2"],
-}
-
-cc_library_static {
-    name: "static_lib_1",
-    srcs: ["static_lib_1.cc"],
-}
-
-cc_library_static {
-    name: "static_lib_2",
-    srcs: ["static_lib_2.cc"],
-}
-
-cc_library_static {
-    name: "whole_static_lib_1",
-    srcs: ["whole_static_lib_1.cc"],
-}
-
-cc_library_static {
-    name: "whole_static_lib_2",
-    srcs: ["whole_static_lib_2.cc"],
-}
-
-cc_library_static {
-    name: "foo_static",
-    srcs: [
-        "foo_static1.cc",
-        "foo_static2.cc",
-    ],
-    cflags: [
-        "-Dflag1",
-        "-Dflag2"
-    ],
-    static_libs: [
-        "static_lib_1",
-        "static_lib_2"
-    ],
-    whole_static_libs: [
-        "whole_static_lib_1",
-        "whole_static_lib_2"
-    ],
-    include_dirs: [
-        "include_dir_1",
-        "include_dir_2",
-    ],
-    local_include_dirs: [
-        "local_include_dir_1",
-        "local_include_dir_2",
-    ],
-    export_include_dirs: [
-        "export_include_dir_1",
-        "export_include_dir_2"
-    ],
-    header_libs: [
-        "header_lib_1",
-        "header_lib_2"
-    ],
-    sdk_version: "current",
-    min_sdk_version: "29",
-
-    // TODO: Also support export_header_lib_headers
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
-				"absolute_includes": `[
-        "include_dir_1",
-        "include_dir_2",
-    ]`,
-				"copts": `[
-        "-Dflag1",
-        "-Dflag2",
-    ]`,
-				"export_includes": `[
-        "export_include_dir_1",
-        "export_include_dir_2",
-    ]`,
-				"implementation_deps": `[
-        ":header_lib_1",
-        ":header_lib_2",
-        ":static_lib_1",
-        ":static_lib_2",
-    ]`,
-				"local_includes": `[
-        "local_include_dir_1",
-        "local_include_dir_2",
-        ".",
-    ]`,
-				"srcs": `[
-        "foo_static1.cc",
-        "foo_static2.cc",
-    ]`,
-				"whole_archive_deps": `[
-        ":whole_static_lib_1",
-        ":whole_static_lib_2",
-    ]`,
-				"sdk_version":     `"current"`,
-				"min_sdk_version": `"29"`,
-				"deps": `select({
-        "//build/bazel/rules/apex:unbundled_app": ["//build/bazel/rules/cc:ndk_sysroot"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticSubpackage(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static subpackage test",
-		Filesystem: map[string]string{
-			// subpackage with subdirectory
-			"subpackage/Android.bp":                         "",
-			"subpackage/subpackage_header.h":                "",
-			"subpackage/subdirectory/subdirectory_header.h": "",
-			// subsubpackage with subdirectory
-			"subpackage/subsubpackage/Android.bp":                         "",
-			"subpackage/subsubpackage/subsubpackage_header.h":             "",
-			"subpackage/subsubpackage/subdirectory/subdirectory_header.h": "",
-			// subsubsubpackage with subdirectory
-			"subpackage/subsubpackage/subsubsubpackage/Android.bp":                         "",
-			"subpackage/subsubpackage/subsubsubpackage/subsubsubpackage_header.h":          "",
-			"subpackage/subsubpackage/subsubsubpackage/subdirectory/subdirectory_header.h": "",
-		},
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library_static {
-    name: "foo_static",
-    srcs: [],
-    include_dirs: [
-        "subpackage",
-    ],
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
-				"absolute_includes": `["subpackage"]`,
-				"local_includes":    `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticExportIncludeDir(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static export include dir",
-		Filesystem: map[string]string{
-			// subpackage with subdirectory
-			"subpackage/Android.bp":                         "",
-			"subpackage/subpackage_header.h":                "",
-			"subpackage/subdirectory/subdirectory_header.h": "",
-		},
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library_static {
-    name: "foo_static",
-    export_include_dirs: ["subpackage"],
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
-				"export_includes": `["subpackage"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticExportSystemIncludeDir(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static export system include dir",
-		Filesystem: map[string]string{
-			// subpackage with subdirectory
-			"subpackage/Android.bp":                         "",
-			"subpackage/subpackage_header.h":                "",
-			"subpackage/subdirectory/subdirectory_header.h": "",
-		},
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library_static {
-    name: "foo_static",
-    export_system_include_dirs: ["subpackage"],
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
-				"export_system_includes": `["subpackage"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticManyIncludeDirs(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static include_dirs, local_include_dirs, export_include_dirs (b/183742505)",
-		Dir:         "subpackage",
-		Filesystem: map[string]string{
-			// subpackage with subdirectory
-			"subpackage/Android.bp": `
-cc_library_static {
-    name: "foo_static",
-    // include_dirs are workspace/root relative
-    include_dirs: [
-        "subpackage/subsubpackage",
-        "subpackage2",
-        "subpackage3/subsubpackage"
-    ],
-    local_include_dirs: ["subsubpackage2"], // module dir relative
-    export_include_dirs: ["./exported_subsubpackage"], // module dir relative
-    include_build_directory: true,
-    bazel_module: { bp2build_available: true },
-}`,
-			"subpackage/subsubpackage/header.h":          "",
-			"subpackage/subsubpackage2/header.h":         "",
-			"subpackage/exported_subsubpackage/header.h": "",
-			"subpackage2/header.h":                       "",
-			"subpackage3/subsubpackage/header.h":         "",
-		},
-		Blueprint: soongCcLibraryStaticPreamble,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
-				"absolute_includes": `[
-        "subpackage/subsubpackage",
-        "subpackage2",
-        "subpackage3/subsubpackage",
-    ]`,
-				"export_includes": `["./exported_subsubpackage"]`,
-				"local_includes": `[
-        "subsubpackage2",
-        ".",
-    ]`,
-			})},
-	})
-}
-
-func TestCcLibraryStaticIncludeBuildDirectoryDisabled(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static include_build_directory disabled",
-		Filesystem: map[string]string{
-			// subpackage with subdirectory
-			"subpackage/Android.bp":                         "",
-			"subpackage/subpackage_header.h":                "",
-			"subpackage/subdirectory/subdirectory_header.h": "",
-		},
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library_static {
-    name: "foo_static",
-    include_dirs: ["subpackage"], // still used, but local_include_dirs is recommended
-    local_include_dirs: ["subpackage2"],
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
-				"absolute_includes": `["subpackage"]`,
-				"local_includes":    `["subpackage2"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticIncludeBuildDirectoryEnabled(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static include_build_directory enabled",
-		Filesystem: map[string]string{
-			// subpackage with subdirectory
-			"subpackage/Android.bp":                         "",
-			"subpackage/subpackage_header.h":                "",
-			"subpackage2/Android.bp":                        "",
-			"subpackage2/subpackage2_header.h":              "",
-			"subpackage/subdirectory/subdirectory_header.h": "",
-		},
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library_static {
-    name: "foo_static",
-    include_dirs: ["subpackage"], // still used, but local_include_dirs is recommended
-    local_include_dirs: ["subpackage2"],
-    include_build_directory: true,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
-				"absolute_includes": `["subpackage"]`,
-				"local_includes": `[
-        "subpackage2",
-        ".",
-    ]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticArchSpecificStaticLib(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description:             "cc_library_static arch-specific static_libs",
-		Filesystem:              map[string]string{},
-		StubbedBuildDefinitions: []string{"static_dep", "static_dep2"},
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library_static {
-    name: "static_dep",
-}
-cc_library_static {
-    name: "static_dep2",
-}
-cc_library_static {
-    name: "foo_static",
-    arch: { arm64: { static_libs: ["static_dep"], whole_static_libs: ["static_dep2"] } },
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
-				"implementation_deps": `select({
-        "//build/bazel_common_rules/platforms/arch:arm64": [":static_dep"],
-        "//conditions:default": [],
-    })`,
-				"whole_archive_deps": `select({
-        "//build/bazel_common_rules/platforms/arch:arm64": [":static_dep2"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticOsSpecificStaticLib(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description:             "cc_library_static os-specific static_libs",
-		Filesystem:              map[string]string{},
-		StubbedBuildDefinitions: []string{"static_dep", "static_dep2"},
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library_static {
-    name: "static_dep",
-}
-cc_library_static {
-    name: "static_dep2",
-}
-cc_library_static {
-    name: "foo_static",
-    target: { android: { static_libs: ["static_dep"], whole_static_libs: ["static_dep2"] } },
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
-				"implementation_deps": `select({
-        "//build/bazel_common_rules/platforms/os:android": [":static_dep"],
-        "//conditions:default": [],
-    })`,
-				"whole_archive_deps": `select({
-        "//build/bazel_common_rules/platforms/os:android": [":static_dep2"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticBaseArchOsSpecificStaticLib(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static base, arch and os-specific static_libs",
-		Filesystem:  map[string]string{},
-		StubbedBuildDefinitions: []string{"static_dep", "static_dep2", "static_dep3",
-			"static_dep4"},
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library_static {
-    name: "static_dep",
-}
-cc_library_static {
-    name: "static_dep2",
-}
-cc_library_static {
-    name: "static_dep3",
-}
-cc_library_static {
-    name: "static_dep4",
-}
-cc_library_static {
-    name: "foo_static",
-    static_libs: ["static_dep"],
-    whole_static_libs: ["static_dep2"],
-    target: { android: { static_libs: ["static_dep3"] } },
-    arch: { arm64: { static_libs: ["static_dep4"] } },
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
-				"implementation_deps": `[":static_dep"] + select({
-        "//build/bazel_common_rules/platforms/arch:arm64": [":static_dep4"],
-        "//conditions:default": [],
-    }) + select({
-        "//build/bazel_common_rules/platforms/os:android": [":static_dep3"],
-        "//conditions:default": [],
-    })`,
-				"whole_archive_deps": `[":static_dep2"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticSimpleExcludeSrcs(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static simple exclude_srcs",
-		Filesystem: map[string]string{
-			"common.c":       "",
-			"foo-a.c":        "",
-			"foo-excluded.c": "",
-		},
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library_static {
-    name: "foo_static",
-    srcs: ["common.c", "foo-*.c"],
-    exclude_srcs: ["foo-excluded.c"],
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
-				"srcs_c": `[
-        "common.c",
-        "foo-a.c",
-    ]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticOneArchSrcs(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static one arch specific srcs",
-		Filesystem: map[string]string{
-			"common.c":  "",
-			"foo-arm.c": "",
-		},
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library_static {
-    name: "foo_static",
-    srcs: ["common.c"],
-    arch: { arm: { srcs: ["foo-arm.c"] } },
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
-				"srcs_c": `["common.c"] + select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["foo-arm.c"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticOneArchSrcsExcludeSrcs(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static one arch specific srcs and exclude_srcs",
-		Filesystem: map[string]string{
-			"common.c":           "",
-			"for-arm.c":          "",
-			"not-for-arm.c":      "",
-			"not-for-anything.c": "",
-		},
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library_static {
-    name: "foo_static",
-    srcs: ["common.c", "not-for-*.c"],
-    exclude_srcs: ["not-for-anything.c"],
-    arch: {
-        arm: { srcs: ["for-arm.c"], exclude_srcs: ["not-for-arm.c"] },
-    },
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
-				"srcs_c": `["common.c"] + select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["for-arm.c"],
-        "//conditions:default": ["not-for-arm.c"],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticTwoArchExcludeSrcs(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static arch specific exclude_srcs for 2 architectures",
-		Filesystem: map[string]string{
-			"common.c":      "",
-			"for-arm.c":     "",
-			"for-x86.c":     "",
-			"not-for-arm.c": "",
-			"not-for-x86.c": "",
-		},
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library_static {
-    name: "foo_static",
-    srcs: ["common.c", "not-for-*.c"],
-    exclude_srcs: ["not-for-everything.c"],
-    arch: {
-        arm: { srcs: ["for-arm.c"], exclude_srcs: ["not-for-arm.c"] },
-        x86: { srcs: ["for-x86.c"], exclude_srcs: ["not-for-x86.c"] },
-    },
-    include_build_directory: false,
-} `,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
-				"srcs_c": `["common.c"] + select({
-        "//build/bazel_common_rules/platforms/arch:arm": [
-            "not-for-x86.c",
-            "for-arm.c",
-        ],
-        "//build/bazel_common_rules/platforms/arch:x86": [
-            "not-for-arm.c",
-            "for-x86.c",
-        ],
-        "//conditions:default": [
-            "not-for-arm.c",
-            "not-for-x86.c",
-        ],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticFourArchExcludeSrcs(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static arch specific exclude_srcs for 4 architectures",
-		Filesystem: map[string]string{
-			"common.c":             "",
-			"for-arm.c":            "",
-			"for-arm64.c":          "",
-			"for-x86.c":            "",
-			"for-x86_64.c":         "",
-			"not-for-arm.c":        "",
-			"not-for-arm64.c":      "",
-			"not-for-x86.c":        "",
-			"not-for-x86_64.c":     "",
-			"not-for-everything.c": "",
-		},
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library_static {
-    name: "foo_static",
-    srcs: ["common.c", "not-for-*.c"],
-    exclude_srcs: ["not-for-everything.c"],
-    arch: {
-        arm: { srcs: ["for-arm.c"], exclude_srcs: ["not-for-arm.c"] },
-        arm64: { srcs: ["for-arm64.c"], exclude_srcs: ["not-for-arm64.c"] },
-        x86: { srcs: ["for-x86.c"], exclude_srcs: ["not-for-x86.c"] },
-        x86_64: { srcs: ["for-x86_64.c"], exclude_srcs: ["not-for-x86_64.c"] },
-  },
-    include_build_directory: false,
-} `,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
-				"srcs_c": `["common.c"] + select({
-        "//build/bazel_common_rules/platforms/arch:arm": [
-            "not-for-arm64.c",
-            "not-for-x86.c",
-            "not-for-x86_64.c",
-            "for-arm.c",
-        ],
-        "//build/bazel_common_rules/platforms/arch:arm64": [
-            "not-for-arm.c",
-            "not-for-x86.c",
-            "not-for-x86_64.c",
-            "for-arm64.c",
-        ],
-        "//build/bazel_common_rules/platforms/arch:x86": [
-            "not-for-arm.c",
-            "not-for-arm64.c",
-            "not-for-x86_64.c",
-            "for-x86.c",
-        ],
-        "//build/bazel_common_rules/platforms/arch:x86_64": [
-            "not-for-arm.c",
-            "not-for-arm64.c",
-            "not-for-x86.c",
-            "for-x86_64.c",
-        ],
-        "//conditions:default": [
-            "not-for-arm.c",
-            "not-for-arm64.c",
-            "not-for-x86.c",
-            "not-for-x86_64.c",
-        ],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticOneArchEmpty(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static one arch empty",
-		Filesystem: map[string]string{
-			"common.cc":       "",
-			"foo-no-arm.cc":   "",
-			"foo-excluded.cc": "",
-		},
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library_static {
-    name: "foo_static",
-    srcs: ["common.cc", "foo-*.cc"],
-    exclude_srcs: ["foo-excluded.cc"],
-    arch: {
-        arm: { exclude_srcs: ["foo-no-arm.cc"] },
-    },
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
-				"srcs": `["common.cc"] + select({
-        "//build/bazel_common_rules/platforms/arch:arm": [],
-        "//conditions:default": ["foo-no-arm.cc"],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticOneArchEmptyOtherSet(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static one arch empty other set",
-		Filesystem: map[string]string{
-			"common.cc":       "",
-			"foo-no-arm.cc":   "",
-			"x86-only.cc":     "",
-			"foo-excluded.cc": "",
-		},
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library_static {
-    name: "foo_static",
-    srcs: ["common.cc", "foo-*.cc"],
-    exclude_srcs: ["foo-excluded.cc"],
-    arch: {
-        arm: { exclude_srcs: ["foo-no-arm.cc"] },
-        x86: { srcs: ["x86-only.cc"] },
-    },
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
-				"srcs": `["common.cc"] + select({
-        "//build/bazel_common_rules/platforms/arch:arm": [],
-        "//build/bazel_common_rules/platforms/arch:x86": [
-            "foo-no-arm.cc",
-            "x86-only.cc",
-        ],
-        "//conditions:default": ["foo-no-arm.cc"],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticMultipleDepSameName(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description:             "cc_library_static multiple dep same name panic",
-		Filesystem:              map[string]string{},
-		StubbedBuildDefinitions: []string{"static_dep"},
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library_static {
-    name: "static_dep",
-}
-cc_library_static {
-    name: "foo_static",
-    static_libs: ["static_dep", "static_dep"],
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
-				"implementation_deps": `[":static_dep"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticOneMultilibSrcsExcludeSrcs(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static 1 multilib srcs and exclude_srcs",
-		Filesystem: map[string]string{
-			"common.c":        "",
-			"for-lib32.c":     "",
-			"not-for-lib32.c": "",
-		},
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library_static {
-    name: "foo_static",
-    srcs: ["common.c", "not-for-*.c"],
-    multilib: {
-        lib32: { srcs: ["for-lib32.c"], exclude_srcs: ["not-for-lib32.c"] },
-    },
-    include_build_directory: false,
-} `,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
-				"srcs_c": `["common.c"] + select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["for-lib32.c"],
-        "//build/bazel_common_rules/platforms/arch:x86": ["for-lib32.c"],
-        "//conditions:default": ["not-for-lib32.c"],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticTwoMultilibSrcsExcludeSrcs(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static 2 multilib srcs and exclude_srcs",
-		Filesystem: map[string]string{
-			"common.c":        "",
-			"for-lib32.c":     "",
-			"for-lib64.c":     "",
-			"not-for-lib32.c": "",
-			"not-for-lib64.c": "",
-		},
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library_static {
-    name: "foo_static",
-    srcs: ["common.c", "not-for-*.c"],
-    multilib: {
-        lib32: { srcs: ["for-lib32.c"], exclude_srcs: ["not-for-lib32.c"] },
-        lib64: { srcs: ["for-lib64.c"], exclude_srcs: ["not-for-lib64.c"] },
-    },
-    include_build_directory: false,
-} `,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
-				"srcs_c": `["common.c"] + select({
-        "//build/bazel_common_rules/platforms/arch:arm": [
-            "not-for-lib64.c",
-            "for-lib32.c",
-        ],
-        "//build/bazel_common_rules/platforms/arch:arm64": [
-            "not-for-lib32.c",
-            "for-lib64.c",
-        ],
-        "//build/bazel_common_rules/platforms/arch:riscv64": [
-            "not-for-lib32.c",
-            "for-lib64.c",
-        ],
-        "//build/bazel_common_rules/platforms/arch:x86": [
-            "not-for-lib64.c",
-            "for-lib32.c",
-        ],
-        "//build/bazel_common_rules/platforms/arch:x86_64": [
-            "not-for-lib32.c",
-            "for-lib64.c",
-        ],
-        "//conditions:default": [
-            "not-for-lib32.c",
-            "not-for-lib64.c",
-        ],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarySTaticArchMultilibSrcsExcludeSrcs(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static arch and multilib srcs and exclude_srcs",
-		Filesystem: map[string]string{
-			"common.c":             "",
-			"for-arm.c":            "",
-			"for-arm64.c":          "",
-			"for-x86.c":            "",
-			"for-x86_64.c":         "",
-			"for-lib32.c":          "",
-			"for-lib64.c":          "",
-			"not-for-arm.c":        "",
-			"not-for-arm64.c":      "",
-			"not-for-riscv64.c":    "",
-			"not-for-x86.c":        "",
-			"not-for-x86_64.c":     "",
-			"not-for-lib32.c":      "",
-			"not-for-lib64.c":      "",
-			"not-for-everything.c": "",
-		},
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library_static {
-   name: "foo_static",
-   srcs: ["common.c", "not-for-*.c"],
-   exclude_srcs: ["not-for-everything.c"],
-   arch: {
-       arm: { srcs: ["for-arm.c"], exclude_srcs: ["not-for-arm.c"] },
-       arm64: { srcs: ["for-arm64.c"], exclude_srcs: ["not-for-arm64.c"] },
-       riscv64: { srcs: ["for-riscv64.c"], exclude_srcs: ["not-for-riscv64.c"] },
-       x86: { srcs: ["for-x86.c"], exclude_srcs: ["not-for-x86.c"] },
-       x86_64: { srcs: ["for-x86_64.c"], exclude_srcs: ["not-for-x86_64.c"] },
-   },
-   multilib: {
-       lib32: { srcs: ["for-lib32.c"], exclude_srcs: ["not-for-lib32.c"] },
-       lib64: { srcs: ["for-lib64.c"], exclude_srcs: ["not-for-lib64.c"] },
-   },
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
-				"srcs_c": `["common.c"] + select({
-        "//build/bazel_common_rules/platforms/arch:arm": [
-            "not-for-arm64.c",
-            "not-for-lib64.c",
-            "not-for-riscv64.c",
-            "not-for-x86.c",
-            "not-for-x86_64.c",
-            "for-arm.c",
-            "for-lib32.c",
-        ],
-        "//build/bazel_common_rules/platforms/arch:arm64": [
-            "not-for-arm.c",
-            "not-for-lib32.c",
-            "not-for-riscv64.c",
-            "not-for-x86.c",
-            "not-for-x86_64.c",
-            "for-arm64.c",
-            "for-lib64.c",
-        ],
-        "//build/bazel_common_rules/platforms/arch:riscv64": [
-            "not-for-arm.c",
-            "not-for-arm64.c",
-            "not-for-lib32.c",
-            "not-for-x86.c",
-            "not-for-x86_64.c",
-            "for-riscv64.c",
-            "for-lib64.c",
-        ],
-        "//build/bazel_common_rules/platforms/arch:x86": [
-            "not-for-arm.c",
-            "not-for-arm64.c",
-            "not-for-lib64.c",
-            "not-for-riscv64.c",
-            "not-for-x86_64.c",
-            "for-x86.c",
-            "for-lib32.c",
-        ],
-        "//build/bazel_common_rules/platforms/arch:x86_64": [
-            "not-for-arm.c",
-            "not-for-arm64.c",
-            "not-for-lib32.c",
-            "not-for-riscv64.c",
-            "not-for-x86.c",
-            "for-x86_64.c",
-            "for-lib64.c",
-        ],
-        "//conditions:default": [
-            "not-for-arm.c",
-            "not-for-arm64.c",
-            "not-for-lib32.c",
-            "not-for-lib64.c",
-            "not-for-riscv64.c",
-            "not-for-x86.c",
-            "not-for-x86_64.c",
-        ],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticGeneratedHeadersAllPartitions(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		StubbedBuildDefinitions: []string{"generated_hdr", "export_generated_hdr"},
-		Blueprint: soongCcLibraryStaticPreamble + `
-genrule {
-    name: "generated_hdr",
-    cmd: "nothing to see here",
-}
-
-genrule {
-    name: "export_generated_hdr",
-    cmd: "nothing to see here",
-}
-
-cc_library_static {
-    name: "foo_static",
-    srcs: ["cpp_src.cpp", "as_src.S", "c_src.c"],
-    generated_headers: ["generated_hdr", "export_generated_hdr"],
-    export_generated_headers: ["export_generated_hdr"],
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
-				"export_includes": `["."]`,
-				"local_includes":  `["."]`,
-				"hdrs":            `[":export_generated_hdr"]`,
-				"srcs": `[
-        "cpp_src.cpp",
-        ":generated_hdr",
-    ]`,
-				"srcs_as": `[
-        "as_src.S",
-        ":generated_hdr",
-    ]`,
-				"srcs_c": `[
-        "c_src.c",
-        ":generated_hdr",
-    ]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticGeneratedHeadersMultipleExports(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		StubbedBuildDefinitions: []string{"generated_hdr", "export_generated_hdr"},
-		Blueprint: soongCcLibraryStaticPreamble + `
-genrule {
-    name: "generated_hdr",
-    cmd: "nothing to see here",
-    export_include_dirs: ["foo", "bar"],
-}
-
-genrule {
-    name: "export_generated_hdr",
-    cmd: "nothing to see here",
-    export_include_dirs: ["a", "b"],
-}
-
-cc_library_static {
-    name: "foo_static",
-    generated_headers: ["generated_hdr", "export_generated_hdr"],
-    export_generated_headers: ["export_generated_hdr"],
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
-				"deps":                `[":export_generated_hdr__header_library"]`,
-				"implementation_deps": `[":generated_hdr__header_library"]`,
-			}),
-		},
-	})
-}
-
-// generated_headers has "variant_prepend" tag. In bp2build output,
-// variant info(select) should go before general info.
-func TestCcLibraryStaticArchSrcsExcludeSrcsGeneratedFiles(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static arch srcs/exclude_srcs with generated files",
-		StubbedBuildDefinitions: []string{"//dep:generated_src_other_pkg", "//dep:generated_hdr_other_pkg",
-			"//dep:generated_src_other_pkg_x86", "//dep:generated_hdr_other_pkg_x86", "//dep:generated_hdr_other_pkg_android",
-			"generated_src", "generated_src_not_x86", "generated_src_android", "generated_hdr",
-		},
-		Filesystem: map[string]string{
-			"common.cpp":             "",
-			"for-x86.cpp":            "",
-			"not-for-x86.cpp":        "",
-			"not-for-everything.cpp": "",
-			"dep/Android.bp": simpleModule("genrule", "generated_src_other_pkg") +
-				simpleModule("genrule", "generated_hdr_other_pkg") +
-				simpleModule("genrule", "generated_src_other_pkg_x86") +
-				simpleModule("genrule", "generated_hdr_other_pkg_x86") +
-				simpleModule("genrule", "generated_hdr_other_pkg_android"),
-		},
-		Blueprint: soongCcLibraryStaticPreamble +
-			simpleModule("genrule", "generated_src") +
-			simpleModule("genrule", "generated_src_not_x86") +
-			simpleModule("genrule", "generated_src_android") +
-			simpleModule("genrule", "generated_hdr") + `
-cc_library_static {
-    name: "foo_static",
-    srcs: ["common.cpp", "not-for-*.cpp"],
-    exclude_srcs: ["not-for-everything.cpp"],
-    generated_sources: ["generated_src", "generated_src_other_pkg", "generated_src_not_x86"],
-    generated_headers: ["generated_hdr", "generated_hdr_other_pkg"],
-    export_generated_headers: ["generated_hdr_other_pkg"],
-    arch: {
-        x86: {
-          srcs: ["for-x86.cpp"],
-          exclude_srcs: ["not-for-x86.cpp"],
-          generated_headers: ["generated_hdr_other_pkg_x86"],
-          exclude_generated_sources: ["generated_src_not_x86"],
-    export_generated_headers: ["generated_hdr_other_pkg_x86"],
-        },
-    },
-    target: {
-        android: {
-            generated_sources: ["generated_src_android"],
-            generated_headers: ["generated_hdr_other_pkg_android"],
-    export_generated_headers: ["generated_hdr_other_pkg_android"],
-        },
-    },
-
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
-				"srcs": `[
-        "common.cpp",
-        ":generated_src",
-        "//dep:generated_src_other_pkg",
-        ":generated_hdr",
-    ] + select({
-        "//build/bazel_common_rules/platforms/arch:x86": ["for-x86.cpp"],
-        "//conditions:default": [
-            "not-for-x86.cpp",
-            ":generated_src_not_x86",
-        ],
-    }) + select({
-        "//build/bazel_common_rules/platforms/os:android": [":generated_src_android"],
-        "//conditions:default": [],
-    })`,
-				"hdrs": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["//dep:generated_hdr_other_pkg_android"],
-        "//conditions:default": [],
-    }) + select({
-        "//build/bazel_common_rules/platforms/arch:x86": ["//dep:generated_hdr_other_pkg_x86"],
-        "//conditions:default": [],
-    }) + ["//dep:generated_hdr_other_pkg"]`,
-				"local_includes":           `["."]`,
-				"export_absolute_includes": `["dep"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticGetTargetProperties(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-
-		Description: "cc_library_static complex GetTargetProperties",
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library_static {
-    name: "foo_static",
-    target: {
-        android: {
-            srcs: ["android_src.c"],
-        },
-        android_arm: {
-            srcs: ["android_arm_src.c"],
-        },
-        android_arm64: {
-            srcs: ["android_arm64_src.c"],
-        },
-        android_x86: {
-            srcs: ["android_x86_src.c"],
-        },
-        android_x86_64: {
-            srcs: ["android_x86_64_src.c"],
-        },
-        linux_bionic_arm64: {
-            srcs: ["linux_bionic_arm64_src.c"],
-        },
-        linux_bionic_x86_64: {
-            srcs: ["linux_bionic_x86_64_src.c"],
-        },
-    },
-    include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
-				"srcs_c": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["android_src.c"],
-        "//conditions:default": [],
-    }) + select({
-        "//build/bazel_common_rules/platforms/os_arch:android_arm": ["android_arm_src.c"],
-        "//build/bazel_common_rules/platforms/os_arch:android_arm64": ["android_arm64_src.c"],
-        "//build/bazel_common_rules/platforms/os_arch:android_x86": ["android_x86_src.c"],
-        "//build/bazel_common_rules/platforms/os_arch:android_x86_64": ["android_x86_64_src.c"],
-        "//build/bazel_common_rules/platforms/os_arch:linux_bionic_arm64": ["linux_bionic_arm64_src.c"],
-        "//build/bazel_common_rules/platforms/os_arch:linux_bionic_x86_64": ["linux_bionic_x86_64_src.c"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticProductVariableSelects(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static product variable selects",
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library_static {
-    name: "foo_static",
-    srcs: ["common.c"],
-    product_variables: {
-      malloc_not_svelte: {
-        cflags: ["-Wmalloc_not_svelte"],
-      },
-      malloc_zero_contents: {
-        cflags: ["-Wmalloc_zero_contents"],
-      },
-      binder32bit: {
-        cflags: ["-Wbinder32bit"],
-      },
-    },
-    include_build_directory: false,
-} `,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
-				"copts": `select({
-        "//build/bazel/product_config/config_settings:binder32bit": ["-Wbinder32bit"],
-        "//conditions:default": [],
-    }) + select({
-        "//build/bazel/product_config/config_settings:malloc_not_svelte": ["-Wmalloc_not_svelte"],
-        "//conditions:default": [],
-    }) + select({
-        "//build/bazel/product_config/config_settings:malloc_zero_contents": ["-Wmalloc_zero_contents"],
-        "//conditions:default": [],
-    })`,
-				"srcs_c": `["common.c"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticProductVariableArchSpecificSelects(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static arch-specific product variable selects",
-		Filesystem:  map[string]string{},
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library_static {
-    name: "foo_static",
-    srcs: ["common.c"],
-    product_variables: {
-      malloc_not_svelte: {
-        cflags: ["-Wmalloc_not_svelte"],
-      },
-    },
-    arch: {
-        arm64: {
-            product_variables: {
-                malloc_not_svelte: {
-                    cflags: ["-Warm64_malloc_not_svelte"],
-                },
-            },
-        },
-    },
-    multilib: {
-        lib32: {
-            product_variables: {
-                malloc_not_svelte: {
-                    cflags: ["-Wlib32_malloc_not_svelte"],
-                },
-            },
-        },
-    },
-    target: {
-        android: {
-            product_variables: {
-                malloc_not_svelte: {
-                    cflags: ["-Wandroid_malloc_not_svelte"],
-                },
-            },
-        }
-    },
-    include_build_directory: false,
-} `,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
-				"copts": `select({
-        "//build/bazel/product_config/config_settings:malloc_not_svelte": ["-Wmalloc_not_svelte"],
-        "//conditions:default": [],
-    }) + select({
-        "//build/bazel/product_config/config_settings:malloc_not_svelte-android": ["-Wandroid_malloc_not_svelte"],
-        "//conditions:default": [],
-    }) + select({
-        "//build/bazel/product_config/config_settings:malloc_not_svelte-arm": ["-Wlib32_malloc_not_svelte"],
-        "//conditions:default": [],
-    }) + select({
-        "//build/bazel/product_config/config_settings:malloc_not_svelte-arm64": ["-Warm64_malloc_not_svelte"],
-        "//conditions:default": [],
-    }) + select({
-        "//build/bazel/product_config/config_settings:malloc_not_svelte-x86": ["-Wlib32_malloc_not_svelte"],
-        "//conditions:default": [],
-    })`,
-				"srcs_c": `["common.c"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticProductVariableStringReplacement(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static product variable string replacement",
-		Filesystem:  map[string]string{},
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library_static {
-    name: "foo_static",
-    srcs: ["common.S"],
-    product_variables: {
-      platform_sdk_version: {
-          asflags: ["-DPLATFORM_SDK_VERSION=%d"],
-      },
-    },
-    include_build_directory: false,
-} `,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
-				"asflags": `select({
-        "//build/bazel/product_config/config_settings:platform_sdk_version": ["-DPLATFORM_SDK_VERSION=$(Platform_sdk_version)"],
-        "//conditions:default": [],
-    })`,
-				"srcs_as": `["common.S"]`,
-			}),
-		},
-	})
-}
-
-func TestStaticLibrary_SystemSharedLibsRootEmpty(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static system_shared_lib empty root",
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library_static {
-    name: "root_empty",
-    system_shared_libs: [],
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "root_empty", AttrNameToString{
-				"system_dynamic_deps": `[]`,
-			}),
-		},
-	})
-}
-
-func TestStaticLibrary_SystemSharedLibsStaticEmpty(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static system_shared_lib empty static default",
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_defaults {
-    name: "static_empty_defaults",
-    static: {
-        system_shared_libs: [],
-    },
-    include_build_directory: false,
-}
-cc_library_static {
-    name: "static_empty",
-    defaults: ["static_empty_defaults"],
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "static_empty", AttrNameToString{
-				"system_dynamic_deps": `[]`,
-			}),
-		},
-	})
-}
-
-func TestStaticLibrary_SystemSharedLibsBionicEmpty(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description:             "cc_library_static system_shared_lib empty for bionic variant",
-		StubbedBuildDefinitions: []string{"libc_musl"},
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library {
-		name: "libc_musl",
-}
-
-cc_library_static {
-    name: "target_bionic_empty",
-    target: {
-        bionic: {
-            system_shared_libs: [],
-        },
-    },
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "target_bionic_empty", AttrNameToString{
-				"system_dynamic_deps": `select({
-        "//build/bazel_common_rules/platforms/os:linux_musl": [":libc_musl"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestStaticLibrary_SystemSharedLibsLinuxBionicEmpty(t *testing.T) {
-	// Note that this behavior is technically incorrect (it's a simplification).
-	// The correct behavior would be if bp2build wrote `system_dynamic_deps = []`
-	// only for linux_bionic, but `android` had `["libc", "libdl", "libm"].
-	// b/195791252 tracks the fix.
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description:             "cc_library_static system_shared_lib empty for linux_bionic variant",
-		StubbedBuildDefinitions: []string{"libc_musl"},
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library {
-		name: "libc_musl",
-}
-
-cc_library_static {
-    name: "target_linux_bionic_empty",
-    target: {
-        linux_bionic: {
-            system_shared_libs: [],
-        },
-    },
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "target_linux_bionic_empty", AttrNameToString{
-				"system_dynamic_deps": `select({
-        "//build/bazel_common_rules/platforms/os:linux_musl": [":libc_musl"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestStaticLibrary_SystemSharedLibsMuslEmpty(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description:             "cc_library_static system_shared_lib empty for musl variant",
-		StubbedBuildDefinitions: []string{"libc_musl"},
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library {
-		name: "libc_musl",
-}
-
-cc_library_static {
-    name: "target_musl_empty",
-    target: {
-        musl: {
-            system_shared_libs: [],
-        },
-    },
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "target_musl_empty", AttrNameToString{
-				"system_dynamic_deps": `[]`,
-			}),
-		},
-	})
-}
-
-func TestStaticLibrary_SystemSharedLibsLinuxMuslEmpty(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description:             "cc_library_static system_shared_lib empty for linux_musl variant",
-		StubbedBuildDefinitions: []string{"libc_musl"},
-		Blueprint: soongCcLibraryStaticPreamble + `
-cc_library {
-		name: "libc_musl",
-}
-
-cc_library_static {
-    name: "target_linux_musl_empty",
-    target: {
-        linux_musl: {
-            system_shared_libs: [],
-        },
-    },
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "target_linux_musl_empty", AttrNameToString{
-				"system_dynamic_deps": `[]`,
-			}),
-		},
-	})
-}
-
-func TestStaticLibrary_SystemSharedLibsBionic(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description:             "cc_library_static system_shared_libs set for bionic variant",
-		StubbedBuildDefinitions: []string{"libc", "libc_musl"},
-		Blueprint: soongCcLibraryStaticPreamble +
-			simpleModule("cc_library", "libc") + `
-cc_library {
-	name: "libc_musl",
-}
-
-cc_library_static {
-    name: "target_bionic",
-    target: {
-        bionic: {
-            system_shared_libs: ["libc"],
-        },
-    },
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "target_bionic", AttrNameToString{
-				"system_dynamic_deps": `select({
-        "//build/bazel_common_rules/platforms/os:android": [":libc"],
-        "//build/bazel_common_rules/platforms/os:linux_bionic": [":libc"],
-        "//build/bazel_common_rules/platforms/os:linux_musl": [":libc_musl"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestStaticLibrary_SystemSharedLibsLinuxRootAndLinuxBionic(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description:             "cc_library_static system_shared_libs set for root and linux_bionic variant",
-		StubbedBuildDefinitions: []string{"libc", "libm", "libc_musl"},
-		Blueprint: soongCcLibraryStaticPreamble +
-			simpleModule("cc_library", "libc") +
-			simpleModule("cc_library", "libm") + `
-cc_library {
-	name: "libc_musl",
-}
-
-cc_library_static {
-    name: "target_linux_bionic",
-    system_shared_libs: ["libc"],
-    target: {
-        linux_bionic: {
-            system_shared_libs: ["libm"],
-        },
-    },
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "target_linux_bionic", AttrNameToString{
-				"system_dynamic_deps": `[":libc"] + select({
-        "//build/bazel_common_rules/platforms/os:linux_bionic": [":libm"],
-        "//build/bazel_common_rules/platforms/os:linux_musl": [":libc_musl"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestCcLibrarystatic_SystemSharedLibUsedAsDep(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description:             "cc_library_static system_shared_lib empty for linux_bionic variant",
-		StubbedBuildDefinitions: []string{"libc", "libm"},
-		Blueprint: soongCcLibraryStaticPreamble +
-			simpleModule("cc_library", "libc") + `
-
-cc_library {
-    name: "libm",
-    stubs: {
-        symbol_file: "libm.map.txt",
-        versions: ["current"],
-    },
-    apex_available: ["com.android.runtime"],
-}
-
-cc_library_static {
-    name: "used_in_bionic_oses",
-    target: {
-        android: {
-            shared_libs: ["libc"],
-        },
-        linux_bionic: {
-            shared_libs: ["libc"],
-        },
-    },
-    include_build_directory: false,
-    apex_available: ["foo"],
-}
-
-cc_library_static {
-    name: "all",
-    shared_libs: ["libc"],
-    include_build_directory: false,
-    apex_available: ["foo"],
-}
-
-cc_library_static {
-    name: "keep_for_empty_system_shared_libs",
-    shared_libs: ["libc"],
-    system_shared_libs: [],
-    include_build_directory: false,
-    apex_available: ["foo"],
-}
-
-cc_library_static {
-    name: "used_with_stubs",
-    shared_libs: ["libm"],
-    include_build_directory: false,
-    apex_available: ["foo"],
-}
-
-cc_library_static {
-    name: "keep_with_stubs",
-    shared_libs: ["libm"],
-    system_shared_libs: [],
-    include_build_directory: false,
-    apex_available: ["foo"],
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "all", AttrNameToString{
-				"tags": `["apex_available=foo"]`,
-			}),
-			MakeBazelTarget("cc_library_static", "keep_for_empty_system_shared_libs", AttrNameToString{
-				"implementation_dynamic_deps": `[":libc"]`,
-				"system_dynamic_deps":         `[]`,
-				"tags":                        `["apex_available=foo"]`,
-			}),
-			MakeBazelTarget("cc_library_static", "keep_with_stubs", AttrNameToString{
-				"implementation_dynamic_deps": `select({
-        "//build/bazel/rules/apex:foo": ["@api_surfaces//module-libapi/current:libm"],
-        "//build/bazel/rules/apex:system": ["@api_surfaces//module-libapi/current:libm"],
-        "//conditions:default": [":libm"],
-    })`,
-				"system_dynamic_deps": `[]`,
-				"tags":                `["apex_available=foo"]`,
-			}),
-			MakeBazelTarget("cc_library_static", "used_in_bionic_oses", AttrNameToString{
-				"tags": `["apex_available=foo"]`,
-			}),
-			MakeBazelTarget("cc_library_static", "used_with_stubs", AttrNameToString{
-				"tags": `["apex_available=foo"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticProto(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		StubbedBuildDefinitions: []string{"libprotobuf-cpp-full", "libprotobuf-cpp-lite"},
-		Blueprint: soongCcProtoPreamble + `cc_library_static {
-	name: "foo",
-	srcs: ["foo.proto"],
-	proto: {
-		export_proto_headers: true,
-	},
-	include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("proto_library", "foo_proto", AttrNameToString{
-				"srcs": `["foo.proto"]`,
-			}), MakeBazelTarget("cc_lite_proto_library", "foo_cc_proto_lite", AttrNameToString{
-				"deps": `[":foo_proto"]`,
-			}), MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-				"deps":               `[":libprotobuf-cpp-lite"]`,
-				"whole_archive_deps": `[":foo_cc_proto_lite"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticUseVersionLib(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Filesystem: map[string]string{
-			soongCcVersionLibBpPath: soongCcVersionLibBp,
-		},
-		StubbedBuildDefinitions: []string{"//build/soong/cc/libbuildversion:libbuildversion", "libprotobuf-cpp-full", "libprotobuf-cpp-lite"},
-		Blueprint: soongCcProtoPreamble + `cc_library_static {
-	name: "foo",
-	use_version_lib: true,
-	static_libs: ["libbuildversion"],
-	include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-				"whole_archive_deps": `["//build/soong/cc/libbuildversion:libbuildversion"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticUseVersionLibHasDep(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Filesystem: map[string]string{
-			soongCcVersionLibBpPath: soongCcVersionLibBp,
-		},
-		StubbedBuildDefinitions: []string{"//build/soong/cc/libbuildversion:libbuildversion", "libprotobuf-cpp-full", "libprotobuf-cpp-lite"},
-
-		Blueprint: soongCcProtoPreamble + `cc_library_static {
-	name: "foo",
-	use_version_lib: true,
-	whole_static_libs: ["libbuildversion"],
-	include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-				"whole_archive_deps": `["//build/soong/cc/libbuildversion:libbuildversion"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticStdInFlags(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		StubbedBuildDefinitions: []string{"libprotobuf-cpp-full", "libprotobuf-cpp-lite"},
-		Blueprint: soongCcProtoPreamble + `cc_library_static {
-	name: "foo",
-	cflags: ["-std=candcpp"],
-	conlyflags: ["-std=conly"],
-	cppflags: ["-std=cpp"],
-	include_build_directory: false,
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-				"conlyflags": `["-std=conly"]`,
-				"cppflags":   `["-std=cpp"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticStl(t *testing.T) {
-	testCases := []struct {
-		desc string
-		prop string
-		attr AttrNameToString
-	}{
-		{
-			desc: "c++_shared deduped to libc++",
-			prop: `stl: "c++_shared",`,
-			attr: AttrNameToString{
-				"stl": `"libc++"`,
-			},
-		},
-		{
-			desc: "libc++ to libc++",
-			prop: `stl: "libc++",`,
-			attr: AttrNameToString{
-				"stl": `"libc++"`,
-			},
-		},
-		{
-			desc: "c++_static to libc++_static",
-			prop: `stl: "c++_static",`,
-			attr: AttrNameToString{
-				"stl": `"libc++_static"`,
-			},
-		},
-		{
-			desc: "libc++_static to libc++_static",
-			prop: `stl: "libc++_static",`,
-			attr: AttrNameToString{
-				"stl": `"libc++_static"`,
-			},
-		},
-		{
-			desc: "system to system",
-			prop: `stl: "system",`,
-			attr: AttrNameToString{
-				"stl": `"system"`,
-			},
-		},
-		{
-			desc: "none to none",
-			prop: `stl: "none",`,
-			attr: AttrNameToString{
-				"stl": `"none"`,
-			},
-		},
-		{
-			desc: "empty to empty",
-			attr: AttrNameToString{},
-		},
-	}
-	for _, tc := range testCases {
-		t.Run(tc.desc, func(*testing.T) {
-			runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-				Blueprint: fmt.Sprintf(`cc_library_static {
-	name: "foo",
-	include_build_directory: false,
-	%s
-}`, tc.prop),
-				ExpectedBazelTargets: []string{
-					MakeBazelTarget("cc_library_static", "foo", tc.attr),
-				},
-			})
-		})
-	}
-}
-
-func TestCCLibraryStaticRuntimeDeps(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Blueprint: `cc_library_shared {
-	name: "bar",
-}
-
-cc_library_static {
-  name: "foo",
-  runtime_libs: ["bar"],
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_shared", "bar", AttrNameToString{
-				"local_includes": `["."]`,
-			}),
-			MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-				"runtime_deps":   `[":bar"]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticWithSyspropSrcs(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static with sysprop sources",
-		Blueprint: `
-cc_library_static {
-	name: "foo",
-	srcs: [
-		"bar.sysprop",
-		"baz.sysprop",
-		"blah.cpp",
-	],
-	min_sdk_version: "5",
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("sysprop_library", "foo_sysprop_library", AttrNameToString{
-				"srcs": `[
-        "bar.sysprop",
-        "baz.sysprop",
-    ]`,
-			}),
-			MakeBazelTarget("cc_sysprop_library_static", "foo_cc_sysprop_library_static", AttrNameToString{
-				"dep":             `":foo_sysprop_library"`,
-				"min_sdk_version": `"5"`,
-			}),
-			MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-				"srcs":               `["blah.cpp"]`,
-				"local_includes":     `["."]`,
-				"min_sdk_version":    `"5"`,
-				"whole_archive_deps": `[":foo_cc_sysprop_library_static"]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticWithSyspropSrcsSomeConfigs(t *testing.T) {
-	runCcLibraryTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static with sysprop sources in some configs but not others",
-		Blueprint: `
-cc_library_static {
-	name: "foo",
-	srcs: [
-		"blah.cpp",
-	],
-	target: {
-		android: {
-			srcs: ["bar.sysprop"],
-		},
-	},
-	min_sdk_version: "5",
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("sysprop_library", "foo_sysprop_library", AttrNameToString{
-				"srcs": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["bar.sysprop"],
-        "//conditions:default": [],
-    })`,
-			}),
-			MakeBazelTarget("cc_sysprop_library_static", "foo_cc_sysprop_library_static", AttrNameToString{
-				"dep":             `":foo_sysprop_library"`,
-				"min_sdk_version": `"5"`,
-			}),
-			MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-				"srcs":            `["blah.cpp"]`,
-				"local_includes":  `["."]`,
-				"min_sdk_version": `"5"`,
-				"whole_archive_deps": `select({
-        "//build/bazel_common_rules/platforms/os:android": [":foo_cc_sysprop_library_static"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticWithIntegerOverflowProperty(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static has correct features when integer_overflow property is provided",
-		Blueprint: `
-cc_library_static {
-		name: "foo",
-		sanitize: {
-				integer_overflow: true,
-		},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-				"features":       `["ubsan_integer_overflow"]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticWithMiscUndefinedProperty(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static has correct features when misc_undefined property is provided",
-		Blueprint: `
-cc_library_static {
-		name: "foo",
-		sanitize: {
-				misc_undefined: ["undefined", "nullability"],
-		},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-				"features": `[
-        "ubsan_undefined",
-        "ubsan_nullability",
-    ]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticWithUBSanPropertiesArchSpecific(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static has correct feature select when UBSan props are specified in arch specific blocks",
-		Blueprint: `
-cc_library_static {
-		name: "foo",
-		sanitize: {
-				misc_undefined: ["undefined", "nullability"],
-		},
-		target: {
-				android: {
-						sanitize: {
-								misc_undefined: ["alignment"],
-						},
-				},
-				linux_glibc: {
-						sanitize: {
-								integer_overflow: true,
-						},
-				},
-		},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-				"features": `[
-        "ubsan_undefined",
-        "ubsan_nullability",
-    ] + select({
-        "//build/bazel_common_rules/platforms/os:android": ["ubsan_alignment"],
-        "//build/bazel_common_rules/platforms/os:linux_glibc": ["ubsan_integer_overflow"],
-        "//conditions:default": [],
-    })`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticWithSanitizerBlocklist(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static has correct features when sanitize.blocklist is provided",
-		Blueprint: `
-cc_library_static {
-	name: "foo",
-	sanitize: {
-		blocklist: "foo_blocklist.txt",
-	},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-				"copts": `select({
-        "//build/bazel/rules/cc:sanitizers_enabled": ["-fsanitize-ignorelist=$(location foo_blocklist.txt)"],
-        "//conditions:default": [],
-    })`,
-				"additional_compiler_inputs": `select({
-        "//build/bazel/rules/cc:sanitizers_enabled": [":foo_blocklist.txt"],
-        "//conditions:default": [],
-    })`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticWithThinLto(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static has correct features when thin lto is enabled",
-		Blueprint: `
-cc_library_static {
-	name: "foo",
-	lto: {
-		thin: true,
-	},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-				"features":       `["android_thin_lto"]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticWithLtoNever(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static has correct features when thin lto is enabled",
-		Blueprint: `
-cc_library_static {
-	name: "foo",
-	lto: {
-		never: true,
-	},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-				"features":       `["-android_thin_lto"]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticWithThinLtoArchSpecific(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static has correct features when LTO differs across arch and os variants",
-		Blueprint: `
-cc_library_static {
-	name: "foo",
-	target: {
-		android: {
-			lto: {
-				thin: true,
-			},
-		},
-	},
-	arch: {
-		riscv64: {
-			lto: {
-				thin: false,
-			},
-		},
-	},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-				"local_includes": `["."]`,
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os_arch:android_arm": ["android_thin_lto"],
-        "//build/bazel_common_rules/platforms/os_arch:android_arm64": ["android_thin_lto"],
-        "//build/bazel_common_rules/platforms/os_arch:android_riscv64": ["-android_thin_lto"],
-        "//build/bazel_common_rules/platforms/os_arch:android_x86": ["android_thin_lto"],
-        "//build/bazel_common_rules/platforms/os_arch:android_x86_64": ["android_thin_lto"],
-        "//conditions:default": [],
-    })`}),
-		},
-	})
-}
-
-func TestCcLibraryStaticWithThinLtoDisabledDefaultEnabledVariant(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static has correct features when LTO disabled by default but enabled on a particular variant",
-		Blueprint: `
-cc_library_static {
-	name: "foo",
-	lto: {
-		never: true,
-	},
-	target: {
-		android: {
-			lto: {
-				thin: true,
-				never: false,
-			},
-		},
-	},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-				"local_includes": `["."]`,
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["android_thin_lto"],
-        "//conditions:default": ["-android_thin_lto"],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticWithThinLtoAndWholeProgramVtables(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static has correct features when thin lto is enabled with whole_program_vtables",
-		Blueprint: `
-cc_library_static {
-	name: "foo",
-	lto: {
-		thin: true,
-	},
-	whole_program_vtables: true,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-				"features": `[
-        "android_thin_lto",
-        "android_thin_lto_whole_program_vtables",
-    ]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticHiddenVisibilityConvertedToFeature(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static changes hidden visibility flag to feature",
-		Blueprint: `
-cc_library_static {
-	name: "foo",
-	cflags: ["-fvisibility=hidden"],
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-				"features":       `["visibility_hidden"]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticHiddenVisibilityConvertedToFeatureOsSpecific(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static changes hidden visibility flag to feature for specific os",
-		Blueprint: `
-cc_library_static {
-	name: "foo",
-	target: {
-		android: {
-			cflags: ["-fvisibility=hidden"],
-		},
-	},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["visibility_hidden"],
-        "//conditions:default": [],
-    })`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticWithCfi(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static has correct features when cfi is enabled",
-		Blueprint: `
-cc_library_static {
-	name: "foo",
-	sanitize: {
-		cfi: true,
-	},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-				"features":       `["android_cfi"]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticWithCfiOsSpecific(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static has correct features when cfi is enabled for specific variants",
-		Blueprint: `
-cc_library_static {
-	name: "foo",
-	target: {
-		android: {
-			sanitize: {
-				cfi: true,
-			},
-		},
-	},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["android_cfi"],
-        "//conditions:default": [],
-    })`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticWithCfiAndCfiAssemblySupport(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static has correct features when cfi is enabled with cfi_assembly_support",
-		Blueprint: `
-cc_library_static {
-	name: "foo",
-	sanitize: {
-		cfi: true,
-		config: {
-			cfi_assembly_support: true,
-		},
-	},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-				"features": `[
-        "android_cfi",
-        "android_cfi_assembly_support",
-    ]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCcLibraryStaticExplicitlyDisablesCfiWhenFalse(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_library_static disables cfi when explciitly set to false in the bp",
-		Blueprint: `
-cc_library_static {
-	name: "foo",
-	sanitize: {
-		cfi: false,
-	},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-				"features":       `["-android_cfi"]`,
-				"local_includes": `["."]`,
-			}),
-		},
-	})
-}
-
-func TestCCLibraryStaticRscriptSrc(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: `cc_library_static with rscript files in sources`,
-		Blueprint: `
-cc_library_static{
-    name : "foo",
-    srcs : [
-        "ccSrc.cc",
-        "rsSrc.rscript",
-    ],
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("rscript_to_cpp", "foo_renderscript", AttrNameToString{
-				"srcs": `["rsSrc.rscript"]`,
-			}),
-			MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
-				"absolute_includes": `[
-        "frameworks/rs",
-        "frameworks/rs/cpp",
-    ]`,
-				"local_includes": `["."]`,
-				"srcs": `[
-        "ccSrc.cc",
-        "foo_renderscript",
-    ]`,
-			})}})
-}
-
-func TestCcLibraryWithProtoInGeneratedSrcs(t *testing.T) {
-	runCcLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library with a .proto file generated from a genrule",
-		ModuleTypeUnderTest:        "cc_library_static",
-		ModuleTypeUnderTestFactory: cc.LibraryStaticFactory,
-		StubbedBuildDefinitions:    []string{"libprotobuf-cpp-lite"},
-		Blueprint: soongCcLibraryPreamble + `
-cc_library_static {
-	name: "mylib",
-	generated_sources: ["myprotogen"],
-}
-genrule {
-	name: "myprotogen",
-	out: ["myproto.proto"],
-}
-` + simpleModule("cc_library", "libprotobuf-cpp-lite"),
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_library_static", "mylib", AttrNameToString{
-				"local_includes":                    `["."]`,
-				"deps":                              `[":libprotobuf-cpp-lite"]`,
-				"implementation_whole_archive_deps": `[":mylib_cc_proto_lite"]`,
-			}),
-			MakeBazelTarget("cc_lite_proto_library", "mylib_cc_proto_lite", AttrNameToString{
-				"deps": `[":mylib_proto"]`,
-			}),
-			MakeBazelTarget("proto_library", "mylib_proto", AttrNameToString{
-				"srcs": `[":myprotogen"]`,
-			}),
-			MakeBazelTargetNoRestrictions("genrule", "myprotogen", AttrNameToString{
-				"cmd":  `""`,
-				"outs": `["myproto.proto"]`,
-			}),
-		},
-	})
-}
diff --git a/bp2build/cc_object_conversion_test.go b/bp2build/cc_object_conversion_test.go
deleted file mode 100644
index 4d44db7..0000000
--- a/bp2build/cc_object_conversion_test.go
+++ /dev/null
@@ -1,478 +0,0 @@
-// Copyright 2021 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"testing"
-
-	"android/soong/android"
-	"android/soong/cc"
-)
-
-func registerCcObjectModuleTypes(ctx android.RegistrationContext) {
-	// Always register cc_defaults module factory
-	ctx.RegisterModuleType("cc_defaults", func() android.Module { return cc.DefaultsFactory() })
-	ctx.RegisterModuleType("cc_library_headers", cc.LibraryHeaderFactory)
-}
-
-func runCcObjectTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	(&tc).ModuleTypeUnderTest = "cc_object"
-	(&tc).ModuleTypeUnderTestFactory = cc.ObjectFactory
-	RunBp2BuildTestCase(t, registerCcObjectModuleTypes, tc)
-}
-
-func TestCcObjectSimple(t *testing.T) {
-	runCcObjectTestCase(t, Bp2buildTestCase{
-		Description: "simple cc_object generates cc_object with include header dep",
-		Filesystem: map[string]string{
-			"a/b/foo.h":     "",
-			"a/b/bar.h":     "",
-			"a/b/exclude.c": "",
-			"a/b/c.c":       "",
-		},
-		Blueprint: `cc_object {
-    name: "foo",
-    local_include_dirs: ["include"],
-    system_shared_libs: [],
-    cflags: [
-        "-Wno-gcc-compat",
-        "-Wall",
-        "-Werror",
-    ],
-    srcs: [
-        "a/b/*.c"
-    ],
-    exclude_srcs: ["a/b/exclude.c"],
-    sdk_version: "current",
-    min_sdk_version: "29",
-	crt: true,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_object", "foo", AttrNameToString{
-				"copts": `[
-        "-fno-addrsig",
-        "-Wno-gcc-compat",
-        "-Wall",
-        "-Werror",
-    ]`,
-				"local_includes": `[
-        "include",
-        ".",
-    ]`,
-				"srcs":                `["a/b/c.c"]`,
-				"system_dynamic_deps": `[]`,
-				"sdk_version":         `"current"`,
-				"min_sdk_version":     `"29"`,
-				"crt":                 "True",
-			}),
-		},
-	})
-}
-
-func TestCcObjectDefaults(t *testing.T) {
-	runCcObjectTestCase(t, Bp2buildTestCase{
-		Blueprint: `cc_object {
-    name: "foo",
-    system_shared_libs: [],
-    srcs: [
-        "a/b/*.h",
-        "a/b/c.c"
-    ],
-
-    defaults: ["foo_defaults"],
-}
-
-cc_defaults {
-    name: "foo_defaults",
-    defaults: ["foo_bar_defaults"],
-}
-
-cc_defaults {
-    name: "foo_bar_defaults",
-    cflags: [
-        "-Werror",
-    ],
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_object", "foo", AttrNameToString{
-				"copts": `[
-        "-Werror",
-        "-fno-addrsig",
-    ]`,
-				"local_includes":      `["."]`,
-				"srcs":                `["a/b/c.c"]`,
-				"system_dynamic_deps": `[]`,
-			}),
-		}})
-}
-
-func TestCcObjectCcObjetDepsInObjs(t *testing.T) {
-	runCcObjectTestCase(t, Bp2buildTestCase{
-		Description: "cc_object with cc_object deps in objs props",
-		Filesystem: map[string]string{
-			"a/b/c.c": "",
-			"x/y/z.c": "",
-		},
-		Blueprint: `cc_object {
-    name: "foo",
-    system_shared_libs: [],
-    srcs: ["a/b/c.c"],
-    objs: ["bar"],
-    include_build_directory: false,
-}
-
-cc_object {
-    name: "bar",
-    system_shared_libs: [],
-    srcs: ["x/y/z.c"],
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_object", "bar", AttrNameToString{
-				"copts":               `["-fno-addrsig"]`,
-				"srcs":                `["x/y/z.c"]`,
-				"system_dynamic_deps": `[]`,
-			}), MakeBazelTarget("cc_object", "foo", AttrNameToString{
-				"copts":               `["-fno-addrsig"]`,
-				"objs":                `[":bar"]`,
-				"srcs":                `["a/b/c.c"]`,
-				"system_dynamic_deps": `[]`,
-			}),
-		},
-	})
-}
-
-func TestCcObjectIncludeBuildDirFalse(t *testing.T) {
-	runCcObjectTestCase(t, Bp2buildTestCase{
-		Description: "cc_object with include_build_dir: false",
-		Filesystem: map[string]string{
-			"a/b/c.c": "",
-			"x/y/z.c": "",
-		},
-		Blueprint: `cc_object {
-    name: "foo",
-    system_shared_libs: [],
-    srcs: ["a/b/c.c"],
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_object", "foo", AttrNameToString{
-				"copts":               `["-fno-addrsig"]`,
-				"srcs":                `["a/b/c.c"]`,
-				"system_dynamic_deps": `[]`,
-			}),
-		},
-	})
-}
-
-func TestCcObjectProductVariable(t *testing.T) {
-	runCcObjectTestCase(t, Bp2buildTestCase{
-		Description: "cc_object with product variable",
-		Blueprint: `cc_object {
-    name: "foo",
-    system_shared_libs: [],
-    include_build_directory: false,
-    product_variables: {
-        platform_sdk_version: {
-            asflags: ["-DPLATFORM_SDK_VERSION=%d"],
-        },
-    },
-    srcs: ["src.S"],
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_object", "foo", AttrNameToString{
-				"asflags": `select({
-        "//build/bazel/product_config/config_settings:platform_sdk_version": ["-DPLATFORM_SDK_VERSION=$(Platform_sdk_version)"],
-        "//conditions:default": [],
-    })`,
-				"copts":               `["-fno-addrsig"]`,
-				"srcs_as":             `["src.S"]`,
-				"system_dynamic_deps": `[]`,
-			}),
-		},
-	})
-}
-
-func TestCcObjectCflagsOneArch(t *testing.T) {
-	runCcObjectTestCase(t, Bp2buildTestCase{
-		Description: "cc_object setting cflags for one arch",
-		Blueprint: `cc_object {
-    name: "foo",
-    system_shared_libs: [],
-    srcs: ["a.cpp"],
-    arch: {
-        x86: {
-            cflags: ["-fPIC"], // string list
-        },
-        arm: {
-            srcs: ["arch/arm/file.cpp"], // label list
-        },
-    },
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_object", "foo", AttrNameToString{
-				"copts": `["-fno-addrsig"] + select({
-        "//build/bazel_common_rules/platforms/arch:x86": ["-fPIC"],
-        "//conditions:default": [],
-    })`,
-				"srcs": `["a.cpp"] + select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["arch/arm/file.cpp"],
-        "//conditions:default": [],
-    })`,
-				"system_dynamic_deps": `[]`,
-			}),
-		},
-	})
-}
-
-func TestCcObjectCflagsFourArch(t *testing.T) {
-	runCcObjectTestCase(t, Bp2buildTestCase{
-		Description: "cc_object setting cflags for 4 architectures",
-		Blueprint: `cc_object {
-    name: "foo",
-    system_shared_libs: [],
-    srcs: ["base.cpp"],
-    arch: {
-        x86: {
-            srcs: ["x86.cpp"],
-            cflags: ["-fPIC"],
-        },
-        x86_64: {
-            srcs: ["x86_64.cpp"],
-            cflags: ["-fPIC"],
-        },
-        arm: {
-            srcs: ["arm.cpp"],
-            cflags: ["-Wall"],
-        },
-        arm64: {
-            srcs: ["arm64.cpp"],
-            cflags: ["-Wall"],
-        },
-    },
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_object", "foo", AttrNameToString{
-				"copts": `["-fno-addrsig"] + select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["-Wall"],
-        "//build/bazel_common_rules/platforms/arch:arm64": ["-Wall"],
-        "//build/bazel_common_rules/platforms/arch:x86": ["-fPIC"],
-        "//build/bazel_common_rules/platforms/arch:x86_64": ["-fPIC"],
-        "//conditions:default": [],
-    })`,
-				"srcs": `["base.cpp"] + select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["arm.cpp"],
-        "//build/bazel_common_rules/platforms/arch:arm64": ["arm64.cpp"],
-        "//build/bazel_common_rules/platforms/arch:x86": ["x86.cpp"],
-        "//build/bazel_common_rules/platforms/arch:x86_64": ["x86_64.cpp"],
-        "//conditions:default": [],
-    })`,
-				"system_dynamic_deps": `[]`,
-			}),
-		},
-	})
-}
-
-func TestCcObjectLinkerScript(t *testing.T) {
-	runCcObjectTestCase(t, Bp2buildTestCase{
-		Description: "cc_object setting linker_script",
-		Blueprint: `cc_object {
-    name: "foo",
-    srcs: ["base.cpp"],
-    linker_script: "bunny.lds",
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_object", "foo", AttrNameToString{
-				"copts":         `["-fno-addrsig"]`,
-				"linker_script": `"bunny.lds"`,
-				"srcs":          `["base.cpp"]`,
-			}),
-		},
-	})
-}
-
-func TestCcObjectDepsAndLinkerScriptSelects(t *testing.T) {
-	runCcObjectTestCase(t, Bp2buildTestCase{
-		Description:             "cc_object setting deps and linker_script across archs",
-		StubbedBuildDefinitions: []string{"x86_obj", "x86_64_obj", "arm_obj"},
-		Blueprint: `cc_object {
-    name: "foo",
-    srcs: ["base.cpp"],
-    arch: {
-        x86: {
-            objs: ["x86_obj"],
-            linker_script: "x86.lds",
-        },
-        x86_64: {
-            objs: ["x86_64_obj"],
-            linker_script: "x86_64.lds",
-        },
-        arm: {
-            objs: ["arm_obj"],
-            linker_script: "arm.lds",
-        },
-    },
-    include_build_directory: false,
-}
-
-cc_object {
-    name: "x86_obj",
-    system_shared_libs: [],
-    srcs: ["x86.cpp"],
-    include_build_directory: false,
-}
-
-cc_object {
-    name: "x86_64_obj",
-    system_shared_libs: [],
-    srcs: ["x86_64.cpp"],
-    include_build_directory: false,
-}
-
-cc_object {
-    name: "arm_obj",
-    system_shared_libs: [],
-    srcs: ["arm.cpp"],
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_object", "foo", AttrNameToString{
-				"copts": `["-fno-addrsig"]`,
-				"objs": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": [":arm_obj"],
-        "//build/bazel_common_rules/platforms/arch:x86": [":x86_obj"],
-        "//build/bazel_common_rules/platforms/arch:x86_64": [":x86_64_obj"],
-        "//conditions:default": [],
-    })`,
-				"linker_script": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": "arm.lds",
-        "//build/bazel_common_rules/platforms/arch:x86": "x86.lds",
-        "//build/bazel_common_rules/platforms/arch:x86_64": "x86_64.lds",
-        "//conditions:default": None,
-    })`,
-				"srcs": `["base.cpp"]`,
-			}),
-		},
-	})
-}
-
-func TestCcObjectSelectOnLinuxAndBionicArchs(t *testing.T) {
-	runCcObjectTestCase(t, Bp2buildTestCase{
-		Description: "cc_object setting srcs based on linux and bionic archs",
-		Blueprint: `cc_object {
-    name: "foo",
-    srcs: ["base.cpp"],
-    target: {
-        linux_arm64: {
-            srcs: ["linux_arm64.cpp",]
-        },
-        linux_x86: {
-            srcs: ["linux_x86.cpp",]
-        },
-        bionic_arm64: {
-            srcs: ["bionic_arm64.cpp",]
-        },
-    },
-    include_build_directory: false,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_object", "foo", AttrNameToString{
-				"copts": `["-fno-addrsig"]`,
-				"srcs": `["base.cpp"] + select({
-        "//build/bazel_common_rules/platforms/os_arch:android_arm64": [
-            "linux_arm64.cpp",
-            "bionic_arm64.cpp",
-        ],
-        "//build/bazel_common_rules/platforms/os_arch:android_x86": ["linux_x86.cpp"],
-        "//build/bazel_common_rules/platforms/os_arch:linux_bionic_arm64": [
-            "linux_arm64.cpp",
-            "bionic_arm64.cpp",
-        ],
-        "//build/bazel_common_rules/platforms/os_arch:linux_glibc_x86": ["linux_x86.cpp"],
-        "//build/bazel_common_rules/platforms/os_arch:linux_musl_arm64": ["linux_arm64.cpp"],
-        "//build/bazel_common_rules/platforms/os_arch:linux_musl_x86": ["linux_x86.cpp"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestCcObjectHeaderLib(t *testing.T) {
-	runCcObjectTestCase(t, Bp2buildTestCase{
-		Description: "simple cc_object generates cc_object with include header dep",
-		Filesystem: map[string]string{
-			"a/b/foo.h":     "",
-			"a/b/bar.h":     "",
-			"a/b/exclude.c": "",
-			"a/b/c.c":       "",
-		},
-		Blueprint: `cc_object {
-    name: "foo",
-	header_libs: ["libheaders"],
-    system_shared_libs: [],
-    cflags: [
-        "-Wno-gcc-compat",
-        "-Wall",
-        "-Werror",
-    ],
-    srcs: [
-        "a/b/*.c"
-    ],
-    exclude_srcs: ["a/b/exclude.c"],
-    sdk_version: "current",
-    min_sdk_version: "29",
-}
-
-cc_library_headers {
-    name: "libheaders",
-	export_include_dirs: ["include"],
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_object", "foo", AttrNameToString{
-				"copts": `[
-        "-fno-addrsig",
-        "-Wno-gcc-compat",
-        "-Wall",
-        "-Werror",
-    ]`,
-				"deps":                `[":libheaders"]`,
-				"local_includes":      `["."]`,
-				"srcs":                `["a/b/c.c"]`,
-				"system_dynamic_deps": `[]`,
-				"sdk_version":         `"current"`,
-				"min_sdk_version":     `"29"`,
-			}),
-			MakeBazelTarget("cc_library_headers", "libheaders", AttrNameToString{
-				"export_includes": `["include"]`,
-			}),
-		},
-	})
-}
diff --git a/bp2build/cc_prebuilt_binary_conversion_test.go b/bp2build/cc_prebuilt_binary_conversion_test.go
deleted file mode 100644
index 9adaf32..0000000
--- a/bp2build/cc_prebuilt_binary_conversion_test.go
+++ /dev/null
@@ -1,125 +0,0 @@
-// Copyright 2022 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//	http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-package bp2build
-
-import (
-	"fmt"
-	"testing"
-
-	"android/soong/cc"
-)
-
-func runCcPrebuiltBinaryTestCase(t *testing.T, testCase Bp2buildTestCase) {
-	t.Helper()
-	description := fmt.Sprintf("cc_prebuilt_binary: %s", testCase.Description)
-	testCase.ModuleTypeUnderTest = "cc_prebuilt_binary"
-	testCase.ModuleTypeUnderTestFactory = cc.PrebuiltBinaryFactory
-	testCase.Description = description
-	t.Run(description, func(t *testing.T) {
-		t.Helper()
-		RunBp2BuildTestCaseSimple(t, testCase)
-	})
-}
-
-func TestPrebuiltBinary(t *testing.T) {
-	runCcPrebuiltBinaryTestCase(t,
-		Bp2buildTestCase{
-			Description: "simple",
-			Filesystem: map[string]string{
-				"bin": "",
-			},
-			Blueprint: `
-cc_prebuilt_binary {
-	name: "bintest",
-	srcs: ["bin"],
-	bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget("cc_prebuilt_binary", "bintest", AttrNameToString{
-					"src": `"bin"`,
-				})},
-		})
-}
-
-func TestPrebuiltBinaryWithStrip(t *testing.T) {
-	runCcPrebuiltBinaryTestCase(t,
-		Bp2buildTestCase{
-			Description: "with strip",
-			Filesystem: map[string]string{
-				"bin": "",
-			},
-			Blueprint: `
-cc_prebuilt_binary {
-	name: "bintest",
-	srcs: ["bin"],
-	strip: { all: true },
-	bazel_module: { bp2build_available: true },
-}`, ExpectedBazelTargets: []string{
-				MakeBazelTarget("cc_prebuilt_binary", "bintest", AttrNameToString{
-					"src": `"bin"`,
-					"strip": `{
-        "all": True,
-    }`,
-				}),
-			},
-		})
-}
-
-func TestPrebuiltBinaryWithArchVariance(t *testing.T) {
-	runCcPrebuiltBinaryTestCase(t,
-		Bp2buildTestCase{
-			Description: "with arch variance",
-			Filesystem: map[string]string{
-				"bina": "",
-				"binb": "",
-			},
-			Blueprint: `
-cc_prebuilt_binary {
-	name: "bintest",
-	arch: {
-		arm64: { srcs: ["bina"], },
-		arm: { srcs: ["binb"], },
-	},
-	bazel_module: { bp2build_available: true },
-}`, ExpectedBazelTargets: []string{
-				MakeBazelTarget("cc_prebuilt_binary", "bintest", AttrNameToString{
-					"src": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": "binb",
-        "//build/bazel_common_rules/platforms/arch:arm64": "bina",
-        "//conditions:default": None,
-    })`,
-				}),
-			},
-		})
-}
-
-func TestPrebuiltBinaryMultipleSrcsFails(t *testing.T) {
-	runCcPrebuiltBinaryTestCase(t,
-		Bp2buildTestCase{
-			Description: "fails because multiple sources",
-			Filesystem: map[string]string{
-				"bina": "",
-				"binb": "",
-			},
-			Blueprint: `
-cc_prebuilt_binary {
-	name: "bintest",
-	srcs: ["bina", "binb"],
-	bazel_module: { bp2build_available: true },
-}`,
-			ExpectedErr: fmt.Errorf("Expected at most one source file"),
-		})
-}
-
-// TODO: nosrcs test
diff --git a/bp2build/cc_prebuilt_library_conversion_test.go b/bp2build/cc_prebuilt_library_conversion_test.go
deleted file mode 100644
index a7f0c7b..0000000
--- a/bp2build/cc_prebuilt_library_conversion_test.go
+++ /dev/null
@@ -1,412 +0,0 @@
-// Copyright 2022 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//	http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-package bp2build
-
-import (
-	"fmt"
-	"testing"
-
-	"android/soong/android"
-	"android/soong/cc"
-)
-
-func runCcPrebuiltLibraryTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	(&tc).ModuleTypeUnderTest = "cc_prebuilt_library"
-	(&tc).ModuleTypeUnderTestFactory = cc.PrebuiltLibraryFactory
-	RunBp2BuildTestCaseSimple(t, tc)
-}
-
-func TestPrebuiltLibraryStaticAndSharedSimple(t *testing.T) {
-	runCcPrebuiltLibraryTestCase(t,
-		Bp2buildTestCase{
-			Description: "prebuilt library static and shared simple",
-			Filesystem: map[string]string{
-				"libf.so": "",
-			},
-			Blueprint: `
-cc_prebuilt_library {
-	name: "libtest",
-	srcs: ["libf.so"],
-	bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget("cc_prebuilt_library_static", "libtest_bp2build_cc_library_static", AttrNameToString{
-					"static_library": `"libf.so"`,
-				}),
-				MakeBazelTarget("cc_prebuilt_library_static", "libtest_bp2build_cc_library_static_alwayslink", AttrNameToString{
-					"static_library": `"libf.so"`,
-					"alwayslink":     "True",
-				}),
-				MakeBazelTarget("cc_prebuilt_library_shared", "libtest", AttrNameToString{
-					"shared_library": `"libf.so"`,
-				}),
-			},
-		})
-}
-
-func TestPrebuiltLibraryWithArchVariance(t *testing.T) {
-	runCcPrebuiltLibraryTestCase(t,
-		Bp2buildTestCase{
-			Description: "prebuilt library with arch variance",
-			Filesystem: map[string]string{
-				"libf.so": "",
-				"libg.so": "",
-			},
-			Blueprint: `
-cc_prebuilt_library {
-	name: "libtest",
-	arch: {
-		arm64: { srcs: ["libf.so"], },
-		arm: { srcs: ["libg.so"], },
-	},
-	bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget("cc_prebuilt_library_static", "libtest_bp2build_cc_library_static", AttrNameToString{
-					"static_library": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": "libg.so",
-        "//build/bazel_common_rules/platforms/arch:arm64": "libf.so",
-        "//conditions:default": None,
-    })`}),
-				MakeBazelTarget("cc_prebuilt_library_static", "libtest_bp2build_cc_library_static_alwayslink", AttrNameToString{
-					"alwayslink": "True",
-					"static_library": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": "libg.so",
-        "//build/bazel_common_rules/platforms/arch:arm64": "libf.so",
-        "//conditions:default": None,
-    })`}),
-				MakeBazelTarget("cc_prebuilt_library_shared", "libtest", AttrNameToString{
-					"shared_library": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": "libg.so",
-        "//build/bazel_common_rules/platforms/arch:arm64": "libf.so",
-        "//conditions:default": None,
-    })`,
-				}),
-			},
-		})
-}
-
-func TestPrebuiltLibraryAdditionalAttrs(t *testing.T) {
-	runCcPrebuiltLibraryTestCase(t,
-		Bp2buildTestCase{
-			Description: "prebuilt library additional attributes",
-			Filesystem: map[string]string{
-				"libf.so":             "",
-				"testdir/1/include.h": "",
-				"testdir/2/other.h":   "",
-			},
-			Blueprint: `
-cc_prebuilt_library {
-	name: "libtest",
-	srcs: ["libf.so"],
-	export_include_dirs: ["testdir/1/"],
-	export_system_include_dirs: ["testdir/2/"],
-	bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget("cc_prebuilt_library_static", "libtest_bp2build_cc_library_static", AttrNameToString{
-					"static_library":         `"libf.so"`,
-					"export_includes":        `["testdir/1/"]`,
-					"export_system_includes": `["testdir/2/"]`,
-				}),
-				MakeBazelTarget("cc_prebuilt_library_static", "libtest_bp2build_cc_library_static_alwayslink", AttrNameToString{
-					"static_library":         `"libf.so"`,
-					"export_includes":        `["testdir/1/"]`,
-					"export_system_includes": `["testdir/2/"]`,
-					"alwayslink":             "True",
-				}),
-				MakeBazelTarget("cc_prebuilt_library_shared", "libtest", AttrNameToString{
-					"shared_library":         `"libf.so"`,
-					"export_includes":        `["testdir/1/"]`,
-					"export_system_includes": `["testdir/2/"]`,
-				}),
-			},
-		})
-}
-
-func TestPrebuiltLibrarySharedStanzaFails(t *testing.T) {
-	runCcPrebuiltLibraryTestCase(t,
-		Bp2buildTestCase{
-			Description: "prebuilt library with shared stanza fails because multiple sources",
-			Filesystem: map[string]string{
-				"libf.so": "",
-				"libg.so": "",
-			},
-			Blueprint: `
-cc_prebuilt_library {
-	name: "libtest",
-	srcs: ["libf.so"],
-	shared: {
-		srcs: ["libg.so"],
-	},
-	bazel_module: { bp2build_available: true },
-}`,
-			ExpectedErr: fmt.Errorf("Expected at most one source file"),
-		})
-}
-
-func TestPrebuiltLibraryStaticStanzaFails(t *testing.T) {
-	RunBp2BuildTestCaseSimple(t,
-		Bp2buildTestCase{
-			Description:                "prebuilt library with static stanza fails because multiple sources",
-			ModuleTypeUnderTest:        "cc_prebuilt_library",
-			ModuleTypeUnderTestFactory: cc.PrebuiltLibraryFactory,
-			Filesystem: map[string]string{
-				"libf.so": "",
-				"libg.so": "",
-			},
-			Blueprint: `
-cc_prebuilt_library {
-	name: "libtest",
-	srcs: ["libf.so"],
-	static: {
-		srcs: ["libg.so"],
-	},
-	bazel_module: { bp2build_available: true },
-}`,
-			ExpectedErr: fmt.Errorf("Expected at most one source file"),
-		})
-}
-
-func TestPrebuiltLibrarySharedAndStaticStanzas(t *testing.T) {
-	runCcPrebuiltLibraryTestCase(t,
-		Bp2buildTestCase{
-			Description: "prebuilt library with both shared and static stanzas",
-			Filesystem: map[string]string{
-				"libf.so": "",
-				"libg.so": "",
-			},
-			Blueprint: `
-cc_prebuilt_library {
-	name: "libtest",
-	static: {
-		srcs: ["libf.so"],
-	},
-	shared: {
-		srcs: ["libg.so"],
-	},
-	bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget("cc_prebuilt_library_static", "libtest_bp2build_cc_library_static", AttrNameToString{
-					"static_library": `"libf.so"`,
-				}),
-				MakeBazelTarget("cc_prebuilt_library_static", "libtest_bp2build_cc_library_static_alwayslink", AttrNameToString{
-					"static_library": `"libf.so"`,
-					"alwayslink":     "True",
-				}),
-				MakeBazelTarget("cc_prebuilt_library_shared", "libtest", AttrNameToString{
-					"shared_library": `"libg.so"`,
-				}),
-			},
-		})
-}
-
-// TODO(b/228623543): When this bug is fixed, enable this test
-//func TestPrebuiltLibraryOnlyShared(t *testing.T) {
-//	runCcPrebuiltLibraryTestCase(t,
-//		bp2buildTestCase{
-//			description:                "prebuilt library shared only",
-//			filesystem: map[string]string{
-//				"libf.so": "",
-//			},
-//			blueprint: `
-//cc_prebuilt_library {
-//	name: "libtest",
-//	srcs: ["libf.so"],
-//	static: {
-//		enabled: false,
-//	},
-//	bazel_module: { bp2build_available: true },
-//}`,
-//			expectedBazelTargets: []string{
-//				makeBazelTarget("cc_prebuilt_library_shared", "libtest", attrNameToString{
-//					"shared_library": `"libf.so"`,
-//				}),
-//			},
-//		})
-//}
-
-// TODO(b/228623543): When this bug is fixed, enable this test
-//func TestPrebuiltLibraryOnlyStatic(t *testing.T) {
-//	runCcPrebuiltLibraryTestCase(t,
-//		bp2buildTestCase{
-//			description:                "prebuilt library static only",
-//			filesystem: map[string]string{
-//				"libf.so": "",
-//			},
-//			blueprint: `
-//cc_prebuilt_library {
-//	name: "libtest",
-//	srcs: ["libf.so"],
-//	shared: {
-//		enabled: false,
-//	},
-//	bazel_module: { bp2build_available: true },
-//}`,
-//			expectedBazelTargets: []string{
-//				makeBazelTarget("cc_prebuilt_library_static", "libtest_bp2build_cc_library_static", attrNameToString{
-//					"static_library": `"libf.so"`,
-//				}),
-//				makeBazelTarget("cc_prebuilt_library_static", "libtest_bp2build_cc_library_static_always", attrNameToString{
-//					"static_library": `"libf.so"`,
-//					"alwayslink": "True",
-//				}),
-//			},
-//		})
-//}
-
-func TestPrebuiltLibraryWithExportIncludesArchVariant(t *testing.T) {
-	runCcPrebuiltLibraryTestCase(t, Bp2buildTestCase{
-		Description: "cc_prebuilt_library correctly translates export_includes with arch variance",
-		Filesystem: map[string]string{
-			"libf.so": "",
-			"libg.so": "",
-		},
-		Blueprint: `
-cc_prebuilt_library {
-	name: "libtest",
-	srcs: ["libf.so"],
-	arch: {
-		arm: { export_include_dirs: ["testdir/1/"], },
-		arm64: { export_include_dirs: ["testdir/2/"], },
-	},
-	bazel_module: { bp2build_available: true },
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_prebuilt_library_shared", "libtest", AttrNameToString{
-				"shared_library": `"libf.so"`,
-				"export_includes": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["testdir/1/"],
-        "//build/bazel_common_rules/platforms/arch:arm64": ["testdir/2/"],
-        "//conditions:default": [],
-    })`,
-			}),
-			MakeBazelTarget("cc_prebuilt_library_static", "libtest_bp2build_cc_library_static", AttrNameToString{
-				"static_library": `"libf.so"`,
-				"export_includes": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["testdir/1/"],
-        "//build/bazel_common_rules/platforms/arch:arm64": ["testdir/2/"],
-        "//conditions:default": [],
-    })`,
-			}),
-			MakeBazelTarget("cc_prebuilt_library_static", "libtest_bp2build_cc_library_static_alwayslink", AttrNameToString{
-				"alwayslink":     "True",
-				"static_library": `"libf.so"`,
-				"export_includes": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["testdir/1/"],
-        "//build/bazel_common_rules/platforms/arch:arm64": ["testdir/2/"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestPrebuiltLibraryWithExportSystemIncludesArchVariant(t *testing.T) {
-	runCcPrebuiltLibraryTestCase(t, Bp2buildTestCase{
-		Description: "cc_prebuilt_ibrary correctly translates export_system_includes with arch variance",
-		Filesystem: map[string]string{
-			"libf.so": "",
-			"libg.so": "",
-		},
-		Blueprint: `
-cc_prebuilt_library {
-	name: "libtest",
-	srcs: ["libf.so"],
-	arch: {
-		arm: { export_system_include_dirs: ["testdir/1/"], },
-		arm64: { export_system_include_dirs: ["testdir/2/"], },
-	},
-	bazel_module: { bp2build_available: true },
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_prebuilt_library_shared", "libtest", AttrNameToString{
-				"shared_library": `"libf.so"`,
-				"export_system_includes": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["testdir/1/"],
-        "//build/bazel_common_rules/platforms/arch:arm64": ["testdir/2/"],
-        "//conditions:default": [],
-    })`,
-			}),
-			MakeBazelTarget("cc_prebuilt_library_static", "libtest_bp2build_cc_library_static", AttrNameToString{
-				"static_library": `"libf.so"`,
-				"export_system_includes": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["testdir/1/"],
-        "//build/bazel_common_rules/platforms/arch:arm64": ["testdir/2/"],
-        "//conditions:default": [],
-    })`,
-			}),
-			MakeBazelTarget("cc_prebuilt_library_static", "libtest_bp2build_cc_library_static_alwayslink", AttrNameToString{
-				"alwayslink":     "True",
-				"static_library": `"libf.so"`,
-				"export_system_includes": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["testdir/1/"],
-        "//build/bazel_common_rules/platforms/arch:arm64": ["testdir/2/"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestPrebuiltNdkStlConversion(t *testing.T) {
-	registerNdkStlModuleTypes := func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("ndk_prebuilt_static_stl", cc.NdkPrebuiltStaticStlFactory)
-		ctx.RegisterModuleType("ndk_prebuilt_shared_stl", cc.NdkPrebuiltSharedStlFactory)
-	}
-	RunBp2BuildTestCase(t, registerNdkStlModuleTypes, Bp2buildTestCase{
-		Description: "TODO",
-		Blueprint: `
-ndk_prebuilt_static_stl {
-	name: "ndk_libfoo_static",
-	export_include_dirs: ["dir1", "dir2"],
-}
-ndk_prebuilt_shared_stl {
-	name: "ndk_libfoo_shared",
-	export_include_dirs: ["dir1", "dir2"],
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_prebuilt_library_static", "ndk_libfoo_static", AttrNameToString{
-				"static_library": `select({
-        "//build/bazel_common_rules/platforms/os_arch:android_arm": "current/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libfoo_static.a",
-        "//build/bazel_common_rules/platforms/os_arch:android_arm64": "current/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libfoo_static.a",
-        "//build/bazel_common_rules/platforms/os_arch:android_riscv64": "current/sources/cxx-stl/llvm-libc++/libs/riscv64/libfoo_static.a",
-        "//build/bazel_common_rules/platforms/os_arch:android_x86": "current/sources/cxx-stl/llvm-libc++/libs/x86/libfoo_static.a",
-        "//build/bazel_common_rules/platforms/os_arch:android_x86_64": "current/sources/cxx-stl/llvm-libc++/libs/x86_64/libfoo_static.a",
-        "//conditions:default": None,
-    })`,
-				"export_system_includes": `[
-        "dir1",
-        "dir2",
-    ]`,
-			}),
-			MakeBazelTarget("cc_prebuilt_library_shared", "ndk_libfoo_shared", AttrNameToString{
-				"shared_library": `select({
-        "//build/bazel_common_rules/platforms/os_arch:android_arm": "current/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libfoo_shared.so",
-        "//build/bazel_common_rules/platforms/os_arch:android_arm64": "current/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libfoo_shared.so",
-        "//build/bazel_common_rules/platforms/os_arch:android_riscv64": "current/sources/cxx-stl/llvm-libc++/libs/riscv64/libfoo_shared.so",
-        "//build/bazel_common_rules/platforms/os_arch:android_x86": "current/sources/cxx-stl/llvm-libc++/libs/x86/libfoo_shared.so",
-        "//build/bazel_common_rules/platforms/os_arch:android_x86_64": "current/sources/cxx-stl/llvm-libc++/libs/x86_64/libfoo_shared.so",
-        "//conditions:default": None,
-    })`,
-				"export_system_includes": `[
-        "dir1",
-        "dir2",
-    ]`,
-			}),
-		},
-	})
-}
diff --git a/bp2build/cc_prebuilt_library_shared_conversion_test.go b/bp2build/cc_prebuilt_library_shared_conversion_test.go
deleted file mode 100644
index 2242758..0000000
--- a/bp2build/cc_prebuilt_library_shared_conversion_test.go
+++ /dev/null
@@ -1,165 +0,0 @@
-// Copyright 2022 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//	http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-package bp2build
-
-import (
-	"testing"
-
-	"android/soong/cc"
-)
-
-func runCcPrebuiltLibrarySharedTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Parallel()
-	t.Helper()
-	(&tc).ModuleTypeUnderTest = "cc_prebuilt_library_shared"
-	(&tc).ModuleTypeUnderTestFactory = cc.PrebuiltSharedLibraryFactory
-	RunBp2BuildTestCaseSimple(t, tc)
-}
-
-func TestPrebuiltLibrarySharedSimple(t *testing.T) {
-	runCcPrebuiltLibrarySharedTestCase(t,
-		Bp2buildTestCase{
-			Description: "prebuilt library shared simple",
-			Filesystem: map[string]string{
-				"libf.so": "",
-			},
-			Blueprint: `
-cc_prebuilt_library_shared {
-	name: "libtest",
-	srcs: ["libf.so"],
-	bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget("cc_prebuilt_library_shared", "libtest", AttrNameToString{
-					"shared_library": `"libf.so"`,
-				}),
-			},
-		})
-}
-
-func TestPrebuiltLibrarySharedWithArchVariance(t *testing.T) {
-	runCcPrebuiltLibrarySharedTestCase(t,
-		Bp2buildTestCase{
-			Description: "prebuilt library shared with arch variance",
-			Filesystem: map[string]string{
-				"libf.so": "",
-				"libg.so": "",
-			},
-			Blueprint: `
-cc_prebuilt_library_shared {
-	name: "libtest",
-	arch: {
-		arm64: { srcs: ["libf.so"], },
-		arm: { srcs: ["libg.so"], },
-	},
-	bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget("cc_prebuilt_library_shared", "libtest", AttrNameToString{
-					"shared_library": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": "libg.so",
-        "//build/bazel_common_rules/platforms/arch:arm64": "libf.so",
-        "//conditions:default": None,
-    })`,
-				}),
-			},
-		})
-}
-
-func TestPrebuiltLibrarySharedAdditionalAttrs(t *testing.T) {
-	runCcPrebuiltLibrarySharedTestCase(t,
-		Bp2buildTestCase{
-			Description: "prebuilt library shared additional attributes",
-			Filesystem: map[string]string{
-				"libf.so":             "",
-				"testdir/1/include.h": "",
-				"testdir/2/other.h":   "",
-			},
-			Blueprint: `
-cc_prebuilt_library_shared {
-	name: "libtest",
-	srcs: ["libf.so"],
-	export_include_dirs: ["testdir/1/"],
-	export_system_include_dirs: ["testdir/2/"],
-	bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget("cc_prebuilt_library_shared", "libtest", AttrNameToString{
-					"shared_library":         `"libf.so"`,
-					"export_includes":        `["testdir/1/"]`,
-					"export_system_includes": `["testdir/2/"]`,
-				}),
-			},
-		})
-}
-
-func TestPrebuiltLibrarySharedWithExportIncludesArchVariant(t *testing.T) {
-	runCcPrebuiltLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_prebuilt_library_shared correctly translates export_includes with arch variance",
-		Filesystem: map[string]string{
-			"libf.so": "",
-			"libg.so": "",
-		},
-		Blueprint: `
-cc_prebuilt_library_shared {
-	name: "libtest",
-	srcs: ["libf.so"],
-	arch: {
-		arm: { export_include_dirs: ["testdir/1/"], },
-		arm64: { export_include_dirs: ["testdir/2/"], },
-	},
-	bazel_module: { bp2build_available: true },
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_prebuilt_library_shared", "libtest", AttrNameToString{
-				"shared_library": `"libf.so"`,
-				"export_includes": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["testdir/1/"],
-        "//build/bazel_common_rules/platforms/arch:arm64": ["testdir/2/"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestPrebuiltLibrarySharedWithExportSystemIncludesArchVariant(t *testing.T) {
-	runCcPrebuiltLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description: "cc_prebuilt_library_shared correctly translates export_system_includes with arch variance",
-		Filesystem: map[string]string{
-			"libf.so": "",
-			"libg.so": "",
-		},
-		Blueprint: `
-cc_prebuilt_library_shared {
-	name: "libtest",
-	srcs: ["libf.so"],
-	arch: {
-		arm: { export_system_include_dirs: ["testdir/1/"], },
-		arm64: { export_system_include_dirs: ["testdir/2/"], },
-	},
-	bazel_module: { bp2build_available: true },
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_prebuilt_library_shared", "libtest", AttrNameToString{
-				"shared_library": `"libf.so"`,
-				"export_system_includes": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["testdir/1/"],
-        "//build/bazel_common_rules/platforms/arch:arm64": ["testdir/2/"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
diff --git a/bp2build/cc_prebuilt_library_shared_test.go b/bp2build/cc_prebuilt_library_shared_test.go
deleted file mode 100644
index 1a9579a..0000000
--- a/bp2build/cc_prebuilt_library_shared_test.go
+++ /dev/null
@@ -1,85 +0,0 @@
-package bp2build
-
-import (
-	"fmt"
-	"testing"
-
-	"android/soong/cc"
-)
-
-func TestSharedPrebuiltLibrary(t *testing.T) {
-	RunBp2BuildTestCaseSimple(t,
-		Bp2buildTestCase{
-			Description:                "prebuilt library shared simple",
-			ModuleTypeUnderTest:        "cc_prebuilt_library_shared",
-			ModuleTypeUnderTestFactory: cc.PrebuiltSharedLibraryFactory,
-			Filesystem: map[string]string{
-				"libf.so": "",
-			},
-			Blueprint: `
-cc_prebuilt_library_shared {
-	name: "libtest",
-	srcs: ["libf.so"],
-	bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget("cc_prebuilt_library_shared", "libtest", AttrNameToString{
-					"shared_library": `"libf.so"`,
-				}),
-			},
-		})
-}
-
-func TestSharedPrebuiltLibraryWithArchVariance(t *testing.T) {
-	RunBp2BuildTestCaseSimple(t,
-		Bp2buildTestCase{
-			Description:                "prebuilt library shared with arch variance",
-			ModuleTypeUnderTest:        "cc_prebuilt_library_shared",
-			ModuleTypeUnderTestFactory: cc.PrebuiltSharedLibraryFactory,
-			Filesystem: map[string]string{
-				"libf.so": "",
-				"libg.so": "",
-			},
-			Blueprint: `
-cc_prebuilt_library_shared {
-	name: "libtest",
-	arch: {
-		arm64: { srcs: ["libf.so"], },
-		arm: { srcs: ["libg.so"], },
-	},
-	bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget("cc_prebuilt_library_shared", "libtest", AttrNameToString{
-					"shared_library": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": "libg.so",
-        "//build/bazel_common_rules/platforms/arch:arm64": "libf.so",
-        "//conditions:default": None,
-    })`,
-				}),
-			},
-		})
-}
-
-func TestSharedPrebuiltLibrarySharedStanzaFails(t *testing.T) {
-	RunBp2BuildTestCaseSimple(t,
-		Bp2buildTestCase{
-			Description:                "prebuilt library shared with shared stanza fails because multiple sources",
-			ModuleTypeUnderTest:        "cc_prebuilt_library_shared",
-			ModuleTypeUnderTestFactory: cc.PrebuiltSharedLibraryFactory,
-			Filesystem: map[string]string{
-				"libf.so": "",
-				"libg.so": "",
-			},
-			Blueprint: `
-cc_prebuilt_library_shared {
-	name: "libtest",
-	srcs: ["libf.so"],
-	shared: {
-		srcs: ["libg.so"],
-	},
-	bazel_module: { bp2build_available: true},
-}`,
-			ExpectedErr: fmt.Errorf("Expected at most one source file"),
-		})
-}
diff --git a/bp2build/cc_prebuilt_library_static_conversion_test.go b/bp2build/cc_prebuilt_library_static_conversion_test.go
deleted file mode 100644
index fb408b5..0000000
--- a/bp2build/cc_prebuilt_library_static_conversion_test.go
+++ /dev/null
@@ -1,199 +0,0 @@
-// Copyright 2022 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//	http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-package bp2build
-
-import (
-	"testing"
-
-	"android/soong/cc"
-)
-
-func runCcPrebuiltLibraryStaticTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Parallel()
-	t.Helper()
-	(&tc).ModuleTypeUnderTest = "cc_prebuilt_library_static"
-	(&tc).ModuleTypeUnderTestFactory = cc.PrebuiltStaticLibraryFactory
-	RunBp2BuildTestCaseSimple(t, tc)
-}
-
-func TestPrebuiltLibraryStaticSimple(t *testing.T) {
-	runCcPrebuiltLibraryStaticTestCase(t,
-		Bp2buildTestCase{
-			Description: "prebuilt library static simple",
-			Filesystem: map[string]string{
-				"libf.so": "",
-			},
-			Blueprint: `
-cc_prebuilt_library_static {
-	name: "libtest",
-	srcs: ["libf.so"],
-	bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget("cc_prebuilt_library_static", "libtest", AttrNameToString{
-					"static_library": `"libf.so"`,
-				}),
-				MakeBazelTarget("cc_prebuilt_library_static", "libtest_alwayslink", AttrNameToString{
-					"static_library": `"libf.so"`,
-					"alwayslink":     "True",
-				}),
-			},
-		})
-}
-
-func TestPrebuiltLibraryStaticWithArchVariance(t *testing.T) {
-	runCcPrebuiltLibraryStaticTestCase(t,
-		Bp2buildTestCase{
-			Description: "prebuilt library with arch variance",
-			Filesystem: map[string]string{
-				"libf.so": "",
-				"libg.so": "",
-			},
-			Blueprint: `
-cc_prebuilt_library_static {
-	name: "libtest",
-	arch: {
-		arm64: { srcs: ["libf.so"], },
-		arm: { srcs: ["libg.so"], },
-	},
-	bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget("cc_prebuilt_library_static", "libtest", AttrNameToString{
-					"static_library": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": "libg.so",
-        "//build/bazel_common_rules/platforms/arch:arm64": "libf.so",
-        "//conditions:default": None,
-    })`}),
-				MakeBazelTarget("cc_prebuilt_library_static", "libtest_alwayslink", AttrNameToString{
-					"alwayslink": "True",
-					"static_library": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": "libg.so",
-        "//build/bazel_common_rules/platforms/arch:arm64": "libf.so",
-        "//conditions:default": None,
-    })`}),
-			},
-		})
-}
-
-func TestPrebuiltLibraryStaticAdditionalAttrs(t *testing.T) {
-	runCcPrebuiltLibraryStaticTestCase(t,
-		Bp2buildTestCase{
-			Description: "prebuilt library additional attributes",
-			Filesystem: map[string]string{
-				"libf.so":             "",
-				"testdir/1/include.h": "",
-				"testdir/2/other.h":   "",
-			},
-			Blueprint: `
-cc_prebuilt_library_static {
-	name: "libtest",
-	srcs: ["libf.so"],
-	export_include_dirs: ["testdir/1/"],
-	export_system_include_dirs: ["testdir/2/"],
-	bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget("cc_prebuilt_library_static", "libtest", AttrNameToString{
-					"static_library":         `"libf.so"`,
-					"export_includes":        `["testdir/1/"]`,
-					"export_system_includes": `["testdir/2/"]`,
-				}),
-				MakeBazelTarget("cc_prebuilt_library_static", "libtest_alwayslink", AttrNameToString{
-					"static_library":         `"libf.so"`,
-					"export_includes":        `["testdir/1/"]`,
-					"export_system_includes": `["testdir/2/"]`,
-					"alwayslink":             "True",
-				}),
-			},
-		})
-}
-
-func TestPrebuiltLibraryStaticWithExportIncludesArchVariant(t *testing.T) {
-	runCcPrebuiltLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_prebuilt_library_static correctly translates export_includes with arch variance",
-		Filesystem: map[string]string{
-			"libf.so": "",
-			"libg.so": "",
-		},
-		Blueprint: `
-cc_prebuilt_library_static {
-	name: "libtest",
-	srcs: ["libf.so"],
-	arch: {
-		arm: { export_include_dirs: ["testdir/1/"], },
-		arm64: { export_include_dirs: ["testdir/2/"], },
-	},
-	bazel_module: { bp2build_available: true },
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_prebuilt_library_static", "libtest", AttrNameToString{
-				"static_library": `"libf.so"`,
-				"export_includes": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["testdir/1/"],
-        "//build/bazel_common_rules/platforms/arch:arm64": ["testdir/2/"],
-        "//conditions:default": [],
-    })`,
-			}),
-			MakeBazelTarget("cc_prebuilt_library_static", "libtest_alwayslink", AttrNameToString{
-				"alwayslink":     "True",
-				"static_library": `"libf.so"`,
-				"export_includes": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["testdir/1/"],
-        "//build/bazel_common_rules/platforms/arch:arm64": ["testdir/2/"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestPrebuiltLibraryStaticWithExportSystemIncludesArchVariant(t *testing.T) {
-	runCcPrebuiltLibraryStaticTestCase(t, Bp2buildTestCase{
-		Description: "cc_prebuilt_library_static correctly translates export_system_includes with arch variance",
-		Filesystem: map[string]string{
-			"libf.so": "",
-			"libg.so": "",
-		},
-		Blueprint: `
-cc_prebuilt_library_static {
-	name: "libtest",
-	srcs: ["libf.so"],
-	arch: {
-		arm: { export_system_include_dirs: ["testdir/1/"], },
-		arm64: { export_system_include_dirs: ["testdir/2/"], },
-	},
-	bazel_module: { bp2build_available: true },
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_prebuilt_library_static", "libtest", AttrNameToString{
-				"static_library": `"libf.so"`,
-				"export_system_includes": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["testdir/1/"],
-        "//build/bazel_common_rules/platforms/arch:arm64": ["testdir/2/"],
-        "//conditions:default": [],
-    })`,
-			}),
-			MakeBazelTarget("cc_prebuilt_library_static", "libtest_alwayslink", AttrNameToString{
-				"alwayslink":     "True",
-				"static_library": `"libf.so"`,
-				"export_system_includes": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["testdir/1/"],
-        "//build/bazel_common_rules/platforms/arch:arm64": ["testdir/2/"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
diff --git a/bp2build/cc_prebuilt_library_static_test.go b/bp2build/cc_prebuilt_library_static_test.go
deleted file mode 100644
index 7d0ab28..0000000
--- a/bp2build/cc_prebuilt_library_static_test.go
+++ /dev/null
@@ -1,157 +0,0 @@
-// Copyright 2022 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//	http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-package bp2build
-
-import (
-	"fmt"
-	"testing"
-
-	"android/soong/cc"
-)
-
-func TestStaticPrebuiltLibrary(t *testing.T) {
-	RunBp2BuildTestCaseSimple(t,
-		Bp2buildTestCase{
-			Description:                "prebuilt library static simple",
-			ModuleTypeUnderTest:        "cc_prebuilt_library_static",
-			ModuleTypeUnderTestFactory: cc.PrebuiltStaticLibraryFactory,
-			Filesystem: map[string]string{
-				"libf.so": "",
-			},
-			Blueprint: `
-cc_prebuilt_library_static {
-	name: "libtest",
-	srcs: ["libf.so"],
-	bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget("cc_prebuilt_library_static", "libtest", AttrNameToString{
-					"static_library": `"libf.so"`,
-				}),
-				MakeBazelTarget("cc_prebuilt_library_static", "libtest_alwayslink", AttrNameToString{
-					"static_library": `"libf.so"`,
-					"alwayslink":     "True",
-				}),
-			},
-		})
-}
-
-func TestStaticPrebuiltLibraryWithArchVariance(t *testing.T) {
-	RunBp2BuildTestCaseSimple(t,
-		Bp2buildTestCase{
-			Description:                "prebuilt library static with arch variance",
-			ModuleTypeUnderTest:        "cc_prebuilt_library_static",
-			ModuleTypeUnderTestFactory: cc.PrebuiltStaticLibraryFactory,
-			Filesystem: map[string]string{
-				"libf.so": "",
-				"libg.so": "",
-			},
-			Blueprint: `
-cc_prebuilt_library_static {
-	name: "libtest",
-	arch: {
-		arm64: { srcs: ["libf.so"], },
-		arm: { srcs: ["libg.so"], },
-	},
-	bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget("cc_prebuilt_library_static", "libtest", AttrNameToString{
-					"static_library": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": "libg.so",
-        "//build/bazel_common_rules/platforms/arch:arm64": "libf.so",
-        "//conditions:default": None,
-    })`}),
-				MakeBazelTarget("cc_prebuilt_library_static", "libtest_alwayslink", AttrNameToString{
-					"alwayslink": "True",
-					"static_library": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": "libg.so",
-        "//build/bazel_common_rules/platforms/arch:arm64": "libf.so",
-        "//conditions:default": None,
-    })`}),
-			},
-		})
-}
-
-func TestStaticPrebuiltLibraryStaticStanzaFails(t *testing.T) {
-	RunBp2BuildTestCaseSimple(t,
-		Bp2buildTestCase{
-			Description:                "prebuilt library with static stanza fails because multiple sources",
-			ModuleTypeUnderTest:        "cc_prebuilt_library_static",
-			ModuleTypeUnderTestFactory: cc.PrebuiltStaticLibraryFactory,
-			Filesystem: map[string]string{
-				"libf.so": "",
-				"libg.so": "",
-			},
-			Blueprint: `
-cc_prebuilt_library_static {
-	name: "libtest",
-	srcs: ["libf.so"],
-	static: {
-		srcs: ["libg.so"],
-	},
-	bazel_module: { bp2build_available: true },
-}`,
-			ExpectedErr: fmt.Errorf("Expected at most one source file"),
-		})
-}
-
-func TestCcLibraryStaticConvertLex(t *testing.T) {
-	runCcLibrarySharedTestCase(t, Bp2buildTestCase{
-		Description:                "cc_library_static with lex files",
-		ModuleTypeUnderTest:        "cc_library_static",
-		ModuleTypeUnderTestFactory: cc.LibraryStaticFactory,
-		Filesystem: map[string]string{
-			"foo.c":   "",
-			"bar.cc":  "",
-			"foo1.l":  "",
-			"bar1.ll": "",
-			"foo2.l":  "",
-			"bar2.ll": "",
-		},
-		Blueprint: `cc_library_static {
-	name: "foo_lib",
-	srcs: ["foo.c", "bar.cc", "foo1.l", "foo2.l", "bar1.ll", "bar2.ll"],
-	lex: { flags: ["--foo_flags"] },
-	include_build_directory: false,
-	bazel_module: { bp2build_available: true },
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("genlex", "foo_lib_genlex_l", AttrNameToString{
-				"srcs": `[
-        "foo1.l",
-        "foo2.l",
-    ]`,
-				"lexopts": `["--foo_flags"]`,
-			}),
-			MakeBazelTarget("genlex", "foo_lib_genlex_ll", AttrNameToString{
-				"srcs": `[
-        "bar1.ll",
-        "bar2.ll",
-    ]`,
-				"lexopts": `["--foo_flags"]`,
-			}),
-			MakeBazelTarget("cc_library_static", "foo_lib", AttrNameToString{
-				"srcs": `[
-        "bar.cc",
-        ":foo_lib_genlex_ll",
-    ]`,
-				"srcs_c": `[
-        "foo.c",
-        ":foo_lib_genlex_l",
-    ]`,
-			}),
-		},
-	})
-}
diff --git a/bp2build/cc_prebuilt_object_conversion_test.go b/bp2build/cc_prebuilt_object_conversion_test.go
deleted file mode 100644
index 068e4e2..0000000
--- a/bp2build/cc_prebuilt_object_conversion_test.go
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright 2022 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//	http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-package bp2build
-
-import (
-	"fmt"
-	"testing"
-
-	"android/soong/cc"
-)
-
-func runCcPrebuiltObjectTestCase(t *testing.T, testCase Bp2buildTestCase) {
-	t.Helper()
-	description := fmt.Sprintf("cc_prebuilt_object: %s", testCase.Description)
-	testCase.ModuleTypeUnderTest = "cc_prebuilt_object"
-	testCase.ModuleTypeUnderTestFactory = cc.PrebuiltObjectFactory
-	testCase.Description = description
-	t.Run(description, func(t *testing.T) {
-		t.Helper()
-		RunBp2BuildTestCaseSimple(t, testCase)
-	})
-}
-
-func TestPrebuiltObject(t *testing.T) {
-	runCcPrebuiltObjectTestCase(t,
-		Bp2buildTestCase{
-			Description: "simple",
-			Filesystem: map[string]string{
-				"obj.o": "",
-			},
-			Blueprint: `
-cc_prebuilt_object {
-	name: "objtest",
-	srcs: ["obj.o"],
-	bazel_module: { bp2build_available: true },
-}`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTarget("cc_prebuilt_object", "objtest", AttrNameToString{
-					"src": `"obj.o"`,
-				})},
-		})
-}
-
-func TestPrebuiltObjectWithArchVariance(t *testing.T) {
-	runCcPrebuiltObjectTestCase(t,
-		Bp2buildTestCase{
-			Description: "with arch variance",
-			Filesystem: map[string]string{
-				"obja.o": "",
-				"objb.o": "",
-			},
-			Blueprint: `
-cc_prebuilt_object {
-	name: "objtest",
-	arch: {
-		arm64: { srcs: ["obja.o"], },
-		arm: { srcs: ["objb.o"], },
-	},
-	bazel_module: { bp2build_available: true },
-}`, ExpectedBazelTargets: []string{
-				MakeBazelTarget("cc_prebuilt_object", "objtest", AttrNameToString{
-					"src": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": "objb.o",
-        "//build/bazel_common_rules/platforms/arch:arm64": "obja.o",
-        "//conditions:default": None,
-    })`,
-				}),
-			},
-		})
-}
-
-func TestPrebuiltObjectMultipleSrcsFails(t *testing.T) {
-	runCcPrebuiltObjectTestCase(t,
-		Bp2buildTestCase{
-			Description: "fails because multiple sources",
-			Filesystem: map[string]string{
-				"obja": "",
-				"objb": "",
-			},
-			Blueprint: `
-cc_prebuilt_object {
-	name: "objtest",
-	srcs: ["obja.o", "objb.o"],
-	bazel_module: { bp2build_available: true },
-}`,
-			ExpectedErr: fmt.Errorf("Expected at most one source file"),
-		})
-}
-
-// TODO: nosrcs test
diff --git a/bp2build/cc_test_conversion_test.go b/bp2build/cc_test_conversion_test.go
deleted file mode 100644
index c5f5f79..0000000
--- a/bp2build/cc_test_conversion_test.go
+++ /dev/null
@@ -1,633 +0,0 @@
-// Copyright 2022 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"fmt"
-	"testing"
-
-	"android/soong/android"
-	"android/soong/cc"
-	"android/soong/genrule"
-)
-
-type ccTestBp2buildTestCase struct {
-	description             string
-	blueprint               string
-	filesystem              map[string]string
-	targets                 []testBazelTarget
-	stubbedBuildDefinitions []string
-}
-
-func registerCcTestModuleTypes(ctx android.RegistrationContext) {
-	cc.RegisterCCBuildComponents(ctx)
-	ctx.RegisterModuleType("cc_binary", cc.BinaryFactory)
-	ctx.RegisterModuleType("cc_library_static", cc.LibraryStaticFactory)
-	ctx.RegisterModuleType("cc_library", cc.LibraryFactory)
-	ctx.RegisterModuleType("cc_test_library", cc.TestLibraryFactory)
-	ctx.RegisterModuleType("genrule", genrule.GenRuleFactory)
-}
-
-func runCcTestTestCase(t *testing.T, testCase ccTestBp2buildTestCase) {
-	t.Helper()
-	moduleTypeUnderTest := "cc_test"
-	description := fmt.Sprintf("%s %s", moduleTypeUnderTest, testCase.description)
-	t.Run(description, func(t *testing.T) {
-		t.Helper()
-		RunBp2BuildTestCase(t, registerCcTestModuleTypes, Bp2buildTestCase{
-			ExpectedBazelTargets:       generateBazelTargetsForTest(testCase.targets, android.HostAndDeviceSupported),
-			Filesystem:                 testCase.filesystem,
-			ModuleTypeUnderTest:        moduleTypeUnderTest,
-			ModuleTypeUnderTestFactory: cc.TestFactory,
-			Description:                description,
-			Blueprint:                  testCase.blueprint,
-			StubbedBuildDefinitions:    testCase.stubbedBuildDefinitions,
-		})
-	})
-}
-
-func TestBasicCcTest(t *testing.T) {
-	runCcTestTestCase(t, ccTestBp2buildTestCase{
-		description: "basic cc_test with commonly used attributes",
-		stubbedBuildDefinitions: []string{"libbuildversion", "libprotobuf-cpp-lite", "libprotobuf-cpp-full",
-			"foolib", "hostlib", "data_mod", "cc_bin", "cc_lib", "cc_test_lib2", "libgtest_main", "libgtest"},
-		blueprint: `
-cc_test {
-    name: "mytest",
-    host_supported: true,
-    srcs: ["test.cpp"],
-    target: {
-        android: {
-            srcs: ["android.cpp"],
-            shared_libs: ["foolib"],
-        },
-        linux: {
-            srcs: ["linux.cpp"],
-        },
-        host: {
-            static_libs: ["hostlib"],
-        },
-    },
-    static_libs: ["cc_test_lib1"],
-    shared_libs: ["cc_test_lib2"],
-    data: [":data_mod", "file.txt"],
-    data_bins: [":cc_bin"],
-    data_libs: [":cc_lib"],
-    cflags: ["-Wall"],
-}
-
-cc_test_library {
-    name: "cc_test_lib1",
-    host_supported: true,
-    include_build_directory: false,
-}
-` + simpleModule("cc_library", "foolib") +
-			simpleModule("cc_library_static", "hostlib") +
-			simpleModule("genrule", "data_mod") +
-			simpleModule("cc_binary", "cc_bin") +
-			simpleModule("cc_library", "cc_lib") +
-			simpleModule("cc_test_library", "cc_test_lib2") +
-			simpleModule("cc_library_static", "libgtest_main") +
-			simpleModule("cc_library_static", "libgtest"),
-		targets: []testBazelTarget{
-			{"cc_library_shared", "cc_test_lib1", AttrNameToString{}},
-			{"cc_library_static", "cc_test_lib1_bp2build_cc_library_static", AttrNameToString{}},
-			{"cc_test", "mytest", AttrNameToString{
-				"copts": `["-Wall"]`,
-				"data": `[
-        ":data_mod",
-        "file.txt",
-        ":cc_bin",
-        ":cc_lib",
-    ]`,
-				"deps": `[
-        ":cc_test_lib1_bp2build_cc_library_static",
-        ":libgtest_main",
-        ":libgtest",
-    ] + select({
-        "//build/bazel_common_rules/platforms/os:darwin": [":hostlib"],
-        "//build/bazel_common_rules/platforms/os:linux_bionic": [":hostlib"],
-        "//build/bazel_common_rules/platforms/os:linux_glibc": [":hostlib"],
-        "//build/bazel_common_rules/platforms/os:linux_musl": [":hostlib"],
-        "//build/bazel_common_rules/platforms/os:windows": [":hostlib"],
-        "//conditions:default": [],
-    })`,
-				"local_includes": `["."]`,
-				"dynamic_deps": `[":cc_test_lib2"] + select({
-        "//build/bazel_common_rules/platforms/os:android": [":foolib"],
-        "//conditions:default": [],
-    })`,
-				"srcs": `["test.cpp"] + select({
-        "//build/bazel_common_rules/platforms/os:android": [
-            "linux.cpp",
-            "android.cpp",
-        ],
-        "//build/bazel_common_rules/platforms/os:linux_bionic": ["linux.cpp"],
-        "//build/bazel_common_rules/platforms/os:linux_glibc": ["linux.cpp"],
-        "//build/bazel_common_rules/platforms/os:linux_musl": ["linux.cpp"],
-        "//conditions:default": [],
-    })`,
-				"runs_on": `[
-        "host_without_device",
-        "device",
-    ]`,
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os_arch:android_arm64": [
-            "memtag_heap",
-            "diag_memtag_heap",
-        ],
-        "//conditions:default": [],
-    })`,
-			},
-			},
-		},
-	})
-}
-
-func TestBasicCcTestGtestIsolatedDisabled(t *testing.T) {
-	runCcTestTestCase(t, ccTestBp2buildTestCase{
-		description: "cc test with disabled gtest and isolated props",
-		blueprint: `
-cc_test {
-    name: "mytest",
-    host_supported: true,
-    srcs: ["test.cpp"],
-    gtest: false,
-    isolated: false,
-}
-`,
-		targets: []testBazelTarget{
-			{"cc_test", "mytest", AttrNameToString{
-				"gtest":          "False",
-				"local_includes": `["."]`,
-				"srcs":           `["test.cpp"]`,
-				"runs_on": `[
-        "host_without_device",
-        "device",
-    ]`,
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os_arch:android_arm64": [
-            "memtag_heap",
-            "diag_memtag_heap",
-        ],
-        "//conditions:default": [],
-    })`,
-			},
-			},
-		},
-	})
-}
-
-func TestCcTest_TestOptions_Tags(t *testing.T) {
-	runCcTestTestCase(t, ccTestBp2buildTestCase{
-		description:             "cc test with test_options.tags converted to tags",
-		stubbedBuildDefinitions: []string{"libgtest_main", "libgtest"},
-		blueprint: `
-cc_test {
-    name: "mytest",
-    host_supported: true,
-    srcs: ["test.cpp"],
-    test_options: { tags: ["no-remote"] },
-}
-` + simpleModule("cc_library_static", "libgtest_main") +
-			simpleModule("cc_library_static", "libgtest"),
-		targets: []testBazelTarget{
-			{"cc_test", "mytest", AttrNameToString{
-				"tags":           `["no-remote"]`,
-				"local_includes": `["."]`,
-				"srcs":           `["test.cpp"]`,
-				"deps": `[
-        ":libgtest_main",
-        ":libgtest",
-    ]`,
-				"runs_on": `[
-        "host_without_device",
-        "device",
-    ]`,
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os_arch:android_arm64": [
-            "memtag_heap",
-            "diag_memtag_heap",
-        ],
-        "//conditions:default": [],
-    })`,
-			},
-			},
-		},
-	})
-}
-
-func TestCcTest_TestConfig(t *testing.T) {
-	runCcTestTestCase(t, ccTestBp2buildTestCase{
-		description: "cc test that sets a test_config",
-		filesystem: map[string]string{
-			"test_config.xml": "",
-		},
-		stubbedBuildDefinitions: []string{"libgtest_main", "libgtest"},
-		blueprint: `
-cc_test {
-	name: "mytest",
-	srcs: ["test.cpp"],
-	test_config: "test_config.xml",
-}
-` + simpleModule("cc_library_static", "libgtest_main") +
-			simpleModule("cc_library_static", "libgtest"),
-		targets: []testBazelTarget{
-			{"cc_test", "mytest", AttrNameToString{
-				"local_includes":         `["."]`,
-				"srcs":                   `["test.cpp"]`,
-				"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
-				"test_config":            `"test_config.xml"`,
-				"deps": `[
-        ":libgtest_main",
-        ":libgtest",
-    ]`,
-				"runs_on": `["device"]`,
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os_arch:android_arm64": [
-            "memtag_heap",
-            "diag_memtag_heap",
-        ],
-        "//conditions:default": [],
-    })`,
-			},
-			},
-		},
-	})
-}
-
-func TestCcTest_TestConfigAndroidTestXML(t *testing.T) {
-	runCcTestTestCase(t, ccTestBp2buildTestCase{
-		description: "cc test that defaults to test config AndroidTest.xml",
-		filesystem: map[string]string{
-			"AndroidTest.xml":   "",
-			"DynamicConfig.xml": "",
-		},
-		stubbedBuildDefinitions: []string{"libgtest_main", "libgtest"},
-		blueprint: `
-cc_test {
-	name: "mytest",
-	srcs: ["test.cpp"],
-}
-` + simpleModule("cc_library_static", "libgtest_main") +
-			simpleModule("cc_library_static", "libgtest"),
-		targets: []testBazelTarget{
-			{"cc_test", "mytest", AttrNameToString{
-				"local_includes":         `["."]`,
-				"srcs":                   `["test.cpp"]`,
-				"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
-				"test_config":            `"AndroidTest.xml"`,
-				"dynamic_config":         `"DynamicConfig.xml"`,
-				"deps": `[
-        ":libgtest_main",
-        ":libgtest",
-    ]`,
-				"runs_on": `["device"]`,
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os_arch:android_arm64": [
-            "memtag_heap",
-            "diag_memtag_heap",
-        ],
-        "//conditions:default": [],
-    })`,
-			},
-			},
-		},
-	})
-}
-
-func TestCcTest_TestConfigTemplateOptions(t *testing.T) {
-	runCcTestTestCase(t, ccTestBp2buildTestCase{
-		description: "cc test that sets test config template attributes",
-		filesystem: map[string]string{
-			"test_config_template.xml": "",
-		},
-		stubbedBuildDefinitions: []string{"libgtest_isolated_main", "liblog"},
-		blueprint: `
-cc_test {
-	name: "mytest",
-	srcs: ["test.cpp"],
-	test_config_template: "test_config_template.xml",
-	auto_gen_config: true,
-	isolated: true,
-}
-` + simpleModule("cc_library_static", "libgtest_isolated_main") +
-			simpleModule("cc_library", "liblog"),
-		targets: []testBazelTarget{
-			{"cc_test", "mytest", AttrNameToString{
-				"auto_generate_test_config": "True",
-				"local_includes":            `["."]`,
-				"srcs":                      `["test.cpp"]`,
-				"target_compatible_with":    `["//build/bazel_common_rules/platforms/os:android"]`,
-				"template_configs": `[
-        "'<target_preparer class=\"com.android.tradefed.targetprep.RootTargetPreparer\">\\n        <option name=\"force-root\" value=\"false\" />\\n    </target_preparer>'",
-        "'<option name=\"not-shardable\" value=\"true\" />'",
-    ]`,
-				"template_install_base": `"/data/local/tmp"`,
-				"template_test_config":  `"test_config_template.xml"`,
-				"deps":                  `[":libgtest_isolated_main"]`,
-				"dynamic_deps":          `[":liblog"]`,
-				"runs_on":               `["device"]`,
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os_arch:android_arm64": [
-            "memtag_heap",
-            "diag_memtag_heap",
-        ],
-        "//conditions:default": [],
-    })`,
-			},
-			},
-		},
-	})
-}
-
-func TestCcTest_WithExplicitGTestDepInAndroidBp(t *testing.T) {
-	runCcTestTestCase(t, ccTestBp2buildTestCase{
-		description:             "cc test that lists libgtest in Android.bp should not have dups of libgtest in BUILD file",
-		stubbedBuildDefinitions: []string{"libgtest_main", "libgtest"},
-		blueprint: `
-cc_test {
-	name: "mytest",
-	srcs: ["test.cpp"],
-	static_libs: ["libgtest"],
-}
-` + simpleModule("cc_library_static", "libgtest_main") +
-			simpleModule("cc_library_static", "libgtest"),
-		targets: []testBazelTarget{
-			{"cc_test", "mytest", AttrNameToString{
-				"local_includes":         `["."]`,
-				"srcs":                   `["test.cpp"]`,
-				"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
-				"deps": `[
-        ":libgtest",
-        ":libgtest_main",
-    ]`,
-				"runs_on": `["device"]`,
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os_arch:android_arm64": [
-            "memtag_heap",
-            "diag_memtag_heap",
-        ],
-        "//conditions:default": [],
-    })`,
-			},
-			},
-		},
-	})
-
-}
-
-func TestCcTest_WithIsolatedTurnedOn(t *testing.T) {
-	runCcTestTestCase(t, ccTestBp2buildTestCase{
-		description:             "cc test that sets `isolated: true` should run with ligtest_isolated_main instead of libgtest_main",
-		stubbedBuildDefinitions: []string{"libgtest_isolated_main", "liblog"},
-		blueprint: `
-cc_test {
-	name: "mytest",
-	srcs: ["test.cpp"],
-	isolated: true,
-}
-` + simpleModule("cc_library_static", "libgtest_isolated_main") +
-			simpleModule("cc_library", "liblog"),
-		targets: []testBazelTarget{
-			{"cc_test", "mytest", AttrNameToString{
-				"local_includes":         `["."]`,
-				"srcs":                   `["test.cpp"]`,
-				"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
-				"deps":                   `[":libgtest_isolated_main"]`,
-				"dynamic_deps":           `[":liblog"]`,
-				"runs_on":                `["device"]`,
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os_arch:android_arm64": [
-            "memtag_heap",
-            "diag_memtag_heap",
-        ],
-        "//conditions:default": [],
-    })`,
-			},
-			},
-		},
-	})
-
-}
-
-func TestCcTest_GtestExplicitlySpecifiedInAndroidBp(t *testing.T) {
-	runCcTestTestCase(t, ccTestBp2buildTestCase{
-		description:             "If `gtest` is explicit in Android.bp, it should be explicit in BUILD files as well",
-		stubbedBuildDefinitions: []string{"libgtest_main", "libgtest"},
-		blueprint: `
-cc_test {
-	name: "mytest_with_gtest",
-	gtest: true,
-}
-cc_test {
-	name: "mytest_with_no_gtest",
-	gtest: false,
-}
-` + simpleModule("cc_library_static", "libgtest_main") +
-			simpleModule("cc_library_static", "libgtest"),
-		targets: []testBazelTarget{
-			{"cc_test", "mytest_with_gtest", AttrNameToString{
-				"local_includes": `["."]`,
-				"deps": `[
-        ":libgtest_main",
-        ":libgtest",
-    ]`,
-				"gtest":                  "True",
-				"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
-				"runs_on":                `["device"]`,
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os_arch:android_arm64": [
-            "memtag_heap",
-            "diag_memtag_heap",
-        ],
-        "//conditions:default": [],
-    })`,
-			},
-			},
-			{"cc_test", "mytest_with_no_gtest", AttrNameToString{
-				"local_includes":         `["."]`,
-				"gtest":                  "False",
-				"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
-				"runs_on":                `["device"]`,
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os_arch:android_arm64": [
-            "memtag_heap",
-            "diag_memtag_heap",
-        ],
-        "//conditions:default": [],
-    })`,
-			},
-			},
-		},
-	})
-}
-
-func TestCcTest_DisableMemtagHeap(t *testing.T) {
-	runCcTestTestCase(t, ccTestBp2buildTestCase{
-		description:             "cc test that disable memtag_heap",
-		stubbedBuildDefinitions: []string{"libgtest_isolated_main", "liblog"},
-		blueprint: `
-cc_test {
-	name: "mytest",
-	srcs: ["test.cpp"],
-	isolated: true,
-	sanitize: {
-		cfi: true,
-		memtag_heap: false,
-	},
-}
-` + simpleModule("cc_library_static", "libgtest_isolated_main") +
-			simpleModule("cc_library", "liblog"),
-		targets: []testBazelTarget{
-			{"cc_test", "mytest", AttrNameToString{
-				"local_includes":         `["."]`,
-				"srcs":                   `["test.cpp"]`,
-				"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
-				"deps":                   `[":libgtest_isolated_main"]`,
-				"dynamic_deps":           `[":liblog"]`,
-				"runs_on":                `["device"]`,
-				"features": `["android_cfi"] + select({
-        "//build/bazel_common_rules/platforms/os_arch:android_arm64": ["-memtag_heap"],
-        "//conditions:default": [],
-    })`,
-			},
-			},
-		},
-	})
-}
-
-func TestCcTest_RespectArm64MemtagHeap(t *testing.T) {
-	runCcTestTestCase(t, ccTestBp2buildTestCase{
-		description:             "cc test that disable memtag_heap",
-		stubbedBuildDefinitions: []string{"libgtest_isolated_main", "liblog"},
-		blueprint: `
-cc_test {
-	name: "mytest",
-	srcs: ["test.cpp"],
-	isolated: true,
-	target: {
-		android_arm64: {
-			sanitize: {
-				memtag_heap: false,
-			}
-		}
-	},
-}
-` + simpleModule("cc_library_static", "libgtest_isolated_main") +
-			simpleModule("cc_library", "liblog"),
-		targets: []testBazelTarget{
-			{"cc_test", "mytest", AttrNameToString{
-				"local_includes":         `["."]`,
-				"srcs":                   `["test.cpp"]`,
-				"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
-				"deps":                   `[":libgtest_isolated_main"]`,
-				"dynamic_deps":           `[":liblog"]`,
-				"runs_on":                `["device"]`,
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os_arch:android_arm64": ["-memtag_heap"],
-        "//conditions:default": [],
-    })`,
-			},
-			},
-		},
-	})
-}
-
-func TestCcTest_IgnoreNoneArm64MemtagHeap(t *testing.T) {
-	runCcTestTestCase(t, ccTestBp2buildTestCase{
-		description:             "cc test that disable memtag_heap",
-		stubbedBuildDefinitions: []string{"libgtest_isolated_main", "liblog"},
-		blueprint: `
-cc_test {
-	name: "mytest",
-	srcs: ["test.cpp"],
-	isolated: true,
-	arch: {
-		x86: {
-			sanitize: {
-				memtag_heap: false,
-			}
-		}
-	},
-}
-` + simpleModule("cc_library_static", "libgtest_isolated_main") +
-			simpleModule("cc_library", "liblog"),
-		targets: []testBazelTarget{
-			{"cc_test", "mytest", AttrNameToString{
-				"local_includes":         `["."]`,
-				"srcs":                   `["test.cpp"]`,
-				"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
-				"deps":                   `[":libgtest_isolated_main"]`,
-				"dynamic_deps":           `[":liblog"]`,
-				"runs_on":                `["device"]`,
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os_arch:android_arm64": [
-            "memtag_heap",
-            "diag_memtag_heap",
-        ],
-        "//conditions:default": [],
-    })`,
-			},
-			},
-		},
-	})
-}
-
-func TestCcTest_Arm64MemtagHeapOverrideNoConfigOne(t *testing.T) {
-	runCcTestTestCase(t, ccTestBp2buildTestCase{
-		description:             "cc test that disable memtag_heap",
-		stubbedBuildDefinitions: []string{"libgtest_isolated_main", "liblog"},
-		blueprint: `
-cc_test {
-	name: "mytest",
-	srcs: ["test.cpp"],
-	isolated: true,
-	sanitize: {
-		memtag_heap: true,
-	},
-	target: {
-		android_arm64: {
-			sanitize: {
-				memtag_heap: false,
-				diag: {
-					memtag_heap: false,
-				},
-			}
-		}
-	},
-}
-` + simpleModule("cc_library_static", "libgtest_isolated_main") +
-			simpleModule("cc_library", "liblog"),
-		targets: []testBazelTarget{
-			{"cc_test", "mytest", AttrNameToString{
-				"local_includes":         `["."]`,
-				"srcs":                   `["test.cpp"]`,
-				"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
-				"deps":                   `[":libgtest_isolated_main"]`,
-				"dynamic_deps":           `[":liblog"]`,
-				"runs_on":                `["device"]`,
-				"features": `select({
-        "//build/bazel_common_rules/platforms/os_arch:android_arm64": [
-            "-memtag_heap",
-            "-diag_memtag_heap",
-        ],
-        "//conditions:default": [],
-    })`,
-			},
-			},
-		},
-	})
-}
diff --git a/bp2build/cc_yasm_conversion_test.go b/bp2build/cc_yasm_conversion_test.go
deleted file mode 100644
index c98e1a1..0000000
--- a/bp2build/cc_yasm_conversion_test.go
+++ /dev/null
@@ -1,179 +0,0 @@
-// Copyright 2022 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//	http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-package bp2build
-
-import (
-	"testing"
-
-	"android/soong/android"
-	"android/soong/cc"
-)
-
-func runYasmTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	RunBp2BuildTestCase(t, registerYasmModuleTypes, tc)
-}
-
-func registerYasmModuleTypes(ctx android.RegistrationContext) {
-	cc.RegisterCCBuildComponents(ctx)
-	ctx.RegisterModuleType("filegroup", android.FileGroupFactory)
-	ctx.RegisterModuleType("cc_library_static", cc.LibraryStaticFactory)
-	ctx.RegisterModuleType("cc_prebuilt_library_static", cc.PrebuiltStaticLibraryFactory)
-	ctx.RegisterModuleType("cc_library_headers", cc.LibraryHeaderFactory)
-}
-
-func TestYasmSimple(t *testing.T) {
-	runYasmTestCase(t, Bp2buildTestCase{
-		Description:                "Simple yasm test",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Filesystem: map[string]string{
-			"main.cpp":   "",
-			"myfile.asm": "",
-		},
-		Blueprint: `
-cc_library {
-  name: "foo",
-  srcs: ["main.cpp", "myfile.asm"],
-}`,
-		ExpectedBazelTargets: append([]string{
-			MakeBazelTarget("yasm", "foo_yasm", map[string]string{
-				"include_dirs": `["."]`,
-				"srcs":         `["myfile.asm"]`,
-			}),
-		}, makeCcLibraryTargets("foo", map[string]string{
-			"local_includes": `["."]`,
-			"srcs": `[
-        "main.cpp",
-        ":foo_yasm",
-    ]`,
-		})...),
-	})
-}
-
-func TestYasmWithIncludeDirs(t *testing.T) {
-	runYasmTestCase(t, Bp2buildTestCase{
-		Description:                "Simple yasm test",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Filesystem: map[string]string{
-			"main.cpp":                    "",
-			"myfile.asm":                  "",
-			"include1/foo/myinclude.inc":  "",
-			"include2/foo/myinclude2.inc": "",
-		},
-		Blueprint: `
-cc_library {
-  name: "foo",
-  local_include_dirs: ["include1/foo"],
-  export_include_dirs: ["include2/foo"],
-  srcs: ["main.cpp", "myfile.asm"],
-}`,
-		ExpectedBazelTargets: append([]string{
-			MakeBazelTarget("yasm", "foo_yasm", map[string]string{
-				"include_dirs": `[
-        "include1/foo",
-        ".",
-        "include2/foo",
-    ]`,
-				"srcs": `["myfile.asm"]`,
-			}),
-		}, makeCcLibraryTargets("foo", map[string]string{
-			"local_includes": `[
-        "include1/foo",
-        ".",
-    ]`,
-			"export_includes": `["include2/foo"]`,
-			"srcs": `[
-        "main.cpp",
-        ":foo_yasm",
-    ]`,
-		})...),
-	})
-}
-
-func TestYasmConditionalBasedOnArch(t *testing.T) {
-	runYasmTestCase(t, Bp2buildTestCase{
-		Description:                "Simple yasm test",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Filesystem: map[string]string{
-			"main.cpp":   "",
-			"myfile.asm": "",
-		},
-		Blueprint: `
-cc_library {
-  name: "foo",
-  srcs: ["main.cpp"],
-  arch: {
-    x86: {
-      srcs: ["myfile.asm"],
-    },
-  },
-}`,
-		ExpectedBazelTargets: append([]string{
-			MakeBazelTarget("yasm", "foo_yasm", map[string]string{
-				"include_dirs": `["."]`,
-				"srcs": `select({
-        "//build/bazel_common_rules/platforms/arch:x86": ["myfile.asm"],
-        "//conditions:default": [],
-    })`,
-			}),
-		}, makeCcLibraryTargets("foo", map[string]string{
-			"local_includes": `["."]`,
-			"srcs": `["main.cpp"] + select({
-        "//build/bazel_common_rules/platforms/arch:x86": [":foo_yasm"],
-        "//conditions:default": [],
-    })`,
-		})...),
-	})
-}
-
-func TestYasmPartiallyConditional(t *testing.T) {
-	runYasmTestCase(t, Bp2buildTestCase{
-		Description:                "Simple yasm test",
-		ModuleTypeUnderTest:        "cc_library",
-		ModuleTypeUnderTestFactory: cc.LibraryFactory,
-		Filesystem: map[string]string{
-			"main.cpp":         "",
-			"myfile.asm":       "",
-			"mysecondfile.asm": "",
-		},
-		Blueprint: `
-cc_library {
-  name: "foo",
-  srcs: ["main.cpp", "myfile.asm"],
-  arch: {
-    x86: {
-      srcs: ["mysecondfile.asm"],
-    },
-  },
-}`,
-		ExpectedBazelTargets: append([]string{
-			MakeBazelTarget("yasm", "foo_yasm", map[string]string{
-				"include_dirs": `["."]`,
-				"srcs": `["myfile.asm"] + select({
-        "//build/bazel_common_rules/platforms/arch:x86": ["mysecondfile.asm"],
-        "//conditions:default": [],
-    })`,
-			}),
-		}, makeCcLibraryTargets("foo", map[string]string{
-			"local_includes": `["."]`,
-			"srcs": `[
-        "main.cpp",
-        ":foo_yasm",
-    ]`,
-		})...),
-	})
-}
diff --git a/bp2build/conversion.go b/bp2build/conversion.go
index b2792e6..be3c7ff 100644
--- a/bp2build/conversion.go
+++ b/bp2build/conversion.go
@@ -8,11 +8,6 @@
 	"strings"
 
 	"android/soong/android"
-	"android/soong/apex"
-	"android/soong/cc"
-	cc_config "android/soong/cc/config"
-	java_config "android/soong/java/config"
-	rust_config "android/soong/rust/config"
 	"android/soong/starlark_fmt"
 
 	"github.com/google/blueprint/proptools"
@@ -33,23 +28,6 @@
 	files = append(files, newFile("android", GeneratedBuildFileName, "")) // Creates a //cc_toolchain package.
 	files = append(files, newFile("android", "constants.bzl", android.BazelCcToolchainVars(cfg)))
 
-	files = append(files, newFile("cc_toolchain", GeneratedBuildFileName, "")) // Creates a //cc_toolchain package.
-	files = append(files, newFile("cc_toolchain", "config_constants.bzl", cc_config.BazelCcToolchainVars(cfg)))
-	files = append(files, newFile("cc_toolchain", "sanitizer_constants.bzl", cc.BazelCcSanitizerToolchainVars(cfg)))
-
-	files = append(files, newFile("java_toolchain", GeneratedBuildFileName, "")) // Creates a //java_toolchain package.
-	files = append(files, newFile("java_toolchain", "constants.bzl", java_config.BazelJavaToolchainVars(cfg)))
-
-	files = append(files, newFile("rust_toolchain", GeneratedBuildFileName, "")) // Creates a //rust_toolchain package.
-	files = append(files, newFile("rust_toolchain", "constants.bzl", rust_config.BazelRustToolchainVars(cfg)))
-
-	files = append(files, newFile("apex_toolchain", GeneratedBuildFileName, "")) // Creates a //apex_toolchain package.
-	apexToolchainVars, err := apex.BazelApexToolchainVars()
-	if err != nil {
-		return nil, err
-	}
-	files = append(files, newFile("apex_toolchain", "constants.bzl", apexToolchainVars))
-
 	if buf, err := json.MarshalIndent(metrics.convertedModuleWithType, "", "  "); err != nil {
 		return []BazelFile{}, err
 	} else {
diff --git a/bp2build/conversion_test.go b/bp2build/conversion_test.go
index 51675ce..2f806fa 100644
--- a/bp2build/conversion_test.go
+++ b/bp2build/conversion_test.go
@@ -17,8 +17,6 @@
 import (
 	"sort"
 	"testing"
-
-	"android/soong/android"
 )
 
 type bazelFilepath struct {
@@ -80,148 +78,3 @@
 		}
 	}
 }
-
-func TestCreateBazelFiles_Bp2Build_CreatesDefaultFiles(t *testing.T) {
-	testConfig := android.TestConfig("", make(map[string]string), "", make(map[string][]byte))
-	codegenCtx := NewCodegenContext(testConfig, android.NewTestContext(testConfig).Context, Bp2Build, "")
-	files, err := createSoongInjectionDirFiles(codegenCtx, CreateCodegenMetrics())
-	if err != nil {
-		t.Error(err)
-	}
-	expectedFilePaths := []bazelFilepath{
-		{
-			dir:      "android",
-			basename: GeneratedBuildFileName,
-		},
-		{
-			dir:      "android",
-			basename: "constants.bzl",
-		},
-		{
-			dir:      "cc_toolchain",
-			basename: GeneratedBuildFileName,
-		},
-		{
-			dir:      "cc_toolchain",
-			basename: "config_constants.bzl",
-		},
-		{
-			dir:      "cc_toolchain",
-			basename: "sanitizer_constants.bzl",
-		},
-		{
-			dir:      "java_toolchain",
-			basename: GeneratedBuildFileName,
-		},
-		{
-			dir:      "java_toolchain",
-			basename: "constants.bzl",
-		},
-		{
-			dir:      "rust_toolchain",
-			basename: GeneratedBuildFileName,
-		},
-		{
-			dir:      "rust_toolchain",
-			basename: "constants.bzl",
-		},
-		{
-			dir:      "apex_toolchain",
-			basename: GeneratedBuildFileName,
-		},
-		{
-			dir:      "apex_toolchain",
-			basename: "constants.bzl",
-		},
-		{
-			dir:      "metrics",
-			basename: "converted_modules.json",
-		},
-		{
-			dir:      "metrics",
-			basename: "BUILD.bazel",
-		},
-		{
-			dir:      "metrics",
-			basename: "converted_modules_path_map.json",
-		},
-		{
-			dir:      "metrics",
-			basename: "converted_modules_path_map.bzl",
-		},
-		{
-			dir:      "product_config",
-			basename: "soong_config_variables.bzl",
-		},
-		{
-			dir:      "product_config",
-			basename: "arch_configuration.bzl",
-		},
-		{
-			dir:      "api_levels",
-			basename: GeneratedBuildFileName,
-		},
-		{
-			dir:      "api_levels",
-			basename: "api_levels.json",
-		},
-		{
-			dir:      "api_levels",
-			basename: "platform_versions.bzl",
-		},
-		{
-			dir:      "allowlists",
-			basename: GeneratedBuildFileName,
-		},
-		{
-			dir:      "allowlists",
-			basename: "mixed_build_prod_allowlist.txt",
-		},
-		{
-			dir:      "allowlists",
-			basename: "mixed_build_staging_allowlist.txt",
-		},
-	}
-
-	less := func(a bazelFilepath, b bazelFilepath) bool {
-		return a.dir+"/"+a.basename < b.dir+"/"+b.basename
-	}
-
-	fileToFilepath := func(a BazelFile) bazelFilepath {
-		return bazelFilepath{basename: a.Basename, dir: a.Dir}
-	}
-
-	sort.Slice(expectedFilePaths, func(i, j int) bool {
-		return less(expectedFilePaths[i], expectedFilePaths[j])
-	})
-	sort.Slice(files, func(i, j int) bool {
-		return less(fileToFilepath(files[i]), fileToFilepath(files[j]))
-	})
-
-	i := 0
-	j := 0
-	for i < len(expectedFilePaths) && j < len(files) {
-		expectedFile, actualFile := expectedFilePaths[i], files[j]
-
-		if actualFile.Dir == expectedFile.dir && actualFile.Basename == expectedFile.basename {
-			i++
-			j++
-		} else if less(expectedFile, fileToFilepath(actualFile)) {
-			t.Errorf("Did not find expected file %s/%s", expectedFile.dir, expectedFile.basename)
-			i++
-		} else {
-			t.Errorf("Found unexpected file %s/%s", actualFile.Dir, actualFile.Basename)
-			j++
-		}
-	}
-	for i < len(expectedFilePaths) {
-		expectedFile := expectedFilePaths[i]
-		t.Errorf("Did not find expected file %s/%s", expectedFile.dir, expectedFile.basename)
-		i++
-	}
-	for j < len(files) {
-		actualFile := files[j]
-		t.Errorf("Found unexpected file %s/%s", actualFile.Dir, actualFile.Basename)
-		j++
-	}
-}
diff --git a/bp2build/droiddoc_exported_dir_conversion_test.go b/bp2build/droiddoc_exported_dir_conversion_test.go
deleted file mode 100644
index dee67f4..0000000
--- a/bp2build/droiddoc_exported_dir_conversion_test.go
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2023 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"regexp"
-	"testing"
-
-	"android/soong/java"
-)
-
-func TestDroiddocExportedDir(t *testing.T) {
-	bp := `
-	droiddoc_exported_dir {
-		name: "test-module",
-		path: "docs",
-	}
-	`
-	p := regexp.MustCompile(`\t*\|`)
-	dedent := func(s string) string {
-		return p.ReplaceAllString(s, "")
-	}
-	expectedBazelTargets := []string{
-		MakeBazelTargetNoRestrictions(
-			"droiddoc_exported_dir",
-			"test-module",
-			AttrNameToString{
-				"dir": `"docs"`,
-				"srcs": dedent(`[
-				|        "docs/android/1.txt",
-				|        "docs/android/nested-1/2.txt",
-				|        "//docs/android/nested-2:3.txt",
-				|        "//docs/android/nested-2:Android.bp",
-				|    ]`),
-			}),
-		//note we are not excluding Android.bp files from subpackages for now
-	}
-	RunBp2BuildTestCase(t, java.RegisterDocsBuildComponents, Bp2buildTestCase{
-		Blueprint:            bp,
-		ExpectedBazelTargets: expectedBazelTargets,
-		Filesystem: map[string]string{
-			"docs/android/1.txt":               "",
-			"docs/android/nested-1/2.txt":      "",
-			"docs/android/nested-2/Android.bp": "",
-			"docs/android/nested-2/3.txt":      "",
-		},
-	})
-}
diff --git a/bp2build/fdo_profile_conversion_test.go b/bp2build/fdo_profile_conversion_test.go
deleted file mode 100644
index 918b27c..0000000
--- a/bp2build/fdo_profile_conversion_test.go
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright 2023 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"testing"
-
-	"android/soong/android"
-	"android/soong/cc"
-)
-
-func runFdoProfileTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	(&tc).ModuleTypeUnderTest = "fdo_profile"
-	(&tc).ModuleTypeUnderTestFactory = cc.FdoProfileFactory
-	RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {}, tc)
-}
-
-func TestFdoProfile(t *testing.T) {
-	testcases := []struct {
-		name               string
-		bp                 string
-		expectedBazelAttrs AttrNameToString
-	}{
-		{
-			name: "fdo_profile with arch-specific profiles",
-			bp: `
-fdo_profile {
-	name: "foo",
-	arch: {
-		arm: {
-			profile: "foo_arm.afdo",
-		},
-		arm64: {
-			profile: "foo_arm64.afdo",
-		}
-	}
-}`,
-			expectedBazelAttrs: AttrNameToString{
-				"profile": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": "foo_arm.afdo",
-        "//build/bazel_common_rules/platforms/arch:arm64": "foo_arm64.afdo",
-        "//conditions:default": None,
-    })`,
-			},
-		},
-		{
-			name: "fdo_profile with arch-agnostic profile",
-			bp: `
-fdo_profile {
-	name: "foo",
-	profile: "foo.afdo",
-}`,
-			expectedBazelAttrs: AttrNameToString{
-				"profile": `"foo.afdo"`,
-			},
-		},
-	}
-
-	for _, test := range testcases {
-		t.Run(test.name, func(t *testing.T) {
-			expectedBazelTargets := []string{
-				// TODO(b/276287371): Add device-only restriction back to fdo_profile targets
-				MakeBazelTargetNoRestrictions("fdo_profile", "foo", test.expectedBazelAttrs),
-			}
-			runFdoProfileTestCase(t, Bp2buildTestCase{
-				Description:          test.name,
-				Blueprint:            test.bp,
-				ExpectedBazelTargets: expectedBazelTargets,
-			})
-		})
-	}
-}
diff --git a/bp2build/filegroup_conversion_test.go b/bp2build/filegroup_conversion_test.go
deleted file mode 100644
index 9c49dac..0000000
--- a/bp2build/filegroup_conversion_test.go
+++ /dev/null
@@ -1,205 +0,0 @@
-// Copyright 2021 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"fmt"
-	"testing"
-
-	"android/soong/android"
-)
-
-func runFilegroupTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	(&tc).ModuleTypeUnderTest = "filegroup"
-	(&tc).ModuleTypeUnderTestFactory = android.FileGroupFactory
-	RunBp2BuildTestCase(t, registerFilegroupModuleTypes, tc)
-}
-
-func registerFilegroupModuleTypes(ctx android.RegistrationContext) {}
-
-func TestFilegroupSameNameAsFile_OneFile(t *testing.T) {
-	runFilegroupTestCase(t, Bp2buildTestCase{
-		Description: "filegroup - same name as file, with one file",
-		Filesystem:  map[string]string{},
-		Blueprint: `
-filegroup {
-    name: "foo",
-    srcs: ["foo"],
-}
-`,
-		ExpectedBazelTargets:       []string{},
-		ExpectedHandcraftedModules: []string{"foo"}},
-	)
-}
-
-func TestFilegroupSameNameAsFile_MultipleFiles(t *testing.T) {
-	runFilegroupTestCase(t, Bp2buildTestCase{
-		Description: "filegroup - same name as file, with multiple files",
-		Filesystem:  map[string]string{},
-		Blueprint: `
-filegroup {
-	name: "foo",
-	srcs: ["foo", "bar"],
-}
-`,
-		ExpectedErr: fmt.Errorf("filegroup 'foo' cannot contain a file with the same name"),
-	})
-}
-
-func TestFilegroupWithAidlSrcs(t *testing.T) {
-	testcases := []struct {
-		name               string
-		bp                 string
-		expectedBazelAttrs AttrNameToString
-	}{
-		{
-			name: "filegroup with only aidl srcs",
-			bp: `
-	filegroup {
-		name: "foo",
-		srcs: ["aidl/foo.aidl"],
-		path: "aidl",
-	}`,
-			expectedBazelAttrs: AttrNameToString{
-				"srcs":                `["aidl/foo.aidl"]`,
-				"strip_import_prefix": `"aidl"`,
-				"tags":                `["apex_available=//apex_available:anyapex"]`,
-			},
-		},
-		{
-			name: "filegroup without path",
-			bp: `
-	filegroup {
-		name: "foo",
-		srcs: ["aidl/foo.aidl"],
-	}`,
-			expectedBazelAttrs: AttrNameToString{
-				"srcs": `["aidl/foo.aidl"]`,
-				"tags": `["apex_available=//apex_available:anyapex"]`,
-			},
-		},
-	}
-
-	for _, test := range testcases {
-		t.Run(test.name, func(t *testing.T) {
-			expectedBazelTargets := []string{
-				MakeBazelTargetNoRestrictions("aidl_library", "foo", test.expectedBazelAttrs),
-			}
-			runFilegroupTestCase(t, Bp2buildTestCase{
-				Description:          test.name,
-				Blueprint:            test.bp,
-				ExpectedBazelTargets: expectedBazelTargets,
-			})
-		})
-	}
-}
-
-func TestFilegroupWithAidlAndNonAidlSrcs(t *testing.T) {
-	runFilegroupTestCase(t, Bp2buildTestCase{
-		Description: "filegroup with aidl and non-aidl srcs",
-		Filesystem:  map[string]string{},
-		Blueprint: `
-filegroup {
-    name: "foo",
-    srcs: [
-		"aidl/foo.aidl",
-		"buf.proto",
-	],
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTargetNoRestrictions("filegroup", "foo", AttrNameToString{
-				"srcs": `[
-        "aidl/foo.aidl",
-        "buf.proto",
-    ]`}),
-		}})
-}
-
-func TestFilegroupWithProtoSrcs(t *testing.T) {
-	runFilegroupTestCase(t, Bp2buildTestCase{
-		Description: "filegroup with proto and non-proto srcs",
-		Filesystem:  map[string]string{},
-		Blueprint: `
-filegroup {
-		name: "foo",
-		srcs: ["proto/foo.proto"],
-		path: "proto",
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTargetNoRestrictions("proto_library", "foo_proto", AttrNameToString{
-				"srcs":                `["proto/foo.proto"]`,
-				"strip_import_prefix": `"proto"`,
-				"tags": `[
-        "apex_available=//apex_available:anyapex",
-        "manual",
-    ]`,
-			}),
-			MakeBazelTargetNoRestrictions("alias", "foo_bp2build_converted", AttrNameToString{
-				"actual": `"//.:foo_proto"`,
-				"tags": `[
-        "apex_available=//apex_available:anyapex",
-        "manual",
-    ]`,
-			}),
-			MakeBazelTargetNoRestrictions("filegroup", "foo", AttrNameToString{
-				"srcs": `["proto/foo.proto"]`}),
-		}})
-}
-
-func TestFilegroupWithProtoAndNonProtoSrcs(t *testing.T) {
-	runFilegroupTestCase(t, Bp2buildTestCase{
-		Description: "filegroup with proto and non-proto srcs",
-		Filesystem:  map[string]string{},
-		Blueprint: `
-filegroup {
-    name: "foo",
-    srcs: [
-		"foo.proto",
-		"buf.cpp",
-	],
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTargetNoRestrictions("filegroup", "foo", AttrNameToString{
-				"srcs": `[
-        "foo.proto",
-        "buf.cpp",
-    ]`}),
-		}})
-}
-
-func TestFilegroupWithProtoInDifferentPackage(t *testing.T) {
-	runFilegroupTestCase(t, Bp2buildTestCase{
-		Description: "filegroup with .proto in different package",
-		Filesystem: map[string]string{
-			"subdir/Android.bp": "",
-		},
-		Blueprint: `
-filegroup {
-    name: "foo",
-    srcs: ["subdir/foo.proto"],
-}`,
-		Dir: "subdir", // check in subdir
-		ExpectedBazelTargets: []string{
-			MakeBazelTargetNoRestrictions("proto_library", "foo_proto", AttrNameToString{
-				"srcs":                `["//subdir:foo.proto"]`,
-				"import_prefix":       `"subdir"`,
-				"strip_import_prefix": `""`,
-				"tags": `[
-        "apex_available=//apex_available:anyapex",
-        "manual",
-    ]`}),
-		}})
-}
diff --git a/bp2build/genrule_conversion_test.go b/bp2build/genrule_conversion_test.go
deleted file mode 100644
index af03dff..0000000
--- a/bp2build/genrule_conversion_test.go
+++ /dev/null
@@ -1,959 +0,0 @@
-// Copyright 2021 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"fmt"
-	"path/filepath"
-	"testing"
-
-	"android/soong/android"
-	"android/soong/cc"
-	"android/soong/genrule"
-	"android/soong/java"
-)
-
-func registerGenruleModuleTypes(ctx android.RegistrationContext) {
-	ctx.RegisterModuleType("genrule_defaults", func() android.Module { return genrule.DefaultsFactory() })
-	ctx.RegisterModuleType("cc_binary", func() android.Module { return cc.BinaryFactory() })
-	ctx.RegisterModuleType("soong_namespace", func() android.Module { return android.NamespaceFactory() })
-}
-
-func runGenruleTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	(&tc).ModuleTypeUnderTest = "genrule"
-	(&tc).ModuleTypeUnderTestFactory = genrule.GenRuleFactory
-	RunBp2BuildTestCase(t, registerGenruleModuleTypes, tc)
-}
-
-func otherGenruleBp(genruleTarget string) map[string]string {
-	return map[string]string{
-		"other/Android.bp": fmt.Sprintf(`%s {
-    name: "foo.tool",
-    out: ["foo_tool.out"],
-    srcs: ["foo_tool.in"],
-    cmd: "cp $(in) $(out)",
-}
-%s {
-    name: "other.tool",
-    out: ["other_tool.out"],
-    srcs: ["other_tool.in"],
-    cmd: "cp $(in) $(out)",
-}`, genruleTarget, genruleTarget),
-		"other/file.txt": "",
-	}
-}
-
-func TestGenruleCliVariableReplacement(t *testing.T) {
-	testCases := []struct {
-		moduleType string
-		factory    android.ModuleFactory
-		genDir     string
-		hod        android.HostOrDeviceSupported
-	}{
-		{
-			moduleType: "genrule",
-			factory:    genrule.GenRuleFactory,
-			genDir:     "$(RULEDIR)",
-		},
-		{
-			moduleType: "cc_genrule",
-			factory:    cc.GenRuleFactory,
-			genDir:     "$(RULEDIR)",
-			hod:        android.DeviceSupported,
-		},
-		{
-			moduleType: "java_genrule",
-			factory:    java.GenRuleFactory,
-			genDir:     "$(RULEDIR)",
-			hod:        android.DeviceSupported,
-		},
-		{
-			moduleType: "java_genrule_host",
-			factory:    java.GenRuleFactoryHost,
-			genDir:     "$(RULEDIR)",
-			hod:        android.HostSupported,
-		},
-	}
-
-	bp := `%s {
-    name: "foo.tool",
-    out: ["foo_tool.out"],
-    srcs: ["foo_tool.in"],
-    cmd: "cp $(in) $(out)",
-}
-
-%s {
-    name: "foo",
-    out: ["foo.out"],
-    srcs: ["foo.in"],
-    tools: [":foo.tool"],
-    cmd: "$(location :foo.tool) --genDir=$(genDir) arg $(in) $(out)",
-    bazel_module: { bp2build_available: true },
-}`
-
-	for _, tc := range testCases {
-		moduleAttrs := AttrNameToString{
-			"cmd":   fmt.Sprintf(`"$(location :foo.tool) --genDir=%s arg $(SRCS) $(OUTS)"`, tc.genDir),
-			"outs":  `["foo.out"]`,
-			"srcs":  `["foo.in"]`,
-			"tools": `[":foo.tool"]`,
-		}
-
-		expectedBazelTargets := []string{
-			makeBazelTargetHostOrDevice("genrule", "foo", moduleAttrs, tc.hod),
-		}
-
-		t.Run(tc.moduleType, func(t *testing.T) {
-			RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {},
-				Bp2buildTestCase{
-					ModuleTypeUnderTest:        tc.moduleType,
-					ModuleTypeUnderTestFactory: tc.factory,
-					Blueprint:                  fmt.Sprintf(bp, tc.moduleType, tc.moduleType),
-					ExpectedBazelTargets:       expectedBazelTargets,
-					StubbedBuildDefinitions:    []string{"foo.tool", "other.tool"},
-				})
-		})
-	}
-}
-
-func TestGenruleLocationsLabel(t *testing.T) {
-	testCases := []struct {
-		moduleType string
-		factory    android.ModuleFactory
-		hod        android.HostOrDeviceSupported
-	}{
-		{
-			moduleType: "genrule",
-			factory:    genrule.GenRuleFactory,
-		},
-		{
-			moduleType: "cc_genrule",
-			factory:    cc.GenRuleFactory,
-			hod:        android.DeviceSupported,
-		},
-		{
-			moduleType: "java_genrule",
-			factory:    java.GenRuleFactory,
-			hod:        android.DeviceSupported,
-		},
-		{
-			moduleType: "java_genrule_host",
-			factory:    java.GenRuleFactoryHost,
-			hod:        android.HostSupported,
-		},
-	}
-
-	bp := `%s {
-    name: "foo.tools",
-    out: ["foo_tool.out", "foo_tool2.out"],
-    srcs: ["foo_tool.in"],
-    cmd: "cp $(in) $(out)",
-    bazel_module: { bp2build_available: true },
-}
-
-%s {
-    name: "foo",
-    out: ["foo.out"],
-    srcs: ["foo.in"],
-    tools: [":foo.tools"],
-    cmd: "$(locations :foo.tools) -s $(out) $(in)",
-    bazel_module: { bp2build_available: true },
-}`
-
-	for _, tc := range testCases {
-		fooAttrs := AttrNameToString{
-			"cmd":   `"$(locations :foo.tools) -s $(OUTS) $(SRCS)"`,
-			"outs":  `["foo.out"]`,
-			"srcs":  `["foo.in"]`,
-			"tools": `[":foo.tools"]`,
-		}
-		fooToolsAttrs := AttrNameToString{
-			"cmd": `"cp $(SRCS) $(OUTS)"`,
-			"outs": `[
-        "foo_tool.out",
-        "foo_tool2.out",
-    ]`,
-			"srcs": `["foo_tool.in"]`,
-		}
-
-		expectedBazelTargets := []string{
-			makeBazelTargetHostOrDevice("genrule", "foo", fooAttrs, tc.hod),
-			makeBazelTargetHostOrDevice("genrule", "foo.tools", fooToolsAttrs, tc.hod),
-		}
-
-		t.Run(tc.moduleType, func(t *testing.T) {
-			RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {},
-				Bp2buildTestCase{
-					ModuleTypeUnderTest:        tc.moduleType,
-					ModuleTypeUnderTestFactory: tc.factory,
-					Blueprint:                  fmt.Sprintf(bp, tc.moduleType, tc.moduleType),
-					ExpectedBazelTargets:       expectedBazelTargets,
-				})
-		})
-	}
-}
-
-func TestGenruleLocationsAbsoluteLabel(t *testing.T) {
-	testCases := []struct {
-		moduleType string
-		factory    android.ModuleFactory
-		hod        android.HostOrDeviceSupported
-	}{
-		{
-			moduleType: "genrule",
-			factory:    genrule.GenRuleFactory,
-		},
-		{
-			moduleType: "cc_genrule",
-			factory:    cc.GenRuleFactory,
-			hod:        android.DeviceSupported,
-		},
-		{
-			moduleType: "java_genrule",
-			factory:    java.GenRuleFactory,
-			hod:        android.DeviceSupported,
-		},
-		{
-			moduleType: "java_genrule_host",
-			factory:    java.GenRuleFactoryHost,
-			hod:        android.HostSupported,
-		},
-	}
-
-	bp := `%s {
-    name: "foo",
-    out: ["foo.out"],
-    srcs: ["foo.in"],
-    tool_files: [":foo.tool"],
-    cmd: "$(locations :foo.tool) -s $(out) $(in)",
-    bazel_module: { bp2build_available: true },
-}`
-
-	for _, tc := range testCases {
-		moduleAttrs := AttrNameToString{
-			"cmd":   `"$(locations //other:foo.tool) -s $(OUTS) $(SRCS)"`,
-			"outs":  `["foo.out"]`,
-			"srcs":  `["foo.in"]`,
-			"tools": `["//other:foo.tool"]`,
-		}
-
-		expectedBazelTargets := []string{
-			makeBazelTargetHostOrDevice("genrule", "foo", moduleAttrs, tc.hod),
-		}
-
-		t.Run(tc.moduleType, func(t *testing.T) {
-			RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {},
-				Bp2buildTestCase{
-					ModuleTypeUnderTest:        tc.moduleType,
-					ModuleTypeUnderTestFactory: tc.factory,
-					Blueprint:                  fmt.Sprintf(bp, tc.moduleType),
-					ExpectedBazelTargets:       expectedBazelTargets,
-					Filesystem:                 otherGenruleBp(tc.moduleType),
-					StubbedBuildDefinitions:    []string{"//other:foo.tool"},
-				})
-		})
-	}
-}
-
-func TestGenruleSrcsLocationsAbsoluteLabel(t *testing.T) {
-	testCases := []struct {
-		moduleType string
-		factory    android.ModuleFactory
-		hod        android.HostOrDeviceSupported
-	}{
-		{
-			moduleType: "genrule",
-			factory:    genrule.GenRuleFactory,
-		},
-		{
-			moduleType: "cc_genrule",
-			factory:    cc.GenRuleFactory,
-			hod:        android.DeviceSupported,
-		},
-		{
-			moduleType: "java_genrule",
-			factory:    java.GenRuleFactory,
-			hod:        android.DeviceSupported,
-		},
-		{
-			moduleType: "java_genrule_host",
-			factory:    java.GenRuleFactoryHost,
-			hod:        android.HostSupported,
-		},
-	}
-
-	bp := `%s {
-    name: "foo",
-    out: ["foo.out"],
-    srcs: [":other.tool", "other/file.txt",],
-    tool_files: [":foo.tool"],
-    cmd: "$(locations :foo.tool) $(location other/file.txt) -s $(out) $(location :other.tool)",
-    bazel_module: { bp2build_available: true },
-}`
-
-	for _, tc := range testCases {
-		moduleAttrs := AttrNameToString{
-			"cmd":  `"$(locations //other:foo.tool) $(location //other:file.txt) -s $(OUTS) $(location //other:other.tool)"`,
-			"outs": `["foo.out"]`,
-			"srcs": `[
-        "//other:other.tool",
-        "//other:file.txt",
-    ]`,
-			"tools": `["//other:foo.tool"]`,
-		}
-
-		expectedBazelTargets := []string{
-			makeBazelTargetHostOrDevice("genrule", "foo", moduleAttrs, tc.hod),
-		}
-
-		t.Run(tc.moduleType, func(t *testing.T) {
-			RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {},
-				Bp2buildTestCase{
-					ModuleTypeUnderTest:        tc.moduleType,
-					ModuleTypeUnderTestFactory: tc.factory,
-					Blueprint:                  fmt.Sprintf(bp, tc.moduleType),
-					ExpectedBazelTargets:       expectedBazelTargets,
-					Filesystem:                 otherGenruleBp(tc.moduleType),
-					StubbedBuildDefinitions:    []string{"//other:foo.tool", "//other:other.tool"},
-				})
-		})
-	}
-}
-
-func TestGenruleLocationLabelShouldSubstituteFirstToolLabel(t *testing.T) {
-	testCases := []struct {
-		moduleType string
-		factory    android.ModuleFactory
-		hod        android.HostOrDeviceSupported
-	}{
-		{
-			moduleType: "genrule",
-			factory:    genrule.GenRuleFactory,
-		},
-		{
-			moduleType: "cc_genrule",
-			factory:    cc.GenRuleFactory,
-			hod:        android.DeviceSupported,
-		},
-		{
-			moduleType: "java_genrule",
-			factory:    java.GenRuleFactory,
-			hod:        android.DeviceSupported,
-		},
-		{
-			moduleType: "java_genrule_host",
-			factory:    java.GenRuleFactoryHost,
-			hod:        android.HostSupported,
-		},
-	}
-
-	bp := `%s {
-    name: "foo",
-    out: ["foo.out"],
-    srcs: ["foo.in"],
-    tool_files: [":foo.tool", ":other.tool"],
-    cmd: "$(location) -s $(out) $(in)",
-    bazel_module: { bp2build_available: true },
-}`
-
-	for _, tc := range testCases {
-		moduleAttrs := AttrNameToString{
-			"cmd":  `"$(location //other:foo.tool) -s $(OUTS) $(SRCS)"`,
-			"outs": `["foo.out"]`,
-			"srcs": `["foo.in"]`,
-			"tools": `[
-        "//other:foo.tool",
-        "//other:other.tool",
-    ]`,
-		}
-
-		expectedBazelTargets := []string{
-			makeBazelTargetHostOrDevice("genrule", "foo", moduleAttrs, tc.hod),
-		}
-
-		t.Run(tc.moduleType, func(t *testing.T) {
-			RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {},
-				Bp2buildTestCase{
-					ModuleTypeUnderTest:        tc.moduleType,
-					ModuleTypeUnderTestFactory: tc.factory,
-					Blueprint:                  fmt.Sprintf(bp, tc.moduleType),
-					ExpectedBazelTargets:       expectedBazelTargets,
-					Filesystem:                 otherGenruleBp(tc.moduleType),
-					StubbedBuildDefinitions:    []string{"//other:foo.tool", "//other:other.tool"},
-				})
-		})
-	}
-}
-
-func TestGenruleLocationsLabelShouldSubstituteFirstToolLabel(t *testing.T) {
-	testCases := []struct {
-		moduleType string
-		factory    android.ModuleFactory
-		hod        android.HostOrDeviceSupported
-	}{
-		{
-			moduleType: "genrule",
-			factory:    genrule.GenRuleFactory,
-		},
-		{
-			moduleType: "cc_genrule",
-			factory:    cc.GenRuleFactory,
-			hod:        android.DeviceSupported,
-		},
-		{
-			moduleType: "java_genrule",
-			factory:    java.GenRuleFactory,
-			hod:        android.DeviceSupported,
-		},
-		{
-			moduleType: "java_genrule_host",
-			factory:    java.GenRuleFactoryHost,
-			hod:        android.HostSupported,
-		},
-	}
-
-	bp := `%s {
-    name: "foo",
-    out: ["foo.out"],
-    srcs: ["foo.in"],
-    tool_files: [":foo.tool", ":other.tool"],
-    cmd: "$(locations) -s $(out) $(in)",
-    bazel_module: { bp2build_available: true },
-}`
-
-	for _, tc := range testCases {
-		moduleAttrs := AttrNameToString{
-			"cmd":  `"$(locations //other:foo.tool) -s $(OUTS) $(SRCS)"`,
-			"outs": `["foo.out"]`,
-			"srcs": `["foo.in"]`,
-			"tools": `[
-        "//other:foo.tool",
-        "//other:other.tool",
-    ]`,
-		}
-
-		expectedBazelTargets := []string{
-			makeBazelTargetHostOrDevice("genrule", "foo", moduleAttrs, tc.hod),
-		}
-
-		t.Run(tc.moduleType, func(t *testing.T) {
-			RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {},
-				Bp2buildTestCase{
-					ModuleTypeUnderTest:        tc.moduleType,
-					ModuleTypeUnderTestFactory: tc.factory,
-					Blueprint:                  fmt.Sprintf(bp, tc.moduleType),
-					ExpectedBazelTargets:       expectedBazelTargets,
-					Filesystem:                 otherGenruleBp(tc.moduleType),
-					StubbedBuildDefinitions:    []string{"//other:foo.tool", "//other:other.tool"},
-				})
-		})
-	}
-}
-
-func TestGenruleWithoutToolsOrToolFiles(t *testing.T) {
-	testCases := []struct {
-		moduleType string
-		factory    android.ModuleFactory
-		hod        android.HostOrDeviceSupported
-	}{
-		{
-			moduleType: "genrule",
-			factory:    genrule.GenRuleFactory,
-		},
-		{
-			moduleType: "cc_genrule",
-			factory:    cc.GenRuleFactory,
-			hod:        android.DeviceSupported,
-		},
-		{
-			moduleType: "java_genrule",
-			factory:    java.GenRuleFactory,
-			hod:        android.DeviceSupported,
-		},
-		{
-			moduleType: "java_genrule_host",
-			factory:    java.GenRuleFactoryHost,
-			hod:        android.HostSupported,
-		},
-	}
-
-	bp := `%s {
-    name: "foo",
-    out: ["foo.out"],
-    srcs: ["foo.in"],
-    cmd: "cp $(in) $(out)",
-    bazel_module: { bp2build_available: true },
-}`
-
-	for _, tc := range testCases {
-		moduleAttrs := AttrNameToString{
-			"cmd":  `"cp $(SRCS) $(OUTS)"`,
-			"outs": `["foo.out"]`,
-			"srcs": `["foo.in"]`,
-		}
-
-		expectedBazelTargets := []string{
-			makeBazelTargetHostOrDevice("genrule", "foo", moduleAttrs, tc.hod),
-		}
-
-		t.Run(tc.moduleType, func(t *testing.T) {
-			RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {},
-				Bp2buildTestCase{
-					ModuleTypeUnderTest:        tc.moduleType,
-					ModuleTypeUnderTestFactory: tc.factory,
-					Blueprint:                  fmt.Sprintf(bp, tc.moduleType),
-					ExpectedBazelTargets:       expectedBazelTargets,
-				})
-		})
-	}
-}
-
-func TestGenruleBp2BuildInlinesDefaults(t *testing.T) {
-	testCases := []Bp2buildTestCase{
-		{
-			Description: "genrule applies properties from a genrule_defaults dependency if not specified",
-			Blueprint: `genrule_defaults {
-    name: "gen_defaults",
-    cmd: "do-something $(in) $(out)",
-}
-genrule {
-    name: "gen",
-    out: ["out"],
-    srcs: ["in1"],
-    defaults: ["gen_defaults"],
-    bazel_module: { bp2build_available: true },
-}
-`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("genrule", "gen", AttrNameToString{
-					"cmd":  `"do-something $(SRCS) $(OUTS)"`,
-					"outs": `["out"]`,
-					"srcs": `["in1"]`,
-				}),
-			},
-		},
-		{
-			Description: "genrule does merges properties from a genrule_defaults dependency, latest-first",
-			Blueprint: `genrule_defaults {
-    name: "gen_defaults",
-    out: ["out-from-defaults"],
-    srcs: ["in-from-defaults"],
-    cmd: "cmd-from-defaults",
-}
-genrule {
-    name: "gen",
-    out: ["out"],
-    srcs: ["in1"],
-    defaults: ["gen_defaults"],
-    cmd: "do-something $(in) $(out)",
-    bazel_module: { bp2build_available: true },
-}
-`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("genrule", "gen", AttrNameToString{
-					"cmd": `"do-something $(SRCS) $(OUTS)"`,
-					"outs": `[
-        "out-from-defaults",
-        "out",
-    ]`,
-					"srcs": `[
-        "in-from-defaults",
-        "in1",
-    ]`,
-				}),
-			},
-		},
-		{
-			Description: "genrule applies properties from list of genrule_defaults",
-			Blueprint: `genrule_defaults {
-    name: "gen_defaults1",
-    cmd: "cp $(in) $(out)",
-}
-
-genrule_defaults {
-    name: "gen_defaults2",
-    srcs: ["in1"],
-}
-
-genrule {
-    name: "gen",
-    out: ["out"],
-    defaults: ["gen_defaults1", "gen_defaults2"],
-    bazel_module: { bp2build_available: true },
-}
-`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("genrule", "gen", AttrNameToString{
-					"cmd":  `"cp $(SRCS) $(OUTS)"`,
-					"outs": `["out"]`,
-					"srcs": `["in1"]`,
-				}),
-			},
-		},
-		{
-			Description: "genrule applies properties from genrule_defaults transitively",
-			Blueprint: `genrule_defaults {
-    name: "gen_defaults1",
-    defaults: ["gen_defaults2"],
-    cmd: "cmd1 $(in) $(out)", // overrides gen_defaults2's cmd property value.
-}
-
-genrule_defaults {
-    name: "gen_defaults2",
-    defaults: ["gen_defaults3"],
-    cmd: "cmd2 $(in) $(out)",
-    out: ["out-from-2"],
-    srcs: ["in1"],
-}
-
-genrule_defaults {
-    name: "gen_defaults3",
-    out: ["out-from-3"],
-    srcs: ["srcs-from-3"],
-}
-
-genrule {
-    name: "gen",
-    out: ["out"],
-    defaults: ["gen_defaults1"],
-    bazel_module: { bp2build_available: true },
-}
-`,
-			ExpectedBazelTargets: []string{
-				MakeBazelTargetNoRestrictions("genrule", "gen", AttrNameToString{
-					"cmd": `"cmd1 $(SRCS) $(OUTS)"`,
-					"outs": `[
-        "out-from-3",
-        "out-from-2",
-        "out",
-    ]`,
-					"srcs": `[
-        "srcs-from-3",
-        "in1",
-    ]`,
-				}),
-			},
-		},
-	}
-
-	for _, testCase := range testCases {
-		t.Run(testCase.Description, func(t *testing.T) {
-			runGenruleTestCase(t, testCase)
-		})
-	}
-}
-
-func TestCcGenruleArchAndExcludeSrcs(t *testing.T) {
-	name := "cc_genrule with arch"
-	bp := `
-	cc_genrule {
-		name: "foo",
-		srcs: [
-			"foo1.in",
-			"foo2.in",
-		],
-		exclude_srcs: ["foo2.in"],
-		arch: {
-			arm: {
-				srcs: [
-					"foo1_arch.in",
-					"foo2_arch.in",
-				],
-				exclude_srcs: ["foo2_arch.in"],
-			},
-		},
-		cmd: "cat $(in) > $(out)",
-		bazel_module: { bp2build_available: true },
-	}`
-
-	expectedBazelAttrs := AttrNameToString{
-		"srcs": `["foo1.in"] + select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["foo1_arch.in"],
-        "//conditions:default": [],
-    })`,
-		"cmd":                    `"cat $(SRCS) > $(OUTS)"`,
-		"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
-	}
-
-	expectedBazelTargets := []string{
-		MakeBazelTargetNoRestrictions("genrule", "foo", expectedBazelAttrs),
-	}
-
-	t.Run(name, func(t *testing.T) {
-		RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {},
-			Bp2buildTestCase{
-				ModuleTypeUnderTest:        "cc_genrule",
-				ModuleTypeUnderTestFactory: cc.GenRuleFactory,
-				Blueprint:                  bp,
-				ExpectedBazelTargets:       expectedBazelTargets,
-			})
-	})
-}
-
-func TestGenruleWithExportIncludeDirs(t *testing.T) {
-	testCases := []struct {
-		moduleType string
-		factory    android.ModuleFactory
-		hod        android.HostOrDeviceSupported
-	}{
-		{
-			moduleType: "genrule",
-			factory:    genrule.GenRuleFactory,
-		},
-		{
-			moduleType: "cc_genrule",
-			factory:    cc.GenRuleFactory,
-			hod:        android.DeviceSupported,
-		},
-		{
-			moduleType: "java_genrule",
-			factory:    java.GenRuleFactory,
-			hod:        android.DeviceSupported,
-		},
-		{
-			moduleType: "java_genrule_host",
-			factory:    java.GenRuleFactoryHost,
-			hod:        android.HostSupported,
-		},
-	}
-
-	dir := "baz"
-
-	bp := `%s {
-    name: "foo",
-    out: ["foo.out.h"],
-    srcs: ["foo.in"],
-    cmd: "cp $(in) $(out)",
-    export_include_dirs: ["foo", "bar", "."],
-    bazel_module: { bp2build_available: true },
-}`
-
-	for _, tc := range testCases {
-		moduleAttrs := AttrNameToString{
-			"cmd":  `"cp $(SRCS) $(OUTS)"`,
-			"outs": `["foo.out.h"]`,
-			"srcs": `["foo.in"]`,
-		}
-
-		expectedBazelTargets := []string{
-			makeBazelTargetHostOrDevice("genrule", "foo", moduleAttrs, tc.hod),
-			makeBazelTargetHostOrDevice("cc_library_headers", "foo__header_library", AttrNameToString{
-				"hdrs": `[":foo"]`,
-				"export_includes": `[
-        "foo",
-        "baz/foo",
-        "bar",
-        "baz/bar",
-        ".",
-        "baz",
-    ]`,
-			},
-				tc.hod),
-		}
-
-		t.Run(tc.moduleType, func(t *testing.T) {
-			RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {},
-				Bp2buildTestCase{
-					ModuleTypeUnderTest:        tc.moduleType,
-					ModuleTypeUnderTestFactory: tc.factory,
-					Filesystem: map[string]string{
-						filepath.Join(dir, "Android.bp"): fmt.Sprintf(bp, tc.moduleType),
-					},
-					Dir:                  dir,
-					ExpectedBazelTargets: expectedBazelTargets,
-				})
-		})
-	}
-}
-
-func TestGenruleWithSoongConfigVariableConfiguredCmd(t *testing.T) {
-	testCases := []struct {
-		moduleType string
-		factory    android.ModuleFactory
-		hod        android.HostOrDeviceSupported
-	}{
-		{
-			moduleType: "genrule",
-			factory:    genrule.GenRuleFactory,
-		},
-		{
-			moduleType: "cc_genrule",
-			factory:    cc.GenRuleFactory,
-			hod:        android.DeviceSupported,
-		},
-		{
-			moduleType: "java_genrule",
-			factory:    java.GenRuleFactory,
-			hod:        android.DeviceSupported,
-		},
-		{
-			moduleType: "java_genrule_host",
-			factory:    java.GenRuleFactoryHost,
-			hod:        android.HostSupported,
-		},
-	}
-
-	bp := `
-soong_config_module_type {
-    name: "my_genrule",
-    module_type: "%s",
-    config_namespace: "my_namespace",
-    bool_variables: ["my_variable"],
-    properties: ["cmd"],
-}
-
-my_genrule {
-    name: "foo",
-    out: ["foo.txt"],
-    cmd: "echo 'no variable' > $(out)",
-    soong_config_variables: {
-        my_variable: {
-            cmd: "echo 'with variable' > $(out)",
-        },
-    },
-    bazel_module: { bp2build_available: true },
-}
-`
-
-	for _, tc := range testCases {
-		moduleAttrs := AttrNameToString{
-			"cmd": `select({
-        "//build/bazel/product_config/config_settings:my_namespace__my_variable": "echo 'with variable' > $(OUTS)",
-        "//conditions:default": "echo 'no variable' > $(OUTS)",
-    })`,
-			"outs": `["foo.txt"]`,
-		}
-
-		expectedBazelTargets := []string{
-			makeBazelTargetHostOrDevice("genrule", "foo", moduleAttrs, tc.hod),
-		}
-
-		t.Run(tc.moduleType, func(t *testing.T) {
-			RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) { android.RegisterSoongConfigModuleBuildComponents(ctx) },
-				Bp2buildTestCase{
-					Blueprint:                  fmt.Sprintf(bp, tc.moduleType),
-					ModuleTypeUnderTest:        tc.moduleType,
-					ModuleTypeUnderTestFactory: tc.factory,
-					ExpectedBazelTargets:       expectedBazelTargets,
-				})
-		})
-	}
-}
-
-func TestGenruleWithProductVariableConfiguredCmd(t *testing.T) {
-	testCases := []struct {
-		moduleType string
-		factory    android.ModuleFactory
-		hod        android.HostOrDeviceSupported
-	}{
-		{
-			moduleType: "genrule",
-			factory:    genrule.GenRuleFactory,
-		},
-		{
-			moduleType: "cc_genrule",
-			factory:    cc.GenRuleFactory,
-			hod:        android.DeviceSupported,
-		},
-		{
-			moduleType: "java_genrule",
-			factory:    java.GenRuleFactory,
-			hod:        android.DeviceSupported,
-		},
-		{
-			moduleType: "java_genrule_host",
-			factory:    java.GenRuleFactoryHost,
-			hod:        android.HostSupported,
-		},
-	}
-
-	bp := `
-
-%s {
-    name: "foo",
-    out: ["foo.txt"],
-    cmd: "echo 'no variable' > $(out)",
-    product_variables: {
-        debuggable: {
-            cmd: "echo 'with variable' > $(out)",
-        },
-    },
-    bazel_module: { bp2build_available: true },
-}
-`
-
-	for _, tc := range testCases {
-		moduleAttrs := AttrNameToString{
-			"cmd": `select({
-        "//build/bazel/product_config/config_settings:debuggable": "echo 'with variable' > $(OUTS)",
-        "//conditions:default": "echo 'no variable' > $(OUTS)",
-    })`,
-			"outs": `["foo.txt"]`,
-		}
-
-		expectedBazelTargets := []string{
-			makeBazelTargetHostOrDevice("genrule", "foo", moduleAttrs, tc.hod),
-		}
-
-		t.Run(tc.moduleType, func(t *testing.T) {
-			RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) { android.RegisterSoongConfigModuleBuildComponents(ctx) },
-				Bp2buildTestCase{
-					Blueprint:                  fmt.Sprintf(bp, tc.moduleType),
-					ModuleTypeUnderTest:        tc.moduleType,
-					ModuleTypeUnderTestFactory: tc.factory,
-					ExpectedBazelTargets:       expectedBazelTargets,
-				})
-		})
-	}
-}
-
-func TestGenruleWithModulesInNamespaces(t *testing.T) {
-	bp := `
-genrule {
-	name: "mygenrule",
-	cmd: "echo $(location //mynamespace:mymodule) > $(out)",
-	srcs: ["//mynamespace:mymodule"],
-	out: ["myout"],
-}
-`
-	fs := map[string]string{
-		"mynamespace/Android.bp":     `soong_namespace {}`,
-		"mynamespace/dir/Android.bp": `cc_binary {name: "mymodule"}`,
-	}
-	expectedBazelTargets := []string{
-		MakeBazelTargetNoRestrictions("genrule", "mygenrule", AttrNameToString{
-			// The fully qualified soong label is <namespace>:<module_name>
-			// - here the prefix is mynamespace
-			// The fully qualifed bazel label is <package>:<module_name>
-			// - here the prefix is mynamespace/dir, since there is a BUILD file at each level of this FS path
-			"cmd":  `"echo $(location //mynamespace/dir:mymodule) > $(OUTS)"`,
-			"outs": `["myout"]`,
-			"srcs": `["//mynamespace/dir:mymodule"]`,
-		}),
-	}
-
-	t.Run("genrule that uses module from a different namespace", func(t *testing.T) {
-		runGenruleTestCase(t, Bp2buildTestCase{
-			Blueprint:                  bp,
-			Filesystem:                 fs,
-			ModuleTypeUnderTest:        "genrule",
-			ModuleTypeUnderTestFactory: genrule.GenRuleFactory,
-			ExpectedBazelTargets:       expectedBazelTargets,
-			StubbedBuildDefinitions:    []string{"//mynamespace/dir:mymodule"},
-		})
-	})
-
-}
diff --git a/bp2build/gensrcs_conversion_test.go b/bp2build/gensrcs_conversion_test.go
deleted file mode 100644
index e9fc61d..0000000
--- a/bp2build/gensrcs_conversion_test.go
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright 2020 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"testing"
-
-	"android/soong/android"
-	"android/soong/genrule"
-)
-
-func registerModulesForGensrcsTests(ctx android.RegistrationContext) {
-	ctx.RegisterModuleType("filegroup", android.FileGroupFactory)
-}
-
-func TestGensrcs(t *testing.T) {
-	testcases := []struct {
-		name                    string
-		bp                      string
-		expectedBazelAttrs      AttrNameToString
-		stubbedBuildDefinitions []string
-	}{
-		{
-			name: "gensrcs with common usage of properties",
-			bp: `
-			gensrcs {
-                name: "foo",
-                srcs: ["test/input.txt", ":external_files"],
-                tool_files: ["program.py"],
-                cmd: "$(location program.py) $(in) $(out) $(location foo/file.txt) $(location :external_files)",
-                data: ["foo/file.txt", ":external_files"],
-                output_extension: "out",
-                bazel_module: { bp2build_available: true },
-			}
-      filegroup {
-                name: "external_files",
-			}`,
-			stubbedBuildDefinitions: []string{"external_files"},
-			expectedBazelAttrs: AttrNameToString{
-				"srcs": `[
-        "test/input.txt",
-        ":external_files",
-    ]`,
-				"tools":            `["program.py"]`,
-				"output_extension": `"out"`,
-				"cmd":              `"$(location program.py) $(SRC) $(OUT) $(location foo/file.txt) $(location :external_files)"`,
-				"data": `[
-        "foo/file.txt",
-        ":external_files",
-    ]`,
-			},
-		},
-		{
-			name: "gensrcs with out_extension unset",
-			bp: `
-			gensrcs {
-                name: "foo",
-                srcs: ["input.txt"],
-                cmd: "cat $(in) > $(out)",
-                bazel_module: { bp2build_available: true },
-			}`,
-			expectedBazelAttrs: AttrNameToString{
-				"srcs": `["input.txt"]`,
-				"cmd":  `"cat $(SRC) > $(OUT)"`,
-			},
-		},
-	}
-
-	for _, test := range testcases {
-		expectedBazelTargets := []string{
-			MakeBazelTargetNoRestrictions("gensrcs", "foo", test.expectedBazelAttrs),
-		}
-		t.Run(test.name, func(t *testing.T) {
-			RunBp2BuildTestCase(t, registerModulesForGensrcsTests,
-				Bp2buildTestCase{
-					ModuleTypeUnderTest:        "gensrcs",
-					ModuleTypeUnderTestFactory: genrule.GenSrcsFactory,
-					Blueprint:                  test.bp,
-					ExpectedBazelTargets:       expectedBazelTargets,
-					StubbedBuildDefinitions:    test.stubbedBuildDefinitions,
-				})
-		})
-	}
-}
diff --git a/bp2build/go_conversion_test.go b/bp2build/go_conversion_test.go
deleted file mode 100644
index ebd241d..0000000
--- a/bp2build/go_conversion_test.go
+++ /dev/null
@@ -1,208 +0,0 @@
-// Copyright 2023 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"testing"
-
-	"github.com/google/blueprint/bootstrap"
-
-	"android/soong/android"
-)
-
-func runGoTests(t *testing.T, tc Bp2buildTestCase) {
-	RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {
-		tCtx := ctx.(*android.TestContext)
-		bootstrap.RegisterGoModuleTypes(tCtx.Context.Context) // android.TestContext --> android.Context --> blueprint.Context
-	}, tc)
-}
-
-func TestConvertGoPackage(t *testing.T) {
-	bp := `
-bootstrap_go_package {
-	name: "foo",
-	pkgPath: "android/foo",
-	deps: [
-		"bar",
-	],
-	srcs: [
-		"foo1.go",
-		"foo2.go",
-	],
-	linux: {
-		srcs: [
-			"foo_linux.go",
-		],
-		testSrcs: [
-			"foo_linux_test.go",
-		],
-	},
-	darwin: {
-		srcs: [
-			"foo_darwin.go",
-		],
-		testSrcs: [
-			"foo_darwin_test.go",
-		],
-	},
-	testSrcs: [
-		"foo1_test.go",
-		"foo2_test.go",
-	],
-}
-`
-	depBp := `
-bootstrap_go_package {
-	name: "bar",
-}
-`
-	t.Parallel()
-	runGoTests(t, Bp2buildTestCase{
-		Description:         "Convert bootstrap_go_package to go_library",
-		ModuleTypeUnderTest: "bootrstap_go_package",
-		Blueprint:           bp,
-		Filesystem: map[string]string{
-			"bar/Android.bp": depBp, // Put dep in Android.bp to reduce boilerplate in ExpectedBazelTargets
-		},
-		ExpectedBazelTargets: []string{makeBazelTargetHostOrDevice("go_library", "foo",
-			AttrNameToString{
-				"deps":       `["//bar:bar"]`,
-				"importpath": `"android/foo"`,
-				"srcs": `[
-        "foo1.go",
-        "foo2.go",
-    ] + select({
-        "//build/bazel_common_rules/platforms/os:darwin": ["foo_darwin.go"],
-        "//build/bazel_common_rules/platforms/os:linux_glibc": ["foo_linux.go"],
-        "//conditions:default": [],
-    })`,
-			},
-			android.HostSupported,
-		),
-			makeBazelTargetHostOrDevice("go_test", "foo-test",
-				AttrNameToString{
-					"embed": `[":foo"]`,
-					"srcs": `[
-        "foo1_test.go",
-        "foo2_test.go",
-    ] + select({
-        "//build/bazel_common_rules/platforms/os:darwin": ["foo_darwin_test.go"],
-        "//build/bazel_common_rules/platforms/os:linux_glibc": ["foo_linux_test.go"],
-        "//conditions:default": [],
-    })`,
-				},
-				android.HostSupported,
-			)},
-	})
-}
-
-func TestConvertGoBinaryWithTransitiveDeps(t *testing.T) {
-	bp := `
-blueprint_go_binary {
-	name: "foo",
-	srcs: ["main.go"],
-	deps: ["bar"],
-}
-`
-	depBp := `
-bootstrap_go_package {
-	name: "bar",
-	deps: ["baz"],
-}
-bootstrap_go_package {
-	name: "baz",
-}
-`
-	t.Parallel()
-	runGoTests(t, Bp2buildTestCase{
-		Description: "Convert blueprint_go_binary to go_binary",
-		Blueprint:   bp,
-		Filesystem: map[string]string{
-			"bar/Android.bp": depBp, // Put dep in Android.bp to reduce boilerplate in ExpectedBazelTargets
-		},
-		ExpectedBazelTargets: []string{makeBazelTargetHostOrDevice("go_binary", "foo",
-			AttrNameToString{
-				"deps": `[
-        "//bar:bar",
-        "//bar:baz",
-    ]`,
-				"srcs": `["main.go"]`,
-			},
-			android.HostSupported,
-		)},
-	})
-}
-
-func TestConvertGoBinaryWithTestSrcs(t *testing.T) {
-	bp := `
-blueprint_go_binary {
-	name: "foo",
-	srcs: ["main.go"],
-	testSrcs: ["main_test.go"],
-}
-`
-	t.Parallel()
-	runGoTests(t, Bp2buildTestCase{
-		Description: "Convert blueprint_go_binary with testSrcs",
-		Blueprint:   bp,
-		ExpectedBazelTargets: []string{
-			makeBazelTargetHostOrDevice("go_binary", "foo",
-				AttrNameToString{
-					"deps":  `[]`,
-					"embed": `[":foo-source"]`,
-				},
-				android.HostSupported,
-			),
-			makeBazelTargetHostOrDevice("go_source", "foo-source",
-				AttrNameToString{
-					"deps": `[]`,
-					"srcs": `["main.go"]`,
-				},
-				android.HostSupported,
-			),
-			makeBazelTargetHostOrDevice("go_test", "foo-test",
-				AttrNameToString{
-					"embed": `[":foo-source"]`,
-					"srcs":  `["main_test.go"]`,
-				},
-				android.HostSupported,
-			),
-		},
-	})
-}
-
-func TestConvertGoBinaryWithSrcInDifferentPackage(t *testing.T) {
-	bp := `
-blueprint_go_binary {
-	name: "foo",
-	srcs: ["subdir/main.go"],
-}
-`
-	t.Parallel()
-	runGoTests(t, Bp2buildTestCase{
-		Description: "Convert blueprint_go_binary with src in different package",
-		Blueprint:   bp,
-		Filesystem: map[string]string{
-			"subdir/Android.bp": "",
-		},
-		ExpectedBazelTargets: []string{makeBazelTargetHostOrDevice("go_binary", "foo",
-			AttrNameToString{
-				"deps": `[]`,
-				"srcs": `["//subdir:main.go"]`,
-			},
-			android.HostSupported,
-		)},
-	})
-}
diff --git a/bp2build/java_binary_host_conversion_test.go b/bp2build/java_binary_host_conversion_test.go
deleted file mode 100644
index 29c0e44..0000000
--- a/bp2build/java_binary_host_conversion_test.go
+++ /dev/null
@@ -1,338 +0,0 @@
-// Copyright 2021 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"testing"
-
-	"android/soong/android"
-	"android/soong/cc"
-	"android/soong/java"
-)
-
-func runJavaBinaryHostTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	(&tc).ModuleTypeUnderTest = "java_binary_host"
-	(&tc).ModuleTypeUnderTestFactory = java.BinaryHostFactory
-	tc.StubbedBuildDefinitions = append(tc.StubbedBuildDefinitions, "//other:jni-lib-1")
-	RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("cc_library_host_shared", cc.LibraryHostSharedFactory)
-		ctx.RegisterModuleType("java_library", java.LibraryFactory)
-		ctx.RegisterModuleType("java_import_host", java.ImportFactory)
-	}, tc)
-}
-
-var testFs = map[string]string{
-	"test.mf": "Main-Class: com.android.test.MainClass",
-	"other/Android.bp": `cc_library_host_shared {
-    name: "jni-lib-1",
-    stl: "none",
-}`,
-}
-
-func TestJavaBinaryHost(t *testing.T) {
-	runJavaBinaryHostTestCase(t, Bp2buildTestCase{
-		Description: "java_binary_host with srcs, exclude_srcs, jni_libs, javacflags, and manifest.",
-		Filesystem:  testFs,
-		Blueprint: `java_binary_host {
-    name: "java-binary-host-1",
-    srcs: ["a.java", "b.java"],
-    exclude_srcs: ["b.java"],
-    manifest: "test.mf",
-    jni_libs: ["jni-lib-1"],
-    javacflags: ["-Xdoclint:all/protected"],
-    bazel_module: { bp2build_available: true },
-    java_version: "8",
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_library", "java-binary-host-1_lib", AttrNameToString{
-				"srcs":         `["a.java"]`,
-				"deps":         `["//other:jni-lib-1"]`,
-				"java_version": `"8"`,
-				"javacopts":    `["-Xdoclint:all/protected"]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-			MakeBazelTarget("java_binary", "java-binary-host-1", AttrNameToString{
-				"main_class": `"com.android.test.MainClass"`,
-				"jvm_flags":  `["-Djava.library.path=$${RUNPATH}other/jni-lib-1"]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-				"runtime_deps": `[":java-binary-host-1_lib"]`,
-			}),
-		},
-	})
-}
-
-func TestJavaBinaryHostRuntimeDeps(t *testing.T) {
-	runJavaBinaryHostTestCase(t, Bp2buildTestCase{
-		Description:             "java_binary_host with srcs, exclude_srcs, jni_libs, javacflags, and manifest.",
-		Filesystem:              testFs,
-		StubbedBuildDefinitions: []string{"java-dep-1"},
-		Blueprint: `java_binary_host {
-    name: "java-binary-host-1",
-    static_libs: ["java-dep-1"],
-    manifest: "test.mf",
-    bazel_module: { bp2build_available: true },
-}
-
-java_library {
-    name: "java-dep-1",
-    srcs: ["a.java"],
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_binary", "java-binary-host-1", AttrNameToString{
-				"main_class":   `"com.android.test.MainClass"`,
-				"runtime_deps": `[":java-dep-1"]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestJavaBinaryHostLibs(t *testing.T) {
-	runJavaBinaryHostTestCase(t, Bp2buildTestCase{
-		Description:             "java_binary_host with srcs, libs.",
-		Filesystem:              testFs,
-		StubbedBuildDefinitions: []string{"java-lib-dep-1", "java-lib-dep-1-neverlink"},
-		Blueprint: `java_binary_host {
-    name: "java-binary-host-libs",
-    libs: ["java-lib-dep-1"],
-    manifest: "test.mf",
-    srcs: ["a.java"],
-}
-
-java_import_host{
-    name: "java-lib-dep-1",
-    jars: ["foo.jar"],
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_library", "java-binary-host-libs_lib", AttrNameToString{
-				"srcs": `["a.java"]`,
-				"deps": `[":java-lib-dep-1-neverlink"]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-			MakeBazelTarget("java_binary", "java-binary-host-libs", AttrNameToString{
-				"main_class": `"com.android.test.MainClass"`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-				"runtime_deps": `[":java-binary-host-libs_lib"]`,
-			}),
-		},
-	})
-}
-
-func TestJavaBinaryHostKotlinSrcs(t *testing.T) {
-	runJavaBinaryHostTestCase(t, Bp2buildTestCase{
-		Description: "java_binary_host with srcs, libs.",
-		Filesystem:  testFs,
-		Blueprint: `java_binary_host {
-    name: "java-binary-host",
-    manifest: "test.mf",
-    srcs: ["a.java", "b.kt"],
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("kt_jvm_library", "java-binary-host_lib", AttrNameToString{
-				"srcs": `[
-        "a.java",
-        "b.kt",
-    ]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-			MakeBazelTarget("java_binary", "java-binary-host", AttrNameToString{
-				"main_class":   `"com.android.test.MainClass"`,
-				"runtime_deps": `[":java-binary-host_lib"]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestJavaBinaryHostKotlinCommonSrcs(t *testing.T) {
-	runJavaBinaryHostTestCase(t, Bp2buildTestCase{
-		Description: "java_binary_host with common_srcs",
-		Filesystem:  testFs,
-		Blueprint: `java_binary_host {
-    name: "java-binary-host",
-    manifest: "test.mf",
-    srcs: ["a.java"],
-    common_srcs: ["b.kt"],
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("kt_jvm_library", "java-binary-host_lib", AttrNameToString{
-				"srcs":        `["a.java"]`,
-				"common_srcs": `["b.kt"]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-			MakeBazelTarget("java_binary", "java-binary-host", AttrNameToString{
-				"main_class":   `"com.android.test.MainClass"`,
-				"runtime_deps": `[":java-binary-host_lib"]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestJavaBinaryHostKotlinWithResourceDir(t *testing.T) {
-	runJavaBinaryHostTestCase(t, Bp2buildTestCase{
-		Description: "java_binary_host with srcs, libs, resource dir  .",
-		Filesystem: map[string]string{
-			"test.mf":        "Main-Class: com.android.test.MainClass",
-			"res/a.res":      "",
-			"res/dir1/b.res": "",
-		},
-		Blueprint: `java_binary_host {
-    name: "java-binary-host",
-    manifest: "test.mf",
-    srcs: ["a.java", "b.kt"],
-    java_resource_dirs: ["res"],
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("kt_jvm_library", "java-binary-host_lib", AttrNameToString{
-				"srcs": `[
-        "a.java",
-        "b.kt",
-    ]`,
-				"resources": `[
-        "res/a.res",
-        "res/dir1/b.res",
-    ]`,
-				"resource_strip_prefix": `"res"`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-			MakeBazelTarget("java_binary", "java-binary-host", AttrNameToString{
-				"main_class":   `"com.android.test.MainClass"`,
-				"runtime_deps": `[":java-binary-host_lib"]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestJavaBinaryHostKotlinWithResources(t *testing.T) {
-	runJavaBinaryHostTestCase(t, Bp2buildTestCase{
-		Description: "java_binary_host with srcs, libs, resources.",
-		Filesystem: map[string]string{
-			"adir/test.mf":   "Main-Class: com.android.test.MainClass",
-			"adir/res/a.res": "",
-			"adir/res/b.res": "",
-			"adir/Android.bp": `java_binary_host {
-    name: "java-binary-host",
-    manifest: "test.mf",
-    srcs: ["a.java", "b.kt"],
-    java_resources: ["res/a.res", "res/b.res"],
-    bazel_module: { bp2build_available: true },
-}
-`,
-		},
-		Dir:       "adir",
-		Blueprint: "",
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("kt_jvm_library", "java-binary-host_lib", AttrNameToString{
-				"srcs": `[
-        "a.java",
-        "b.kt",
-    ]`,
-				"resources": `[
-        "res/a.res",
-        "res/b.res",
-    ]`,
-				"resource_strip_prefix": `"adir"`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-			MakeBazelTarget("java_binary", "java-binary-host", AttrNameToString{
-				"main_class":   `"com.android.test.MainClass"`,
-				"runtime_deps": `[":java-binary-host_lib"]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestJavaBinaryHostKotlinCflags(t *testing.T) {
-	runJavaBinaryHostTestCase(t, Bp2buildTestCase{
-		Description: "java_binary_host with kotlincflags",
-		Filesystem:  testFs,
-		Blueprint: `java_binary_host {
-    name: "java-binary-host",
-    manifest: "test.mf",
-    srcs: ["a.kt"],
-    kotlincflags: ["-flag1", "-flag2"],
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("kt_jvm_library", "java-binary-host_lib", AttrNameToString{
-				"srcs": `["a.kt"]`,
-				"kotlincflags": `[
-        "-flag1",
-        "-flag2",
-    ]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-			MakeBazelTarget("java_binary", "java-binary-host", AttrNameToString{
-				"main_class":   `"com.android.test.MainClass"`,
-				"runtime_deps": `[":java-binary-host_lib"]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
diff --git a/bp2build/java_host_for_device_conversion_test.go b/bp2build/java_host_for_device_conversion_test.go
deleted file mode 100644
index 1fa7126..0000000
--- a/bp2build/java_host_for_device_conversion_test.go
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2023 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"testing"
-
-	"android/soong/android"
-	"android/soong/java"
-)
-
-func runJavaHostForDeviceTestCaseWithRegistrationCtxFunc(t *testing.T, tc Bp2buildTestCase, registrationCtxFunc func(ctx android.RegistrationContext)) {
-	t.Helper()
-	(&tc).ModuleTypeUnderTest = "java_host_for_device"
-	(&tc).ModuleTypeUnderTestFactory = java.HostForDeviceFactory
-	RunBp2BuildTestCase(t, registrationCtxFunc, tc)
-}
-
-func runJavaHostForDeviceTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	runJavaHostForDeviceTestCaseWithRegistrationCtxFunc(t, tc, func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("java_library", java.LibraryFactory)
-	})
-}
-
-func TestJavaHostForDevice(t *testing.T) {
-	runJavaHostForDeviceTestCase(t, Bp2buildTestCase{
-		Description: "java_host_for_device test",
-		Blueprint: `java_host_for_device {
-    name: "java-lib-1",
-    libs: ["java-lib-2"],
-    bazel_module: { bp2build_available: true },
-}
-
-java_library {
-    name: "java-lib-2",
-    srcs: ["b.java"],
-    bazel_module: { bp2build_available: true },
-    sdk_version: "current",
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_host_for_device", "java-lib-1", AttrNameToString{
-				"exports": `[":java-lib-2"]`,
-			}),
-			MakeNeverlinkDuplicateTargetWithAttrs("java_library", "java-lib-1", AttrNameToString{
-				"sdk_version": `"none"`,
-			}),
-			MakeBazelTarget("java_library", "java-lib-2", AttrNameToString{
-				"srcs":        `["b.java"]`,
-				"sdk_version": `"current"`,
-			}),
-			MakeNeverlinkDuplicateTarget("java_library", "java-lib-2"),
-		},
-	})
-}
diff --git a/bp2build/java_import_conversion_test.go b/bp2build/java_import_conversion_test.go
deleted file mode 100644
index bba2f50..0000000
--- a/bp2build/java_import_conversion_test.go
+++ /dev/null
@@ -1,157 +0,0 @@
-// Copyright 2022 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"android/soong/android"
-	"android/soong/java"
-
-	"testing"
-)
-
-func runJavaImportTestCaseWithRegistrationCtxFunc(t *testing.T, tc Bp2buildTestCase, registrationCtxFunc func(ctx android.RegistrationContext)) {
-	t.Helper()
-	(&tc).ModuleTypeUnderTest = "java_import"
-	(&tc).ModuleTypeUnderTestFactory = java.ImportFactory
-	RunBp2BuildTestCase(t, registrationCtxFunc, tc)
-}
-
-func runJavaImportTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	RunBp2BuildTestCase(t, registerJavaImportModuleTypes, tc)
-}
-
-func registerJavaImportModuleTypes(ctx android.RegistrationContext) {
-}
-
-func TestJavaImportMinimal(t *testing.T) {
-	runJavaImportTestCase(t, Bp2buildTestCase{
-		Description:                "Java import - simple example",
-		ModuleTypeUnderTest:        "java_import",
-		ModuleTypeUnderTestFactory: java.ImportFactory,
-		Filesystem: map[string]string{
-			"import.jar": "",
-		},
-		Blueprint: `
-java_import {
-        name: "example_import",
-        jars: ["import.jar"],
-        bazel_module: { bp2build_available: true },
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_import", "example_import", AttrNameToString{
-				"jars": `["import.jar"]`,
-			}),
-			MakeBazelTarget("java_library", "example_import-neverlink", AttrNameToString{
-				"exports":     `[":example_import"]`,
-				"neverlink":   `True`,
-				"sdk_version": `"none"`,
-			}),
-		}})
-}
-
-func TestJavaImportArchVariant(t *testing.T) {
-	runJavaImportTestCase(t, Bp2buildTestCase{
-		Description:                "Java import - simple example",
-		ModuleTypeUnderTest:        "java_import",
-		ModuleTypeUnderTestFactory: java.ImportFactory,
-		Filesystem: map[string]string{
-			"import.jar": "",
-		},
-		Blueprint: `
-java_import {
-        name: "example_import",
-		target: {
-			android: {
-				jars: ["android.jar"],
-			},
-			linux_glibc: {
-				jars: ["linux.jar"],
-			},
-		},
-        bazel_module: { bp2build_available: true },
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_import", "example_import", AttrNameToString{
-				"jars": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["android.jar"],
-        "//build/bazel_common_rules/platforms/os:linux_glibc": ["linux.jar"],
-        "//conditions:default": [],
-    })`,
-			}),
-			MakeBazelTarget("java_library", "example_import-neverlink", AttrNameToString{
-				"exports":     `[":example_import"]`,
-				"neverlink":   `True`,
-				"sdk_version": `"none"`,
-			}),
-		}})
-}
-
-func TestJavaImportHost(t *testing.T) {
-	runJavaImportTestCase(t, Bp2buildTestCase{
-		Description:                "Java import host- simple example",
-		ModuleTypeUnderTest:        "java_import_host",
-		ModuleTypeUnderTestFactory: java.ImportFactory,
-		Filesystem: map[string]string{
-			"import.jar": "",
-		},
-		Blueprint: `
-java_import_host {
-        name: "example_import",
-        jars: ["import.jar"],
-        bazel_module: { bp2build_available: true },
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_import", "example_import", AttrNameToString{
-				"jars": `["import.jar"]`,
-			}),
-			MakeBazelTarget("java_library", "example_import-neverlink", AttrNameToString{
-				"exports":     `[":example_import"]`,
-				"neverlink":   `True`,
-				"sdk_version": `"none"`,
-			}),
-		}})
-}
-
-func TestJavaImportSameNameAsJavaLibrary(t *testing.T) {
-	runJavaImportTestCaseWithRegistrationCtxFunc(t, Bp2buildTestCase{
-		Description: "java_import has the same name as other package java_library's",
-		Filesystem: map[string]string{
-			"foo/bar/Android.bp": simpleModule("java_library", "test_lib"),
-			"test.jar":           "",
-		},
-		Blueprint: `java_import {
-    name: "test_lib",
-    jars: ["test.jar"],
-    bazel_module: { bp2build_available: true },
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_import", "test_lib", AttrNameToString{
-				"jars": `["test.jar"]`,
-			}),
-			MakeBazelTarget("java_library", "test_lib-neverlink", AttrNameToString{
-				"exports":     `[":test_lib"]`,
-				"neverlink":   `True`,
-				"sdk_version": `"none"`,
-			}),
-		},
-	}, func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("java_library", java.LibraryFactory)
-	})
-}
diff --git a/bp2build/java_library_conversion_test.go b/bp2build/java_library_conversion_test.go
deleted file mode 100644
index 5099b49..0000000
--- a/bp2build/java_library_conversion_test.go
+++ /dev/null
@@ -1,1131 +0,0 @@
-// Copyright 2021 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"testing"
-
-	"android/soong/android"
-	"android/soong/java"
-)
-
-func runJavaLibraryTestCaseWithRegistrationCtxFunc(t *testing.T, tc Bp2buildTestCase, registrationCtxFunc func(ctx android.RegistrationContext)) {
-	t.Helper()
-	(&tc).ModuleTypeUnderTest = "java_library"
-	(&tc).ModuleTypeUnderTestFactory = java.LibraryFactory
-	RunBp2BuildTestCase(t, registrationCtxFunc, tc)
-}
-
-func runJavaLibraryTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	runJavaLibraryTestCaseWithRegistrationCtxFunc(t, tc, func(ctx android.RegistrationContext) {})
-}
-
-func TestJavaLibrary(t *testing.T) {
-	runJavaLibraryTestCase(t, Bp2buildTestCase{
-		Description: "java_library with srcs, exclude_srcs and libs",
-		Blueprint: `java_library {
-    name: "java-lib-1",
-    srcs: ["a.java", "b.java"],
-    exclude_srcs: ["b.java"],
-    libs: ["java-lib-2"],
-    sdk_version: "current",
-    bazel_module: { bp2build_available: true },
-}
-
-java_library {
-    name: "java-lib-2",
-    srcs: ["b.java"],
-    sdk_version: "current",
-    bazel_module: { bp2build_available: true },
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_library", "java-lib-1", AttrNameToString{
-				"srcs":        `["a.java"]`,
-				"deps":        `[":java-lib-2-neverlink"]`,
-				"sdk_version": `"current"`,
-			}),
-			MakeNeverlinkDuplicateTarget("java_library", "java-lib-1"),
-			MakeBazelTarget("java_library", "java-lib-2", AttrNameToString{
-				"srcs":        `["b.java"]`,
-				"sdk_version": `"current"`,
-			}),
-			MakeNeverlinkDuplicateTarget("java_library", "java-lib-2"),
-		},
-	})
-}
-
-func TestJavaLibraryConvertsStaticLibsToDepsAndExports(t *testing.T) {
-	runJavaLibraryTestCase(t, Bp2buildTestCase{
-		StubbedBuildDefinitions: []string{"java-lib-2", "java-lib-3"},
-		Blueprint: `java_library {
-    name: "java-lib-1",
-    srcs: ["a.java"],
-    libs: ["java-lib-2"],
-    static_libs: ["java-lib-3"],
-    sdk_version: "current",
-    bazel_module: { bp2build_available: true },
-}
-
-java_library {
-    name: "java-lib-2",
-    srcs: ["b.java"],
-    sdk_version: "current",
-}
-
-java_library {
-    name: "java-lib-3",
-    srcs: ["c.java"],
-    sdk_version: "current",
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_library", "java-lib-1", AttrNameToString{
-				"srcs": `["a.java"]`,
-				"deps": `[
-        ":java-lib-2-neverlink",
-        ":java-lib-3",
-    ]`,
-				"exports":     `[":java-lib-3"]`,
-				"sdk_version": `"current"`,
-			}),
-			MakeNeverlinkDuplicateTarget("java_library", "java-lib-1"),
-		},
-	})
-}
-
-func TestJavaLibraryConvertsStaticLibsToExportsIfNoSrcs(t *testing.T) {
-	runJavaLibraryTestCase(t, Bp2buildTestCase{
-		StubbedBuildDefinitions: []string{"java-lib-2"},
-		Blueprint: `java_library {
-    name: "java-lib-1",
-    static_libs: ["java-lib-2"],
-    sdk_version: "current",
-    bazel_module: { bp2build_available: true },
-}
-
-java_library {
-    name: "java-lib-2",
-    srcs: ["a.java"],
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_library", "java-lib-1", AttrNameToString{
-				"exports":     `[":java-lib-2"]`,
-				"sdk_version": `"current"`,
-			}),
-			MakeNeverlinkDuplicateTarget("java_library", "java-lib-1"),
-		},
-	})
-}
-
-func TestJavaLibraryFailsToConvertNoSdkVersion(t *testing.T) {
-	runJavaLibraryTestCase(t, Bp2buildTestCase{
-		Blueprint: `
-java_library {
-    name: "lib",
-    bazel_module: { bp2build_available: true },
-}
-`,
-		ExpectedBazelTargets: []string{}, // no targets expected because sdk_version is not set
-	})
-}
-
-func TestJavaLibraryPlugins(t *testing.T) {
-	runJavaLibraryTestCaseWithRegistrationCtxFunc(t, Bp2buildTestCase{
-		StubbedBuildDefinitions: []string{"java-plugin-1"},
-		Blueprint: `java_library {
-    name: "java-lib-1",
-    plugins: ["java-plugin-1"],
-    sdk_version: "current",
-    bazel_module: { bp2build_available: true },
-}
-
-java_plugin {
-    name: "java-plugin-1",
-    srcs: ["a.java"],
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_library", "java-lib-1", AttrNameToString{
-				"plugins":     `[":java-plugin-1"]`,
-				"sdk_version": `"current"`,
-			}),
-			MakeNeverlinkDuplicateTarget("java_library", "java-lib-1"),
-		},
-	}, func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("java_plugin", java.PluginFactory)
-	})
-}
-
-func TestJavaLibraryJavaVersion(t *testing.T) {
-	runJavaLibraryTestCase(t, Bp2buildTestCase{
-		Blueprint: `java_library {
-    name: "java-lib-1",
-    srcs: ["a.java"],
-    java_version: "11",
-    sdk_version: "current",
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_library", "java-lib-1", AttrNameToString{
-				"srcs":         `["a.java"]`,
-				"java_version": `"11"`,
-				"sdk_version":  `"current"`,
-			}),
-			MakeNeverlinkDuplicateTargetWithAttrs(
-				"java_library",
-				"java-lib-1",
-				AttrNameToString{
-					"java_version": `"11"`,
-					"sdk_version":  `"current"`,
-				}),
-		},
-	})
-}
-
-func TestJavaLibraryOpenjdk9(t *testing.T) {
-	runJavaLibraryTestCase(t, Bp2buildTestCase{
-		Blueprint: `java_library {
-			name: "java-lib-1",
-		srcs: ["a.java"],
-		exclude_srcs: ["b.java"],
-		javacflags: ["flag"],
-		target: {
-			android: {
-				srcs: ["android.java"],
-			},
-		},
-		openjdk9: {
-			srcs: ["b.java", "foo.java"],
-			javacflags: ["extraflag"],
-		},
-		sdk_version: "current",
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_library", "java-lib-1", AttrNameToString{
-				"srcs": `[
-        "a.java",
-        "foo.java",
-    ] + select({
-        "//build/bazel_common_rules/platforms/os:android": ["android.java"],
-        "//conditions:default": [],
-    })`,
-				"sdk_version": `"current"`,
-				"javacopts": `[
-        "flag",
-        "extraflag",
-    ]`,
-			}),
-			MakeNeverlinkDuplicateTarget("java_library", "java-lib-1"),
-		},
-	})
-
-}
-
-func TestJavaLibraryErrorproneEnabledManually(t *testing.T) {
-	runJavaLibraryTestCaseWithRegistrationCtxFunc(t, Bp2buildTestCase{
-		StubbedBuildDefinitions: []string{"plugin2"},
-		Blueprint: `java_library {
-    name: "java-lib-1",
-    srcs: ["a.java"],
-    javacflags: ["-Xsuper-fast"],
-    sdk_version: "current",
-    errorprone: {
-        enabled: true,
-        javacflags: ["-Xep:SpeedLimit:OFF"],
-        extra_check_modules: ["plugin2"],
-    },
-}
-java_plugin {
-    name: "plugin2",
-    srcs: ["a.java"],
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_library", "java-lib-1", AttrNameToString{
-				"javacopts": `[
-        "-Xsuper-fast",
-        "-Xep:SpeedLimit:OFF",
-    ]`,
-				"plugins":                 `[":plugin2"]`,
-				"srcs":                    `["a.java"]`,
-				"errorprone_force_enable": `True`,
-				"sdk_version":             `"current"`,
-			}),
-			MakeNeverlinkDuplicateTarget("java_library", "java-lib-1"),
-		},
-	}, func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("java_plugin", java.PluginFactory)
-	})
-}
-
-func TestJavaLibraryErrorproneJavacflagsErrorproneDisabledByDefault(t *testing.T) {
-	runJavaLibraryTestCase(t, Bp2buildTestCase{
-		Blueprint: `java_library {
-    name: "java-lib-1",
-    srcs: ["a.java"],
-    sdk_version: "current",
-    javacflags: ["-Xsuper-fast"],
-    errorprone: {
-        javacflags: ["-Xep:SpeedLimit:OFF"],
-    },
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_library", "java-lib-1", AttrNameToString{
-				"javacopts":   `["-Xsuper-fast"]`,
-				"srcs":        `["a.java"]`,
-				"sdk_version": `"current"`,
-			}),
-			MakeNeverlinkDuplicateTarget("java_library", "java-lib-1"),
-		},
-	})
-}
-
-func TestJavaLibraryErrorproneDisabledManually(t *testing.T) {
-	runJavaLibraryTestCase(t, Bp2buildTestCase{
-		Blueprint: `java_library {
-    name: "java-lib-1",
-    srcs: ["a.java"],
-    javacflags: ["-Xsuper-fast"],
-    sdk_version: "current",
-    errorprone: {
-    enabled: false,
-    },
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_library", "java-lib-1", AttrNameToString{
-				"javacopts": `[
-        "-Xsuper-fast",
-        "-XepDisableAllChecks",
-    ]`,
-				"srcs":        `["a.java"]`,
-				"sdk_version": `"current"`,
-			}),
-			MakeNeverlinkDuplicateTarget("java_library", "java-lib-1"),
-		},
-	})
-}
-
-func TestJavaLibraryLogTags(t *testing.T) {
-	runJavaLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "Java library - logtags creates separate dependency",
-		ModuleTypeUnderTest:        "java_library",
-		ModuleTypeUnderTestFactory: java.LibraryFactory,
-		Blueprint: `java_library {
-	name: "example_lib",
-	srcs: [
-		"a.java",
-		"b.java",
-		"a.logtag",
-		"b.logtag",
-	],
-	sdk_version: "current",
-	bazel_module: { bp2build_available: true },
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("event_log_tags", "example_lib_logtags", AttrNameToString{
-				"srcs": `[
-        "a.logtag",
-        "b.logtag",
-    ]`,
-			}),
-			MakeBazelTarget("java_library", "example_lib", AttrNameToString{
-				"srcs": `[
-        "a.java",
-        "b.java",
-        ":example_lib_logtags",
-    ]`,
-				"sdk_version": `"current"`,
-			}),
-			MakeNeverlinkDuplicateTarget("java_library", "example_lib"),
-		}})
-}
-
-func TestJavaLibraryResources(t *testing.T) {
-	runJavaLibraryTestCase(t, Bp2buildTestCase{
-		Dir: "adir",
-		Filesystem: map[string]string{
-			"adir/res/a.res":      "",
-			"adir/res/b.res":      "",
-			"adir/res/dir1/b.res": "",
-			"adir/Android.bp": `java_library {
-	name: "java-lib-1",
-	java_resources: ["res/a.res", "res/b.res"],
-	sdk_version: "current",
-	bazel_module: { bp2build_available: true },
-}`,
-		},
-		Blueprint: "",
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_library", "java-lib-1", AttrNameToString{
-				"resources": `[
-        "res/a.res",
-        "res/b.res",
-    ]`,
-				"resource_strip_prefix": `"adir"`,
-				"sdk_version":           `"current"`,
-			}),
-			MakeNeverlinkDuplicateTarget("java_library", "java-lib-1"),
-		},
-	})
-}
-
-func TestJavaLibraryResourceDirs(t *testing.T) {
-	runJavaLibraryTestCase(t, Bp2buildTestCase{
-		Filesystem: map[string]string{
-			"res/a.res":      "",
-			"res/b.res":      "",
-			"res/dir1/b.res": "",
-		},
-		Blueprint: `java_library {
-	name: "java-lib-1",
-	java_resource_dirs: ["res"],
-	sdk_version: "current",
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_library", "java-lib-1", AttrNameToString{
-				"resource_strip_prefix": `"res"`,
-				"resources": `[
-        "res/a.res",
-        "res/b.res",
-        "res/dir1/b.res",
-    ]`,
-				"sdk_version": `"current"`,
-			}),
-			MakeNeverlinkDuplicateTarget("java_library", "java-lib-1"),
-		},
-	})
-}
-
-func TestJavaLibraryResourcesExcludeDir(t *testing.T) {
-	runJavaLibraryTestCase(t, Bp2buildTestCase{
-		Filesystem: map[string]string{
-			"res/a.res":         "",
-			"res/exclude/b.res": "",
-		},
-		Blueprint: `java_library {
-	name: "java-lib-1",
-	java_resource_dirs: ["res"],
-	sdk_version: "current",
-	exclude_java_resource_dirs: ["res/exclude"],
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_library", "java-lib-1", AttrNameToString{
-				"resource_strip_prefix": `"res"`,
-				"resources":             `["res/a.res"]`,
-				"sdk_version":           `"current"`,
-			}),
-			MakeNeverlinkDuplicateTarget("java_library", "java-lib-1"),
-		},
-	})
-}
-
-func TestJavaLibraryResourcesExcludeFile(t *testing.T) {
-	runJavaLibraryTestCase(t, Bp2buildTestCase{
-		Filesystem: map[string]string{
-			"res/a.res":            "",
-			"res/dir1/b.res":       "",
-			"res/dir1/exclude.res": "",
-		},
-		Blueprint: `java_library {
-	name: "java-lib-1",
-	java_resource_dirs: ["res"],
-	sdk_version: "current",
-	exclude_java_resources: ["res/dir1/exclude.res"],
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_library", "java-lib-1", AttrNameToString{
-				"resource_strip_prefix": `"res"`,
-				"resources": `[
-        "res/a.res",
-        "res/dir1/b.res",
-    ]`,
-				"sdk_version": `"current"`,
-			}),
-			MakeNeverlinkDuplicateTarget("java_library", "java-lib-1"),
-		},
-	})
-}
-
-func TestJavaLibraryResourcesWithMultipleDirs(t *testing.T) {
-	runJavaLibraryTestCase(t, Bp2buildTestCase{
-		Filesystem: map[string]string{
-			"res/a.res":  "",
-			"res1/b.res": "",
-		},
-		Blueprint: `java_library {
-	name: "java-lib-1",
-	srcs: ["foo.java"],
-	java_resource_dirs: ["res", "res1"],
-	sdk_version: "current",
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_resources", "java-lib-1_resource_dir_res1", AttrNameToString{
-				"resource_strip_prefix": `"res1"`,
-				"resources":             `["res1/b.res"]`,
-			}),
-			MakeBazelTarget("java_library", "java-lib-1", AttrNameToString{
-				"deps":                  `["java-lib-1_resource_dir_res1"]`,
-				"resources":             `["res/a.res"]`,
-				"resource_strip_prefix": `"res"`,
-				"srcs":                  `["foo.java"]`,
-				"sdk_version":           `"current"`,
-			}),
-			MakeNeverlinkDuplicateTarget("java_library", "java-lib-1"),
-		},
-	})
-}
-
-func TestJavaLibraryJavaResourcesAndResourceDirs(t *testing.T) {
-	runJavaLibraryTestCase(t, Bp2buildTestCase{
-		Filesystem: map[string]string{
-			"resdir/a.res": "",
-		},
-		Blueprint: `java_library {
-		name: "java-lib-1",
-		java_resources: ["res1", "res2"],
-		java_resource_dirs: ["resdir"],
-		sdk_version: "current",
-		srcs: ["foo.java"],
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_resources", "java-lib-1_resource_dir_resdir", AttrNameToString{
-				"resource_strip_prefix": `"resdir"`,
-				"resources":             `["resdir/a.res"]`,
-			}),
-			MakeBazelTarget("java_library", "java-lib-1", AttrNameToString{
-				"deps":                  `["java-lib-1_resource_dir_resdir"]`,
-				"resource_strip_prefix": `"."`,
-				"resources": `[
-        "res1",
-        "res2",
-    ]`,
-				"srcs":        `["foo.java"]`,
-				"sdk_version": `"current"`,
-			}),
-			MakeNeverlinkDuplicateTarget("java_library", "java-lib-1"),
-		},
-	})
-}
-
-func TestJavaLibraryAidl(t *testing.T) {
-	runJavaLibraryTestCase(t, Bp2buildTestCase{
-		Description:                "Java library - aidl creates separate dependency",
-		ModuleTypeUnderTest:        "java_library",
-		ModuleTypeUnderTestFactory: java.LibraryFactory,
-		Blueprint: `java_library {
-	name: "example_lib",
-	srcs: [
-		"a.java",
-		"b.java",
-		"a.aidl",
-		"b.aidl",
-	],
-	bazel_module: { bp2build_available: true },
-	sdk_version: "current",
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("aidl_library", "example_lib_aidl_library", AttrNameToString{
-				"srcs": `[
-        "a.aidl",
-        "b.aidl",
-    ]`,
-			}),
-			MakeBazelTarget("java_aidl_library", "example_lib_java_aidl_library", AttrNameToString{
-				"deps": `[":example_lib_aidl_library"]`,
-			}),
-			MakeBazelTarget("java_library", "example_lib", AttrNameToString{
-				"deps":    `[":example_lib_java_aidl_library"]`,
-				"exports": `[":example_lib_java_aidl_library"]`,
-				"srcs": `[
-        "a.java",
-        "b.java",
-    ]`,
-				"sdk_version": `"current"`,
-			}),
-			MakeNeverlinkDuplicateTarget("java_library", "example_lib"),
-		}})
-}
-
-func TestJavaLibraryAidlSrcsNoFileGroup(t *testing.T) {
-	runJavaLibraryTestCaseWithRegistrationCtxFunc(t, Bp2buildTestCase{
-		Description:                "Java library - aidl filegroup is parsed",
-		ModuleTypeUnderTest:        "java_library",
-		ModuleTypeUnderTestFactory: java.LibraryFactory,
-		Blueprint: `
-java_library {
-	name: "example_lib",
-	srcs: [
-		"a.java",
-		"b.aidl",
-	],
-	sdk_version: "current",
-	bazel_module: { bp2build_available: true },
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("aidl_library", "example_lib_aidl_library", AttrNameToString{
-				"srcs": `["b.aidl"]`,
-			}),
-			MakeBazelTarget("java_aidl_library", "example_lib_java_aidl_library", AttrNameToString{
-				"deps": `[":example_lib_aidl_library"]`,
-			}),
-			MakeBazelTarget("java_library", "example_lib", AttrNameToString{
-				"deps":        `[":example_lib_java_aidl_library"]`,
-				"exports":     `[":example_lib_java_aidl_library"]`,
-				"srcs":        `["a.java"]`,
-				"sdk_version": `"current"`,
-			}),
-			MakeNeverlinkDuplicateTarget("java_library", "example_lib"),
-		},
-	}, func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("filegroup", android.FileGroupFactory)
-	})
-}
-
-func TestJavaLibraryAidlFilegroup(t *testing.T) {
-	runJavaLibraryTestCaseWithRegistrationCtxFunc(t, Bp2buildTestCase{
-		Description:                "Java library - aidl filegroup is parsed",
-		ModuleTypeUnderTest:        "java_library",
-		ModuleTypeUnderTestFactory: java.LibraryFactory,
-		Blueprint: `
-filegroup {
-	name: "random_other_files",
-	srcs: [
-		"a.java",
-		"b.java",
-	],
-}
-filegroup {
-	name: "aidl_files",
-	srcs: [
-		"a.aidl",
-		"b.aidl",
-	],
-}
-filegroup {
-	name: "aidls_files",
-	srcs: [
-		"a.aidl",
-		"b.aidl",
-	],
-}
-java_library {
-	name: "example_lib",
-	srcs: [
-		"a.java",
-		"b.java",
-		":aidl_files",
-		":aidls_files",
-		":random_other_files",
-	],
-	sdk_version: "current",
-	bazel_module: { bp2build_available: true },
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTargetNoRestrictions("aidl_library", "aidl_files", AttrNameToString{
-				"srcs": `[
-        "a.aidl",
-        "b.aidl",
-    ]`,
-				"tags": `["apex_available=//apex_available:anyapex"]`,
-			}),
-			MakeBazelTargetNoRestrictions("aidl_library", "aidls_files", AttrNameToString{
-				"srcs": `[
-        "a.aidl",
-        "b.aidl",
-    ]`,
-				"tags": `["apex_available=//apex_available:anyapex"]`,
-			}),
-			MakeBazelTarget("java_aidl_library", "example_lib_java_aidl_library", AttrNameToString{
-				"deps": `[
-        ":aidl_files",
-        ":aidls_files",
-    ]`,
-			}),
-			MakeBazelTarget("java_library", "example_lib", AttrNameToString{
-				"deps":    `[":example_lib_java_aidl_library"]`,
-				"exports": `[":example_lib_java_aidl_library"]`,
-				"srcs": `[
-        "a.java",
-        "b.java",
-        ":random_other_files",
-    ]`,
-				"sdk_version": `"current"`,
-			}),
-			MakeNeverlinkDuplicateTarget("java_library", "example_lib"),
-			MakeBazelTargetNoRestrictions("filegroup", "random_other_files", AttrNameToString{
-				"srcs": `[
-        "a.java",
-        "b.java",
-    ]`,
-			}),
-		},
-	}, func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("filegroup", android.FileGroupFactory)
-	})
-}
-
-func TestJavaLibraryAidlNonAdjacentAidlFilegroup(t *testing.T) {
-	runJavaLibraryTestCaseWithRegistrationCtxFunc(t, Bp2buildTestCase{
-		Description:                "java_library with non adjacent aidl filegroup",
-		ModuleTypeUnderTest:        "java_library",
-		ModuleTypeUnderTestFactory: java.LibraryFactory,
-		StubbedBuildDefinitions:    []string{"//path/to/A:A_aidl"},
-		Filesystem: map[string]string{
-			"path/to/A/Android.bp": `
-filegroup {
-  name: "A_aidl",
-  srcs: ["aidl/A.aidl"],
-  path: "aidl",
-}`,
-		},
-		Blueprint: `
-java_library {
-  name: "foo",
-  srcs: [
-    ":A_aidl",
-  ],
-  sdk_version: "current",
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_aidl_library", "foo_java_aidl_library", AttrNameToString{
-				"deps": `["//path/to/A:A_aidl"]`,
-			}),
-			MakeBazelTarget("java_library", "foo", AttrNameToString{
-				"exports":     `[":foo_java_aidl_library"]`,
-				"sdk_version": `"current"`,
-			}),
-			MakeNeverlinkDuplicateTarget("java_library", "foo"),
-		},
-	}, func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("filegroup", android.FileGroupFactory)
-	})
-}
-
-func TestConvertArmNeonVariant(t *testing.T) {
-	t.Helper()
-	RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {}, Bp2buildTestCase{
-		Description:                "Android Library - simple arch feature",
-		ModuleTypeUnderTest:        "android_library",
-		ModuleTypeUnderTestFactory: java.AndroidLibraryFactory,
-		Blueprint: simpleModule("android_library", "static_lib_dep") + `
-android_library {
-  name: "TestLib",
-  manifest: "manifest/AndroidManifest.xml",
-  srcs: ["lib.java"],
-  sdk_version: "current",
-  arch: {
-    arm: {
-      neon: {
-        srcs: ["arm_neon.java"],
-      },
-    },
-  },
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget(
-				"android_library",
-				"TestLib",
-				AttrNameToString{
-					"srcs": `["lib.java"] + select({
-        "//build/bazel/platforms/arch/variants:arm-neon": ["arm_neon.java"],
-        "//conditions:default": [],
-    })`,
-					"manifest":       `"manifest/AndroidManifest.xml"`,
-					"resource_files": `[]`,
-					"sdk_version":    `"current"`, // use as default
-				}),
-			MakeNeverlinkDuplicateTarget("android_library", "TestLib"),
-		}})
-}
-
-func TestConvertMultipleArchFeatures(t *testing.T) {
-	t.Helper()
-	RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {}, Bp2buildTestCase{
-		Description:                "Android Library - multiple arch features",
-		ModuleTypeUnderTest:        "android_library",
-		ModuleTypeUnderTestFactory: java.AndroidLibraryFactory,
-		Blueprint: simpleModule("android_library", "static_lib_dep") + `
-android_library {
-  name: "TestLib",
-  manifest: "manifest/AndroidManifest.xml",
-  srcs: ["lib.java"],
-  sdk_version: "current",
-  arch: {
-    x86: {
-      ssse3: {
-        srcs: ["ssse3.java"],
-      },
-      sse4_1: {
-        srcs: ["sse4_1.java"],
-      },
-    },
-  },
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget(
-				"android_library",
-				"TestLib",
-				AttrNameToString{
-					"srcs": `["lib.java"] + select({
-        "//build/bazel/platforms/arch/variants:x86-sse4_1": ["sse4_1.java"],
-        "//build/bazel/platforms/arch/variants:x86-sse4_1-ssse3": [
-            "sse4_1.java",
-            "ssse3.java",
-        ],
-        "//build/bazel/platforms/arch/variants:x86-ssse3": ["ssse3.java"],
-        "//conditions:default": [],
-    })`,
-					"manifest":       `"manifest/AndroidManifest.xml"`,
-					"resource_files": `[]`,
-					"sdk_version":    `"current"`,
-				}),
-			MakeNeverlinkDuplicateTarget("android_library", "TestLib"),
-		}})
-}
-
-func TestConvertExcludeSrcsArchFeature(t *testing.T) {
-	t.Helper()
-	RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {}, Bp2buildTestCase{
-		Description:                "Android Library - exclude_srcs with arch feature",
-		ModuleTypeUnderTest:        "android_library",
-		ModuleTypeUnderTestFactory: java.AndroidLibraryFactory,
-		Blueprint: simpleModule("android_library", "static_lib_dep") + `
-android_library {
-  name: "TestLib",
-  manifest: "manifest/AndroidManifest.xml",
-  srcs: ["lib.java"],
-  arch: {
-    arm: {
-      srcs: ["arm_non_neon.java"],
-      neon: {
-        exclude_srcs: ["arm_non_neon.java"],
-      },
-    },
-  },
-  sdk_version: "current",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget(
-				"android_library",
-				"TestLib",
-				AttrNameToString{
-					"srcs": `["lib.java"] + select({
-        "//build/bazel/platforms/arch/variants:arm-neon": [],
-        "//build/bazel_common_rules/platforms/arch:arm": ["arm_non_neon.java"],
-        "//conditions:default": [],
-    })`,
-					"manifest":       `"manifest/AndroidManifest.xml"`,
-					"resource_files": `[]`,
-					"sdk_version":    `"current"`, // use as default
-				}),
-			MakeNeverlinkDuplicateTarget("android_library", "TestLib"),
-		}})
-}
-
-func TestJavaLibraryKotlinSrcs(t *testing.T) {
-	runJavaLibraryTestCase(t, Bp2buildTestCase{
-		Description: "java_library with kotlin srcs",
-		Blueprint: `java_library {
-    name: "java-lib-1",
-    srcs: ["a.java", "b.java", "c.kt"],
-    bazel_module: { bp2build_available: true },
-    sdk_version: "current",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("kt_jvm_library", "java-lib-1", AttrNameToString{
-				"srcs": `[
-        "a.java",
-        "b.java",
-        "c.kt",
-    ]`,
-				"sdk_version": `"current"`,
-			}),
-			MakeNeverlinkDuplicateTarget("kt_jvm_library", "java-lib-1"),
-		},
-	})
-}
-
-func TestJavaLibraryKotlincflags(t *testing.T) {
-	runJavaLibraryTestCase(t, Bp2buildTestCase{
-		Description: "java_library with kotlincfalgs",
-		Blueprint: `java_library {
-    name: "java-lib-1",
-    srcs: [ "a.kt"],
-    kotlincflags: ["-flag1", "-flag2"],
-    bazel_module: { bp2build_available: true },
-    sdk_version: "current",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("kt_jvm_library", "java-lib-1", AttrNameToString{
-				"srcs": `["a.kt"]`,
-				"kotlincflags": `[
-        "-flag1",
-        "-flag2",
-    ]`,
-				"sdk_version": `"current"`,
-			}),
-			MakeNeverlinkDuplicateTarget("kt_jvm_library", "java-lib-1"),
-		},
-	})
-}
-
-func TestJavaLibraryKotlinCommonSrcs(t *testing.T) {
-	runJavaLibraryTestCase(t, Bp2buildTestCase{
-		Description: "java_library with kotlin common_srcs",
-		Blueprint: `java_library {
-    name: "java-lib-1",
-    srcs: ["a.java", "b.java"],
-    common_srcs: ["c.kt"],
-    bazel_module: { bp2build_available: true },
-    sdk_version: "current",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("kt_jvm_library", "java-lib-1", AttrNameToString{
-				"srcs": `[
-        "a.java",
-        "b.java",
-    ]`,
-				"common_srcs": `["c.kt"]`,
-				"sdk_version": `"current"`,
-			}),
-			MakeNeverlinkDuplicateTarget("kt_jvm_library", "java-lib-1"),
-		},
-	})
-}
-
-func TestJavaLibraryArchVariantDeps(t *testing.T) {
-	runJavaLibraryTestCase(t, Bp2buildTestCase{
-		Description:             "java_library with arch variant libs",
-		StubbedBuildDefinitions: []string{"java-lib-2", "java-lib-3", "java-lib-4"},
-		Blueprint: `java_library {
-    name: "java-lib-1",
-    srcs: ["a.java"],
-    libs: ["java-lib-2"],
-    sdk_version: "current",
-    target: {
-        android: {
-            libs: ["java-lib-3"],
-            static_libs: ["java-lib-4"],
-        },
-    },
-    bazel_module: { bp2build_available: true },
-}
-
-  java_library{
-    name: "java-lib-2",
-}
-
-  java_library{
-    name: "java-lib-3",
-}
-
-  java_library{
-    name: "java-lib-4",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_library", "java-lib-1", AttrNameToString{
-				"srcs": `["a.java"]`,
-				"exports": `select({
-        "//build/bazel_common_rules/platforms/os:android": [":java-lib-4"],
-        "//conditions:default": [],
-    })`,
-				"deps": `[":java-lib-2-neverlink"] + select({
-        "//build/bazel_common_rules/platforms/os:android": [
-            ":java-lib-3-neverlink",
-            ":java-lib-4",
-        ],
-        "//conditions:default": [],
-    })`,
-				"sdk_version": `"current"`,
-			}),
-			MakeNeverlinkDuplicateTarget("java_library", "java-lib-1"),
-		},
-	})
-}
-
-func TestJavaLibraryArchVariantSrcsWithExcludes(t *testing.T) {
-	runJavaLibraryTestCase(t, Bp2buildTestCase{
-		Description: "java_library with arch variant libs",
-		Blueprint: `java_library {
-    name: "java-lib-1",
-    srcs: ["a.java", "b.java"],
-    sdk_version: "current",
-    target: {
-        android: {
-            exclude_srcs: ["a.java"],
-        },
-    },
-    bazel_module: { bp2build_available: true },
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_library", "java-lib-1", AttrNameToString{
-				"srcs": `["b.java"] + select({
-        "//build/bazel_common_rules/platforms/os:android": [],
-        "//conditions:default": ["a.java"],
-    })`,
-				"sdk_version": `"current"`,
-			}),
-			MakeNeverlinkDuplicateTarget("java_library", "java-lib-1"),
-		},
-	})
-}
-
-func TestJavaLibraryJavaResourcesSingleFilegroup(t *testing.T) {
-	runJavaLibraryTestCaseWithRegistrationCtxFunc(t, Bp2buildTestCase{
-		Filesystem: map[string]string{
-			"res/a.res":      "",
-			"res/b.res":      "",
-			"res/dir1/b.res": "",
-		},
-		Description: "java_library",
-		Blueprint: `java_library {
-    name: "java-lib-1",
-    srcs: ["a.java"],
-    sdk_version: "current",
-    java_resources: [":filegroup1"],
-    bazel_module: { bp2build_available: true },
-}
-
-filegroup {
-    name: "filegroup1",
-    path: "foo",
-    srcs: ["foo/a", "foo/b"],
-}
-
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_library", "java-lib-1", AttrNameToString{
-				"srcs":                  `["a.java"]`,
-				"resources":             `[":filegroup1"]`,
-				"resource_strip_prefix": `"foo"`,
-				"sdk_version":           `"current"`,
-			}),
-			MakeNeverlinkDuplicateTarget("java_library", "java-lib-1"),
-			MakeBazelTargetNoRestrictions("filegroup", "filegroup1", AttrNameToString{
-				"srcs": `[
-        "foo/a",
-        "foo/b",
-    ]`}),
-		},
-	}, func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("filegroup", android.FileGroupFactory)
-	})
-}
-
-func TestJavaLibraryJavaResourcesMultipleFilegroup(t *testing.T) {
-	runJavaLibraryTestCaseWithRegistrationCtxFunc(t, Bp2buildTestCase{
-		Filesystem: map[string]string{
-			"a.res": "",
-		},
-		Description: "with java_resources that has multiple filegroups",
-		Blueprint: `java_library {
-    name: "java-lib-1",
-    srcs: ["a.java"],
-    java_resources: ["a.res", ":filegroup1", ":filegroup2"],
-    sdk_version: "current",
-    bazel_module: { bp2build_available: true },
-}
-
-filegroup {
-    name: "filegroup1",
-    path: "foo",
-    srcs: ["foo/a"],
-}
-
-filegroup {
-    name: "filegroup2",
-    path: "bar",
-    srcs: ["bar/a"],
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_resources", "java-lib-1_filegroup_resources_filegroup1", AttrNameToString{
-				"resource_strip_prefix": `"foo"`,
-				"resources":             `[":filegroup1"]`,
-			}),
-			MakeBazelTarget("java_resources", "java-lib-1_filegroup_resources_filegroup2", AttrNameToString{
-				"resource_strip_prefix": `"bar"`,
-				"resources":             `[":filegroup2"]`,
-			}),
-			MakeBazelTarget("java_library", "java-lib-1", AttrNameToString{
-				"srcs":                  `["a.java"]`,
-				"resources":             `["a.res"]`,
-				"resource_strip_prefix": `"."`,
-				"deps": `[
-        "java-lib-1_filegroup_resources_filegroup1",
-        "java-lib-1_filegroup_resources_filegroup2",
-    ]`,
-				"sdk_version": `"current"`,
-			}),
-			MakeNeverlinkDuplicateTarget("java_library", "java-lib-1"),
-			MakeBazelTargetNoRestrictions("filegroup", "filegroup1", AttrNameToString{
-				"srcs": `["foo/a"]`}),
-			MakeBazelTargetNoRestrictions("filegroup", "filegroup2", AttrNameToString{
-				"srcs": `["bar/a"]`}),
-		},
-	}, func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("filegroup", android.FileGroupFactory)
-	})
-}
-
-func TestJavaLibrarySameNameAsPrebuilt(t *testing.T) {
-	runJavaLibraryTestCaseWithRegistrationCtxFunc(t, Bp2buildTestCase{
-		Description: "java_library and prebuilt module have the same name",
-		Filesystem: map[string]string{
-			"foo/bar/Android.bp": simpleModule("java_import", "test_lib"),
-		},
-		Blueprint: `java_library {
-    name: "test_lib",
-    srcs: ["a.java"],
-    sdk_version: "current",
-    bazel_module: { bp2build_available: true },
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_library", "test_lib", AttrNameToString{
-				"srcs":        `["a.java"]`,
-				"sdk_version": `"current"`,
-			}),
-			MakeNeverlinkDuplicateTarget("java_library", "test_lib"),
-		},
-	}, func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("java_import", java.ImportFactory)
-	})
-}
-
-func TestJavaLibrarySharding(t *testing.T) {
-	runJavaLibraryTestCase(t, Bp2buildTestCase{
-		Description: "java library with sharded compilation",
-		Blueprint: `java_library {
-			name: "lib1",
-			srcs: ["a.java"],
-			javac_shard_size: 3,
-			sdk_version: "current",
-		}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_library", "lib1", AttrNameToString{
-				"srcs":             `["a.java"]`,
-				"sdk_version":      `"current"`,
-				"javac_shard_size": "3",
-			}),
-			MakeNeverlinkDuplicateTarget("java_library", "lib1"),
-		},
-	})
-}
diff --git a/bp2build/java_library_host_conversion_test.go b/bp2build/java_library_host_conversion_test.go
deleted file mode 100644
index d0fdec6..0000000
--- a/bp2build/java_library_host_conversion_test.go
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright 2021 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"testing"
-
-	"android/soong/android"
-	"android/soong/java"
-)
-
-func runJavaLibraryHostTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	(&tc).ModuleTypeUnderTest = "java_library_host"
-	(&tc).ModuleTypeUnderTestFactory = java.LibraryHostFactory
-	RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {}, tc)
-}
-
-func TestJavaLibraryHost(t *testing.T) {
-	runJavaLibraryHostTestCase(t, Bp2buildTestCase{
-		Description: "java_library_host with srcs, exclude_srcs and libs",
-		Blueprint: `java_library_host {
-    name: "java-lib-host-1",
-    srcs: ["a.java", "b.java"],
-    exclude_srcs: ["b.java"],
-    libs: ["java-lib-host-2"],
-    bazel_module: { bp2build_available: true },
-}
-
-java_library_host {
-    name: "java-lib-host-2",
-    srcs: ["c.java"],
-    bazel_module: { bp2build_available: true },
-    java_version: "9",
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_library", "java-lib-host-1", AttrNameToString{
-				"srcs": `["a.java"]`,
-				"deps": `[":java-lib-host-2-neverlink"]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-			MakeBazelTarget("java_library", "java-lib-host-1-neverlink", AttrNameToString{
-				"exports":   `[":java-lib-host-1"]`,
-				"neverlink": `True`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-			MakeBazelTarget("java_library", "java-lib-host-2", AttrNameToString{
-				"java_version": `"9"`,
-				"srcs":         `["c.java"]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-			MakeBazelTarget("java_library", "java-lib-host-2-neverlink", AttrNameToString{
-				"exports":   `[":java-lib-host-2"]`,
-				"neverlink": `True`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-				"java_version": `"9"`,
-			}),
-		},
-	})
-}
diff --git a/bp2build/java_plugin_conversion_test.go b/bp2build/java_plugin_conversion_test.go
deleted file mode 100644
index e63cc55..0000000
--- a/bp2build/java_plugin_conversion_test.go
+++ /dev/null
@@ -1,108 +0,0 @@
-// Copyright 2021 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"testing"
-
-	"android/soong/android"
-	"android/soong/java"
-)
-
-func runJavaPluginTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	(&tc).ModuleTypeUnderTest = "java_plugin"
-	(&tc).ModuleTypeUnderTestFactory = java.PluginFactory
-	RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("java_library", java.LibraryFactory)
-	}, tc)
-}
-
-func TestJavaPlugin(t *testing.T) {
-	runJavaPluginTestCase(t, Bp2buildTestCase{
-		Description:             "java_plugin with srcs, libs, static_libs",
-		StubbedBuildDefinitions: []string{"java-lib-1", "java-lib-2"},
-		Blueprint: `java_plugin {
-    name: "java-plug-1",
-    srcs: ["a.java", "b.java"],
-    libs: ["java-lib-1"],
-    static_libs: ["java-lib-2"],
-    bazel_module: { bp2build_available: true },
-    java_version: "7",
-}
-
-java_library {
-    name: "java-lib-1",
-    srcs: ["b.java"],
-}
-
-java_library {
-    name: "java-lib-2",
-    srcs: ["c.java"],
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_plugin", "java-plug-1", AttrNameToString{
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-				"deps": `[
-        ":java-lib-1-neverlink",
-        ":java-lib-2",
-    ]`,
-				"srcs": `[
-        "a.java",
-        "b.java",
-    ]`,
-				"java_version": `"7"`,
-			}),
-		},
-	})
-}
-
-func TestJavaPluginNoSrcs(t *testing.T) {
-	runJavaPluginTestCase(t, Bp2buildTestCase{
-		Description:             "java_plugin without srcs converts (static) libs to deps",
-		StubbedBuildDefinitions: []string{"java-lib-1", "java-lib-2"},
-		Blueprint: `java_plugin {
-    name: "java-plug-1",
-    libs: ["java-lib-1"],
-    static_libs: ["java-lib-2"],
-    bazel_module: { bp2build_available: true },
-}
-
-java_library {
-    name: "java-lib-1",
-    srcs: ["b.java"],
-}
-
-java_library {
-    name: "java-lib-2",
-    srcs: ["c.java"],
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_plugin", "java-plug-1", AttrNameToString{
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-				"deps": `[
-        ":java-lib-1-neverlink",
-        ":java-lib-2",
-    ]`,
-			}),
-		},
-	})
-}
diff --git a/bp2build/java_proto_conversion_test.go b/bp2build/java_proto_conversion_test.go
deleted file mode 100644
index cd89978..0000000
--- a/bp2build/java_proto_conversion_test.go
+++ /dev/null
@@ -1,238 +0,0 @@
-// Copyright 2021 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"fmt"
-	"testing"
-
-	"android/soong/android"
-	"android/soong/java"
-)
-
-func runJavaProtoTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	(&tc).ModuleTypeUnderTest = "java_library_static"
-	(&tc).ModuleTypeUnderTestFactory = java.LibraryFactory
-	RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {}, tc)
-}
-
-func TestJavaProto(t *testing.T) {
-	testCases := []struct {
-		protoType                string
-		javaLibraryType          string
-		javaLibraryNameExtension string
-	}{
-		{
-			protoType:                "nano",
-			javaLibraryType:          "java_nano_proto_library",
-			javaLibraryNameExtension: "java_proto_nano",
-		},
-		{
-			protoType:                "micro",
-			javaLibraryType:          "java_micro_proto_library",
-			javaLibraryNameExtension: "java_proto_micro",
-		},
-		{
-			protoType:                "lite",
-			javaLibraryType:          "java_lite_proto_library",
-			javaLibraryNameExtension: "java_proto_lite",
-		},
-		{
-			protoType:                "stream",
-			javaLibraryType:          "java_stream_proto_library",
-			javaLibraryNameExtension: "java_proto_stream",
-		},
-		{
-			protoType:                "full",
-			javaLibraryType:          "java_proto_library",
-			javaLibraryNameExtension: "java_proto",
-		},
-	}
-
-	bp := `java_library_static {
-    name: "java-protos",
-    proto: {
-        type: "%s",
-    },
-    srcs: ["a.proto"],
-    sdk_version: "current",
-}`
-
-	protoLibrary := MakeBazelTarget("proto_library", "java-protos_proto", AttrNameToString{
-		"srcs": `["a.proto"]`,
-	})
-
-	for _, tc := range testCases {
-		javaLibraryName := fmt.Sprintf("java-protos_%s", tc.javaLibraryNameExtension)
-
-		runJavaProtoTestCase(t, Bp2buildTestCase{
-			Description: fmt.Sprintf("java_proto %s", tc.protoType),
-			Blueprint:   fmt.Sprintf(bp, tc.protoType),
-			ExpectedBazelTargets: []string{
-				protoLibrary,
-				MakeBazelTarget(
-					tc.javaLibraryType,
-					javaLibraryName,
-					AttrNameToString{
-						"deps":        `[":java-protos_proto"]`,
-						"sdk_version": `"current"`,
-					}),
-				MakeBazelTarget("java_library", "java-protos", AttrNameToString{
-					"exports":     fmt.Sprintf(`[":%s"]`, javaLibraryName),
-					"sdk_version": `"current"`,
-				}),
-				MakeNeverlinkDuplicateTarget("java_library", "java-protos"),
-			},
-		})
-	}
-}
-
-func TestJavaProtoDefault(t *testing.T) {
-	runJavaProtoTestCase(t, Bp2buildTestCase{
-		Description: "java_library proto default",
-		Blueprint: `java_library_static {
-    name: "java-protos",
-    srcs: ["a.proto"],
-    java_version: "7",
-    sdk_version: "current",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("proto_library", "java-protos_proto", AttrNameToString{
-				"srcs": `["a.proto"]`,
-			}),
-			MakeBazelTarget(
-				"java_lite_proto_library",
-				"java-protos_java_proto_lite",
-				AttrNameToString{
-					"deps":         `[":java-protos_proto"]`,
-					"java_version": `"7"`,
-					"sdk_version":  `"current"`,
-				}),
-			MakeBazelTarget("java_library", "java-protos", AttrNameToString{
-				"exports":      `[":java-protos_java_proto_lite"]`,
-				"java_version": `"7"`,
-				"sdk_version":  `"current"`,
-			}),
-			MakeNeverlinkDuplicateTargetWithAttrs(
-				"java_library",
-				"java-protos",
-				AttrNameToString{
-					"java_version": `"7"`,
-					"sdk_version":  `"current"`,
-				}),
-		},
-	})
-}
-
-func TestJavaLibsAndOnlyProtoSrcs(t *testing.T) {
-	runJavaProtoTestCase(t, Bp2buildTestCase{
-		Description:             "java_library that has only proto srcs",
-		StubbedBuildDefinitions: []string{"java-lib-1", "java-lib-2"},
-		Blueprint: `java_library_static {
-    name: "java-protos",
-    srcs: ["a.proto"],
-    libs: ["java-lib-1"],
-    static_libs: ["java-lib-2"],
-    java_version: "7",
-    sdk_version: "current",
-}
-
-java_library_static {
-    name: "java-lib-1",
-}
-
-java_library_static {
-    name: "java-lib-2",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("proto_library", "java-protos_proto", AttrNameToString{
-				"srcs": `["a.proto"]`,
-			}),
-			MakeBazelTarget(
-				"java_lite_proto_library",
-				"java-protos_java_proto_lite",
-				AttrNameToString{
-					"deps": `[":java-protos_proto"]`,
-					"additional_proto_deps": `[
-        ":java-lib-1-neverlink",
-        ":java-lib-2",
-    ]`,
-					"java_version": `"7"`,
-					"sdk_version":  `"current"`,
-				}),
-			MakeBazelTarget("java_library", "java-protos", AttrNameToString{
-				"exports": `[
-        ":java-lib-2",
-        ":java-protos_java_proto_lite",
-    ]`,
-				"java_version": `"7"`,
-				"sdk_version":  `"current"`,
-			}),
-			MakeNeverlinkDuplicateTargetWithAttrs(
-				"java_library",
-				"java-protos",
-				AttrNameToString{
-					"java_version": `"7"`,
-					"sdk_version":  `"current"`,
-				}),
-		},
-	})
-}
-
-func TestJavaProtoPlugin(t *testing.T) {
-	runJavaProtoTestCase(t, Bp2buildTestCase{
-		Description:             "java_library proto plugin",
-		StubbedBuildDefinitions: []string{"protoc-gen-test-plugin"},
-		Blueprint: `java_library_static {
-    name: "java-protos",
-    srcs: ["a.proto"],
-    proto: {
-        plugin: "test-plugin",
-    },
-    sdk_version: "current",
-}
-
-java_library_static {
-    name: "protoc-gen-test-plugin",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("proto_library", "java-protos_proto", AttrNameToString{
-				"srcs": `["a.proto"]`,
-			}),
-			MakeBazelTarget(
-				"java_lite_proto_library",
-				"java-protos_java_proto_lite",
-				AttrNameToString{
-					"deps":        `[":java-protos_proto"]`,
-					"plugin":      `":protoc-gen-test-plugin"`,
-					"sdk_version": `"current"`,
-				}),
-			MakeBazelTarget("java_library", "java-protos", AttrNameToString{
-				"exports":     `[":java-protos_java_proto_lite"]`,
-				"sdk_version": `"current"`,
-			}),
-			MakeNeverlinkDuplicateTargetWithAttrs(
-				"java_library",
-				"java-protos",
-				AttrNameToString{
-					"sdk_version": `"current"`,
-				}),
-		},
-	})
-}
diff --git a/bp2build/java_sdk_library_conversion_test.go b/bp2build/java_sdk_library_conversion_test.go
deleted file mode 100644
index 9ce7446..0000000
--- a/bp2build/java_sdk_library_conversion_test.go
+++ /dev/null
@@ -1,148 +0,0 @@
-// Copyright 2023 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"testing"
-
-	"android/soong/android"
-	"android/soong/java"
-)
-
-func runJavaSdkLibraryTestCaseWithRegistrationCtxFunc(t *testing.T, tc Bp2buildTestCase, registrationCtxFunc func(ctx android.RegistrationContext)) {
-	t.Helper()
-	(&tc).ModuleTypeUnderTest = "java_sdk_library"
-	(&tc).ModuleTypeUnderTestFactory = java.SdkLibraryFactory
-	RunBp2BuildTestCase(t, registrationCtxFunc, tc)
-}
-
-func runJavaSdkLibraryTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	runJavaSdkLibraryTestCaseWithRegistrationCtxFunc(t, tc, func(ctx android.RegistrationContext) {})
-}
-
-func TestJavaSdkLibraryApiSurfaceGeneral(t *testing.T) {
-	runJavaSdkLibraryTestCase(t, Bp2buildTestCase{
-		Description: "limited java_sdk_library for api surfaces, general conversion",
-		Filesystem: map[string]string{
-			"build/soong/scripts/gen-java-current-api-files.sh": "",
-			"api/current.txt":               "",
-			"api/system-current.txt":        "",
-			"api/test-current.txt":          "",
-			"api/module-lib-current.txt":    "",
-			"api/system-server-current.txt": "",
-			"api/removed.txt":               "",
-			"api/system-removed.txt":        "",
-			"api/test-removed.txt":          "",
-			"api/module-lib-removed.txt":    "",
-			"api/system-server-removed.txt": "",
-		},
-		Blueprint: `java_sdk_library {
-    name: "java-sdk-lib",
-    srcs: ["a.java"],
-    public: {enabled: true},
-    system: {enabled: true},
-    test: {enabled: true},
-    module_lib: {enabled: true},
-    system_server: {enabled: true},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_sdk_library", "java-sdk-lib", AttrNameToString{
-				"public":        `"api/current.txt"`,
-				"system":        `"api/system-current.txt"`,
-				"test":          `"api/test-current.txt"`,
-				"module_lib":    `"api/module-lib-current.txt"`,
-				"system_server": `"api/system-server-current.txt"`,
-			}),
-		},
-	})
-}
-
-func TestJavaSdkLibraryApiSurfacePublicDefault(t *testing.T) {
-	runJavaSdkLibraryTestCase(t, Bp2buildTestCase{
-		Description: "limited java_sdk_library for api surfaces, public prop uses default value",
-		Filesystem: map[string]string{
-			"build/soong/scripts/gen-java-current-api-files.sh": "",
-			"api/current.txt":               "",
-			"api/system-current.txt":        "",
-			"api/test-current.txt":          "",
-			"api/module-lib-current.txt":    "",
-			"api/system-server-current.txt": "",
-			"api/removed.txt":               "",
-			"api/system-removed.txt":        "",
-			"api/test-removed.txt":          "",
-			"api/module-lib-removed.txt":    "",
-			"api/system-server-removed.txt": "",
-		},
-		Blueprint: `java_sdk_library {
-    name: "java-sdk-lib",
-    srcs: ["a.java"],
-    system: {enabled: false},
-    test: {enabled: false},
-    module_lib: {enabled: false},
-    system_server: {enabled: false},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_sdk_library", "java-sdk-lib", AttrNameToString{
-				"public": `"api/current.txt"`,
-			}),
-		},
-	})
-}
-
-func TestJavaSdkLibraryApiSurfacePublicNotEnabled(t *testing.T) {
-	runJavaSdkLibraryTestCase(t, Bp2buildTestCase{
-		Description: "limited java_sdk_library for api surfaces, public enable is false",
-		Filesystem: map[string]string{
-			"build/soong/scripts/gen-java-current-api-files.sh": "",
-			"api/current.txt": "",
-			"api/removed.txt": "",
-		},
-		Blueprint: `java_sdk_library {
-   name: "java-sdk-lib",
-   srcs: ["a.java"],
-   public: {enabled: false},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_sdk_library", "java-sdk-lib", AttrNameToString{}),
-		},
-	})
-}
-
-func TestJavaSdkLibraryApiSurfaceNoScopeIsSet(t *testing.T) {
-	runJavaSdkLibraryTestCase(t, Bp2buildTestCase{
-		Description: "limited java_sdk_library for api surfaces, none of the api scopes is set",
-		Filesystem: map[string]string{
-			"build/soong/scripts/gen-java-current-api-files.sh": "",
-			"api/current.txt":        "",
-			"api/system-current.txt": "",
-			"api/test-current.txt":   "",
-			"api/removed.txt":        "",
-			"api/system-removed.txt": "",
-			"api/test-removed.txt":   "",
-		},
-		Blueprint: `java_sdk_library {
-   name: "java-sdk-lib",
-   srcs: ["a.java"],
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_sdk_library", "java-sdk-lib", AttrNameToString{
-				"public": `"api/current.txt"`,
-				"system": `"api/system-current.txt"`,
-				"test":   `"api/test-current.txt"`,
-			}),
-		},
-	})
-}
diff --git a/bp2build/java_sdk_library_import_conversion_test.go b/bp2build/java_sdk_library_import_conversion_test.go
deleted file mode 100644
index 456f872..0000000
--- a/bp2build/java_sdk_library_import_conversion_test.go
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright 2023 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"testing"
-
-	"android/soong/java"
-)
-
-func runJavaSdkLibraryImportTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	RunBp2BuildTestCase(t, java.RegisterSdkLibraryBuildComponents, tc)
-}
-
-func TestJavaSdkLibraryImport(t *testing.T) {
-	runJavaSdkLibraryImportTestCase(t, Bp2buildTestCase{
-		Blueprint: `
-java_sdk_library_import {
-	name : "foo",
-	public: {
-		current_api: "foo_current.txt",
-	},
-	system: {
-		current_api: "system_foo_current.txt",
-	},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_sdk_library", "foo", AttrNameToString{
-				"public": `"foo_current.txt"`,
-				"system": `"system_foo_current.txt"`,
-			}),
-		},
-	})
-}
-
-func TestJavaSdkLibraryImportPrebuiltPrefixRemoved(t *testing.T) {
-	runJavaSdkLibraryImportTestCase(t, Bp2buildTestCase{
-		Filesystem: map[string]string{
-			"foobar/Android.bp": `
-java_sdk_library {
-	name: "foo",
-	srcs: ["**/*.java"],
-}
-`,
-			"foobar/api/current.txt":        "",
-			"foobar/api/system-current.txt": "",
-			"foobar/api/test-current.txt":   "",
-			"foobar/api/removed.txt":        "",
-			"foobar/api/system-removed.txt": "",
-			"foobar/api/test-removed.txt":   "",
-		},
-		Blueprint: `
-java_sdk_library_import {
-	name : "foo",
-	public: {
-		current_api: "foo_current.txt",
-	},
-	system: {
-		current_api: "system_foo_current.txt",
-	},
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_sdk_library", "foo", AttrNameToString{
-				"public": `"foo_current.txt"`,
-				"system": `"system_foo_current.txt"`,
-			}),
-		},
-	})
-}
diff --git a/bp2build/java_test_host_conversion_test.go b/bp2build/java_test_host_conversion_test.go
deleted file mode 100644
index 5d93f58..0000000
--- a/bp2build/java_test_host_conversion_test.go
+++ /dev/null
@@ -1,156 +0,0 @@
-// Copyright 2023 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"testing"
-
-	"android/soong/android"
-	"android/soong/java"
-)
-
-func runJavaTestHostTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	(&tc).ModuleTypeUnderTest = "java_test_host"
-	(&tc).ModuleTypeUnderTestFactory = java.TestHostFactory
-	RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("java_library", java.LibraryFactory)
-	}, tc)
-}
-
-func TestJavaTestHostGeneral(t *testing.T) {
-	runJavaTestHostTestCase(t, Bp2buildTestCase{
-		Description:             "java_test_host general",
-		Filesystem:              map[string]string{},
-		StubbedBuildDefinitions: []string{"lib_a", "static_libs_a"},
-		Blueprint: `
-java_test_host {
-    name: "java_test_host-1",
-    srcs: ["a.java", "b.java"],
-    libs: ["lib_a"],
-    static_libs: ["static_libs_a"],
-    exclude_srcs: ["b.java"],
-    javacflags: ["-Xdoclint:all/protected"],
-    java_version: "8",
-}
-
-java_library {
-    name: "lib_a",
-}
-
-java_library {
-    name: "static_libs_a",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_library", "java_test_host-1_lib", AttrNameToString{
-				"deps": `[
-        ":lib_a-neverlink",
-        ":static_libs_a",
-    ]`,
-				"java_version": `"8"`,
-				"javacopts":    `["-Xdoclint:all/protected"]`,
-				"srcs":         `["a.java"]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-			MakeBazelTarget("java_test", "java_test_host-1", AttrNameToString{
-				"runtime_deps": `[":java_test_host-1_lib"]`,
-				"deps": `[
-        ":lib_a-neverlink",
-        ":static_libs_a",
-    ]`,
-				"srcs": `["a.java"]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestJavaTestHostNoSrcs(t *testing.T) {
-	runJavaTestHostTestCase(t, Bp2buildTestCase{
-		Description: "java_test_host without srcs",
-		Filesystem:  map[string]string{},
-		Blueprint: `
-java_test_host {
-    name: "java_test_host-1",
-    libs: ["lib_a"],
-    static_libs: ["static_libs_a"],
-}
-
-java_library {
-    name: "lib_a",
-}
-
-java_library {
-    name: "static_libs_a",
-}
-`,
-		StubbedBuildDefinitions: []string{"lib_a", "static_libs_a"},
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_test", "java_test_host-1", AttrNameToString{
-				"runtime_deps": `[
-        ":lib_a-neverlink",
-        ":static_libs_a",
-    ]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestJavaTestHostKotlinSrcs(t *testing.T) {
-	runJavaTestHostTestCase(t, Bp2buildTestCase{
-		Description: "java_test_host with .kt in srcs",
-		Filesystem:  map[string]string{},
-		Blueprint: `
-java_test_host {
-    name: "java_test_host-1",
-    srcs: ["a.java", "b.kt"],
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("java_test", "java_test_host-1", AttrNameToString{
-				"srcs": `[
-        "a.java",
-        "b.kt",
-    ]`,
-				"runtime_deps": `[":java_test_host-1_lib"]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-			MakeBazelTarget("kt_jvm_library", "java_test_host-1_lib", AttrNameToString{
-				"srcs": `[
-        "a.java",
-        "b.kt",
-    ]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
diff --git a/bp2build/license_conversion_test.go b/bp2build/license_conversion_test.go
deleted file mode 100644
index ea6b27a..0000000
--- a/bp2build/license_conversion_test.go
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright 2022 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"android/soong/android"
-	"testing"
-)
-
-func registerLicenseModuleTypes(_ android.RegistrationContext) {}
-
-func TestLicenseBp2Build(t *testing.T) {
-	tests := []struct {
-		description string
-		module      string
-		expected    ExpectedRuleTarget
-	}{
-		{
-			description: "license kind and text notice",
-			module: `
-license {
-    name: "my_license",
-    license_kinds: [ "SPDX-license-identifier-Apache-2.0"],
-    license_text: [ "NOTICE"],
-}`,
-			expected: ExpectedRuleTarget{
-				"android_license",
-				"my_license",
-				AttrNameToString{
-					"license_kinds": `["SPDX-license-identifier-Apache-2.0"]`,
-					"license_text":  `"NOTICE"`,
-				},
-				android.HostAndDeviceDefault,
-			},
-		},
-		{
-			description: "visibility, package_name, copyright_notice",
-			module: `
-license {
-	name: "my_license",
-    package_name: "my_package",
-    visibility: [":__subpackages__"],
-    copyright_notice: "Copyright © 2022",
-}`,
-			expected: ExpectedRuleTarget{
-				"android_license",
-				"my_license",
-				AttrNameToString{
-					"copyright_notice": `"Copyright © 2022"`,
-					"package_name":     `"my_package"`,
-					"visibility":       `[":__subpackages__"]`,
-				},
-				android.HostAndDeviceDefault,
-			},
-		},
-	}
-
-	for _, test := range tests {
-		RunBp2BuildTestCase(t,
-			registerLicenseModuleTypes,
-			Bp2buildTestCase{
-				Description:                test.description,
-				ModuleTypeUnderTest:        "license",
-				ModuleTypeUnderTestFactory: android.LicenseFactory,
-				Blueprint:                  test.module,
-				ExpectedBazelTargets:       []string{test.expected.String()},
-			})
-	}
-}
diff --git a/bp2build/license_kind_conversion_test.go b/bp2build/license_kind_conversion_test.go
deleted file mode 100644
index eda116c..0000000
--- a/bp2build/license_kind_conversion_test.go
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2022 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"android/soong/android"
-	"testing"
-)
-
-func registerLicenseKindModuleTypes(_ android.RegistrationContext) {}
-
-func TestLicenseKindBp2Build(t *testing.T) {
-	tests := []struct {
-		description string
-		module      string
-		expected    ExpectedRuleTarget
-	}{
-		{
-			description: "license_kind",
-			module: `
-license_kind {
-    name: "my_license",
-    conditions: [
-        "by_exception_only",
-        "not_allowed",
-    ],
-    url: "https://spdx.org/licenses/0BSD",
-    visibility: ["//visibility:public"],
-}`,
-			expected: ExpectedRuleTarget{
-				"license_kind",
-				"my_license",
-				AttrNameToString{
-					"conditions": `[
-        "by_exception_only",
-        "not_allowed",
-    ]`,
-					"url":        `"https://spdx.org/licenses/0BSD"`,
-					"visibility": `["//visibility:public"]`,
-				},
-				android.HostAndDeviceDefault,
-			},
-		},
-	}
-
-	for _, test := range tests {
-		RunBp2BuildTestCase(t,
-			registerLicenseKindModuleTypes,
-			Bp2buildTestCase{
-				Description:                test.description,
-				ModuleTypeUnderTest:        "license_kind",
-				ModuleTypeUnderTestFactory: android.LicenseKindFactory,
-				Blueprint:                  test.module,
-				ExpectedBazelTargets:       []string{test.expected.String()},
-			})
-	}
-}
diff --git a/bp2build/linker_config_conversion_test.go b/bp2build/linker_config_conversion_test.go
deleted file mode 100644
index 5e7bcd4..0000000
--- a/bp2build/linker_config_conversion_test.go
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2022 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"fmt"
-	"testing"
-
-	"android/soong/linkerconfig"
-)
-
-func runLinkerConfigTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	(&tc).ModuleTypeUnderTest = "linker_config"
-	(&tc).ModuleTypeUnderTestFactory = linkerconfig.LinkerConfigFactory
-	RunBp2BuildTestCaseSimple(t, tc)
-}
-
-func TestLinkerConfigConvertsSrc(t *testing.T) {
-	runLinkerConfigTestCase(t,
-		Bp2buildTestCase{
-			Blueprint: `
-linker_config {
-	name: "foo",
-	src: "a.json",
-}
-`,
-			ExpectedBazelTargets: []string{MakeBazelTarget("linker_config", "foo", AttrNameToString{
-				"src": `"a.json"`,
-			})},
-		})
-
-}
-
-func TestLinkerConfigNoSrc(t *testing.T) {
-	runLinkerConfigTestCase(t,
-		Bp2buildTestCase{
-			Blueprint: `
-linker_config {
-	name: "foo",
-}
-`,
-			ExpectedBazelTargets: []string{},
-			ExpectedErr:          fmt.Errorf("Android.bp:2:1: module \"foo\": src: empty src is not supported"),
-		})
-
-}
diff --git a/bp2build/package_conversion_test.go b/bp2build/package_conversion_test.go
deleted file mode 100644
index ce848e4..0000000
--- a/bp2build/package_conversion_test.go
+++ /dev/null
@@ -1,139 +0,0 @@
-// Copyright 2022 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"testing"
-
-	"android/soong/android"
-	"android/soong/genrule"
-)
-
-func registerDependentModules(ctx android.RegistrationContext) {
-	ctx.RegisterModuleType("license", android.LicenseFactory)
-	ctx.RegisterModuleType("genrule", genrule.GenRuleFactory)
-}
-
-func TestPackage(t *testing.T) {
-	tests := []struct {
-		description string
-		modules     string
-		fs          map[string]string
-		expected    []ExpectedRuleTarget
-	}{
-		{
-			description: "with default applicable licenses",
-			modules: `
-license {
-  name: "my_license",
-  visibility: [":__subpackages__"],
-  license_kinds: ["SPDX-license-identifier-Apache-2.0"],
-  license_text: ["NOTICE"],
-}
-
-package {
-  default_applicable_licenses: ["my_license"],
-}
-`,
-			expected: []ExpectedRuleTarget{
-				{
-					"package",
-					"",
-					AttrNameToString{
-						"default_package_metadata": `[":my_license"]`,
-						"default_visibility":       `["//visibility:public"]`,
-					},
-					android.HostAndDeviceDefault,
-				},
-				{
-					"android_license",
-					"my_license",
-					AttrNameToString{
-						"license_kinds": `["SPDX-license-identifier-Apache-2.0"]`,
-						"license_text":  `"NOTICE"`,
-						"visibility":    `[":__subpackages__"]`,
-					},
-					android.HostAndDeviceDefault,
-				},
-			},
-		},
-		{
-			description: "package has METADATA file",
-			fs: map[string]string{
-				"METADATA": ``,
-			},
-			modules: `
-license {
-  name: "my_license",
-  visibility: [":__subpackages__"],
-  license_kinds: ["SPDX-license-identifier-Apache-2.0"],
-  license_text: ["NOTICE"],
-}
-
-package {
-  default_applicable_licenses: ["my_license"],
-}
-`,
-			expected: []ExpectedRuleTarget{
-				{
-					"package",
-					"",
-					AttrNameToString{
-						"default_package_metadata": `[
-        ":my_license",
-        ":default_metadata_file",
-    ]`,
-						"default_visibility": `["//visibility:public"]`,
-					},
-					android.HostAndDeviceDefault,
-				},
-				{
-					"android_license",
-					"my_license",
-					AttrNameToString{
-						"license_kinds": `["SPDX-license-identifier-Apache-2.0"]`,
-						"license_text":  `"NOTICE"`,
-						"visibility":    `[":__subpackages__"]`,
-					},
-					android.HostAndDeviceDefault,
-				},
-				{
-					"filegroup",
-					"default_metadata_file",
-					AttrNameToString{
-						"applicable_licenses": `[]`,
-						"srcs":                `["METADATA"]`,
-					},
-					android.HostAndDeviceDefault,
-				},
-			},
-		},
-	}
-	for _, test := range tests {
-		expected := make([]string, 0, len(test.expected))
-		for _, e := range test.expected {
-			expected = append(expected, e.String())
-		}
-		RunBp2BuildTestCase(t, registerDependentModules,
-			Bp2buildTestCase{
-				Description:                test.description,
-				ModuleTypeUnderTest:        "package",
-				ModuleTypeUnderTestFactory: android.PackageFactory,
-				Blueprint:                  test.modules,
-				ExpectedBazelTargets:       expected,
-				Filesystem:                 test.fs,
-			})
-	}
-}
diff --git a/bp2build/platform_compat_config_conversion_test.go b/bp2build/platform_compat_config_conversion_test.go
deleted file mode 100644
index d74db5d..0000000
--- a/bp2build/platform_compat_config_conversion_test.go
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2023 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"testing"
-
-	"android/soong/android"
-	"android/soong/java"
-)
-
-func runPlatformCompatConfigTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("java_library", java.LibraryFactory)
-		ctx.RegisterModuleType("platform_compat_config", java.PlatformCompatConfigFactory)
-	}, tc)
-}
-
-func TestPlatformCompatConfig(t *testing.T) {
-	runPlatformCompatConfigTestCase(t, Bp2buildTestCase{
-		Description: "platform_compat_config - conversion test",
-		Blueprint: `
-		platform_compat_config {
-			name: "foo",
-			src: ":lib",
-		}`,
-		StubbedBuildDefinitions: []string{"//a/b:lib"},
-		Filesystem: map[string]string{
-			"a/b/Android.bp": `
-			java_library {
-				name: "lib",
-				srcs: ["a.java"],
-			}`,
-		},
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("platform_compat_config", "foo", AttrNameToString{
-				"src": `"//a/b:lib"`,
-			}),
-		},
-	})
-}
diff --git a/bp2build/prebuilt_etc_conversion_test.go b/bp2build/prebuilt_etc_conversion_test.go
deleted file mode 100644
index c8cfd87..0000000
--- a/bp2build/prebuilt_etc_conversion_test.go
+++ /dev/null
@@ -1,396 +0,0 @@
-// Copyright 2021 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"fmt"
-	"testing"
-
-	"android/soong/android"
-	"android/soong/etc"
-)
-
-func runPrebuiltEtcTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	(&tc).ModuleTypeUnderTest = "prebuilt_etc"
-	(&tc).ModuleTypeUnderTestFactory = etc.PrebuiltEtcFactory
-	RunBp2BuildTestCase(t, registerPrebuiltModuleTypes, tc)
-}
-
-func runPrebuiltRootHostTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	(&tc).ModuleTypeUnderTest = "prebuilt_root_host"
-	(&tc).ModuleTypeUnderTestFactory = etc.PrebuiltRootHostFactory
-	RunBp2BuildTestCase(t, registerPrebuiltModuleTypes, tc)
-}
-
-func registerPrebuiltModuleTypes(ctx android.RegistrationContext) {
-}
-
-func TestPrebuiltEtcSimple(t *testing.T) {
-	runPrebuiltEtcTestCase(t, Bp2buildTestCase{
-		Description: "prebuilt_etc - simple example",
-		Filesystem:  map[string]string{},
-		Blueprint: `
-prebuilt_etc {
-    name: "apex_tz_version",
-    src: "version/tz_version",
-    filename: "tz_version",
-    sub_dir: "tz",
-    installable: false,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("prebuilt_file", "apex_tz_version", AttrNameToString{
-				"filename":    `"tz_version"`,
-				"installable": `False`,
-				"src":         `"version/tz_version"`,
-				"dir":         `"etc/tz"`,
-			})}})
-}
-
-func TestPrebuiltEtcArchVariant(t *testing.T) {
-	runPrebuiltEtcTestCase(t, Bp2buildTestCase{
-		Description: "prebuilt_etc - arch variant",
-		Filesystem:  map[string]string{},
-		Blueprint: `
-prebuilt_etc {
-    name: "apex_tz_version",
-    src: "version/tz_version",
-    filename: "tz_version",
-    sub_dir: "tz",
-    installable: false,
-    arch: {
-      arm: {
-        src: "arm",
-      },
-      arm64: {
-        src: "arm64",
-      },
-    }
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("prebuilt_file", "apex_tz_version", AttrNameToString{
-				"filename":    `"tz_version"`,
-				"installable": `False`,
-				"src": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": "arm",
-        "//build/bazel_common_rules/platforms/arch:arm64": "arm64",
-        "//conditions:default": "version/tz_version",
-    })`,
-				"dir": `"etc/tz"`,
-			})}})
-}
-
-func TestPrebuiltEtcArchAndTargetVariant(t *testing.T) {
-	runPrebuiltEtcTestCase(t, Bp2buildTestCase{
-		Description: "prebuilt_etc - arch variant",
-		Filesystem:  map[string]string{},
-		Blueprint: `
-prebuilt_etc {
-    name: "apex_tz_version",
-    src: "version/tz_version",
-    filename: "tz_version",
-    sub_dir: "tz",
-    installable: false,
-    arch: {
-      arm: {
-        src: "arm",
-      },
-      arm64: {
-        src: "darwin_or_arm64",
-      },
-    },
-    target: {
-      darwin: {
-        src: "darwin_or_arm64",
-      }
-    },
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("prebuilt_file", "apex_tz_version", AttrNameToString{
-				"filename":    `"tz_version"`,
-				"installable": `False`,
-				"src": `select({
-        "//build/bazel_common_rules/platforms/os_arch:android_arm": "arm",
-        "//build/bazel_common_rules/platforms/os_arch:android_arm64": "darwin_or_arm64",
-        "//build/bazel_common_rules/platforms/os_arch:darwin_arm64": "darwin_or_arm64",
-        "//build/bazel_common_rules/platforms/os_arch:darwin_x86_64": "darwin_or_arm64",
-        "//build/bazel_common_rules/platforms/os_arch:linux_bionic_arm64": "darwin_or_arm64",
-        "//conditions:default": "version/tz_version",
-    })`,
-				"dir": `"etc/tz"`,
-			})}})
-}
-func TestPrebuiltEtcProductVariables(t *testing.T) {
-	runPrebuiltEtcTestCase(t, Bp2buildTestCase{
-		Description: "prebuilt etc - product variables",
-		Filesystem:  map[string]string{},
-		Blueprint: `
-prebuilt_etc {
-    name: "apex_tz_version",
-    src: "version/tz_version",
-    filename: "tz_version",
-    product_variables: {
-      native_coverage: {
-        src: "src1",
-      },
-    },
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("prebuilt_file", "apex_tz_version", AttrNameToString{
-				"filename": `"tz_version"`,
-				"src": `select({
-        "//build/bazel/product_config/config_settings:native_coverage": "src1",
-        "//conditions:default": "version/tz_version",
-    })`,
-				"dir": `"etc"`,
-			})}})
-}
-
-func runPrebuiltUsrShareTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	(&tc).ModuleTypeUnderTest = "prebuilt_usr_share"
-	(&tc).ModuleTypeUnderTestFactory = etc.PrebuiltUserShareFactory
-	RunBp2BuildTestCase(t, registerPrebuiltModuleTypes, tc)
-}
-
-func registerPrebuiltUsrShareModuleTypes(ctx android.RegistrationContext) {
-}
-
-func TestPrebuiltUsrShareSimple(t *testing.T) {
-	runPrebuiltUsrShareTestCase(t, Bp2buildTestCase{
-		Description: "prebuilt_usr_share - simple example",
-		Filesystem:  map[string]string{},
-		Blueprint: `
-prebuilt_usr_share {
-    name: "apex_tz_version",
-    src: "version/tz_version",
-    filename: "tz_version",
-    sub_dir: "tz",
-    installable: false,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("prebuilt_file", "apex_tz_version", AttrNameToString{
-				"filename":    `"tz_version"`,
-				"installable": `False`,
-				"src":         `"version/tz_version"`,
-				"dir":         `"usr/share/tz"`,
-			})}})
-}
-
-func TestPrebuiltEtcNoSubdir(t *testing.T) {
-	runPrebuiltEtcTestCase(t, Bp2buildTestCase{
-		Description: "prebuilt_etc - no subdir",
-		Filesystem:  map[string]string{},
-		Blueprint: `
-prebuilt_etc {
-    name: "apex_tz_version",
-    src: "version/tz_version",
-    filename: "tz_version",
-    installable: false,
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("prebuilt_file", "apex_tz_version", AttrNameToString{
-				"filename":    `"tz_version"`,
-				"installable": `False`,
-				"src":         `"version/tz_version"`,
-				"dir":         `"etc"`,
-			})}})
-}
-
-func TestFilenameAsProperty(t *testing.T) {
-	runPrebuiltEtcTestCase(t, Bp2buildTestCase{
-		Description: "prebuilt_etc - filename is specified as a property ",
-		Filesystem:  map[string]string{},
-		Blueprint: `
-prebuilt_etc {
-    name: "foo",
-    src: "fooSrc",
-    filename: "fooFileName",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("prebuilt_file", "foo", AttrNameToString{
-				"filename": `"fooFileName"`,
-				"src":      `"fooSrc"`,
-				"dir":      `"etc"`,
-			})}})
-}
-
-func TestFileNameFromSrc(t *testing.T) {
-	runPrebuiltEtcTestCase(t, Bp2buildTestCase{
-		Description: "prebuilt_etc - filename_from_src is true  ",
-		Filesystem:  map[string]string{},
-		Blueprint: `
-prebuilt_etc {
-    name: "foo",
-    filename_from_src: true,
-    src: "fooSrc",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("prebuilt_file", "foo", AttrNameToString{
-				"filename": `"fooSrc"`,
-				"src":      `"fooSrc"`,
-				"dir":      `"etc"`,
-			})}})
-}
-
-func TestFileNameFromSrcMultipleSrcs(t *testing.T) {
-	runPrebuiltEtcTestCase(t, Bp2buildTestCase{
-		Description: "prebuilt_etc - filename_from_src is true but there are multiple srcs",
-		Filesystem:  map[string]string{},
-		Blueprint: `
-prebuilt_etc {
-    name: "foo",
-    filename_from_src: true,
-		arch: {
-        arm: {
-            src: "barSrc",
-        },
-        arm64: {
-            src: "bazSrc",
-        },
-	  }
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("prebuilt_file", "foo", AttrNameToString{
-				"filename_from_src": `True`,
-				"dir":               `"etc"`,
-				"src": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": "barSrc",
-        "//build/bazel_common_rules/platforms/arch:arm64": "bazSrc",
-        "//conditions:default": None,
-    })`,
-			})}})
-}
-
-func TestFilenameFromModuleName(t *testing.T) {
-	runPrebuiltEtcTestCase(t, Bp2buildTestCase{
-		Description: "prebuilt_etc - neither filename nor filename_from_src are specified ",
-		Filesystem:  map[string]string{},
-		Blueprint: `
-prebuilt_etc {
-    name: "foo",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("prebuilt_file", "foo", AttrNameToString{
-				"filename": `"foo"`,
-				"dir":      `"etc"`,
-			})}})
-}
-
-func TestPrebuiltEtcProductVariableArchSrcs(t *testing.T) {
-	runPrebuiltEtcTestCase(t, Bp2buildTestCase{
-		Description: "prebuilt etc- SRcs from arch variant product variables",
-		Filesystem:  map[string]string{},
-		Blueprint: `
-prebuilt_etc {
-    name: "foo",
-    filename: "fooFilename",
-    arch: {
-      arm: {
-        src: "armSrc",
-        product_variables: {
-          native_coverage: {
-            src: "nativeCoverageArmSrc",
-          },
-        },
-      },
-    },
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("prebuilt_file", "foo", AttrNameToString{
-				"filename": `"fooFilename"`,
-				"dir":      `"etc"`,
-				"src": `select({
-        "//build/bazel/product_config/config_settings:native_coverage-arm": "nativeCoverageArmSrc",
-        "//build/bazel_common_rules/platforms/arch:arm": "armSrc",
-        "//conditions:default": None,
-    })`,
-			})}})
-}
-
-func TestPrebuiltEtcProductVariableError(t *testing.T) {
-	runPrebuiltEtcTestCase(t, Bp2buildTestCase{
-		Description: "",
-		Filesystem:  map[string]string{},
-		Blueprint: `
-prebuilt_etc {
-    name: "foo",
-    filename: "fooFilename",
-    arch: {
-      arm: {
-        src: "armSrc",
-      },
-    },
-    product_variables: {
-      native_coverage: {
-        src: "nativeCoverageArmSrc",
-      },
-    },
-}`,
-		ExpectedErr: fmt.Errorf("label attribute could not be collapsed"),
-	})
-}
-
-func TestPrebuiltEtcNoConversionIfSrcEqualsName(t *testing.T) {
-	runPrebuiltEtcTestCase(t, Bp2buildTestCase{
-		Description: "",
-		Filesystem:  map[string]string{},
-		Blueprint: `
-prebuilt_etc {
-    name: "foo",
-    filename: "fooFilename",
-		src: "foo",
-}`,
-		ExpectedBazelTargets: []string{},
-	})
-}
-
-func TestPrebuiltRootHostWithWildCardInSrc(t *testing.T) {
-	runPrebuiltRootHostTestCase(t, Bp2buildTestCase{
-		Description: "prebuilt_root_host - src string has wild card",
-		Filesystem: map[string]string{
-			"prh.dat": "",
-		},
-		Blueprint: `
-prebuilt_root_host {
-    name: "prh_test",
-    src: "*.dat",
-    filename_from_src: true,
-    relative_install_path: "test/install/path",
-    bazel_module: { bp2build_available: true },
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("prebuilt_file", "prh_test", AttrNameToString{
-				"filename": `"prh.dat"`,
-				"src":      `"prh.dat"`,
-				"dir":      `"./test/install/path"`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			})}})
-}
diff --git a/bp2build/python_binary_conversion_test.go b/bp2build/python_binary_conversion_test.go
deleted file mode 100644
index eb993c2..0000000
--- a/bp2build/python_binary_conversion_test.go
+++ /dev/null
@@ -1,320 +0,0 @@
-package bp2build
-
-import (
-	"testing"
-
-	"android/soong/android"
-	"android/soong/genrule"
-	"android/soong/python"
-)
-
-func runBp2BuildTestCaseWithPythonLibraries(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("python_library", python.PythonLibraryFactory)
-		ctx.RegisterModuleType("python_library_host", python.PythonLibraryHostFactory)
-		ctx.RegisterModuleType("genrule", genrule.GenRuleFactory)
-		ctx.RegisterModuleType("python_defaults", python.DefaultsFactory)
-	}, tc)
-}
-
-func TestPythonBinaryHostSimple(t *testing.T) {
-	runBp2BuildTestCaseWithPythonLibraries(t, Bp2buildTestCase{
-		Description:                "simple python_binary_host converts to a native py_binary",
-		ModuleTypeUnderTest:        "python_binary_host",
-		ModuleTypeUnderTestFactory: python.PythonBinaryHostFactory,
-		Filesystem: map[string]string{
-			"a.py":           "",
-			"b/c.py":         "",
-			"b/d.py":         "",
-			"b/e.py":         "",
-			"files/data.txt": "",
-		},
-		StubbedBuildDefinitions: []string{"bar"},
-		Blueprint: `python_binary_host {
-    name: "foo",
-    main: "a.py",
-    srcs: ["**/*.py"],
-    exclude_srcs: ["b/e.py"],
-    data: ["files/data.txt",],
-    libs: ["bar"],
-    bazel_module: { bp2build_available: true },
-}
-    python_library_host {
-      name: "bar",
-      srcs: ["b/e.py"],
-    }`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("py_binary", "foo", AttrNameToString{
-				"data":    `["files/data.txt"]`,
-				"deps":    `[":bar"]`,
-				"main":    `"a.py"`,
-				"imports": `["."]`,
-				"srcs": `[
-        "a.py",
-        "b/c.py",
-        "b/d.py",
-    ]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestPythonBinaryHostPy2(t *testing.T) {
-	RunBp2BuildTestCaseSimple(t, Bp2buildTestCase{
-		Description:                "py2 python_binary_host",
-		ModuleTypeUnderTest:        "python_binary_host",
-		ModuleTypeUnderTestFactory: python.PythonBinaryHostFactory,
-		Blueprint: `python_binary_host {
-    name: "foo",
-    srcs: ["a.py"],
-    version: {
-        py2: {
-            enabled: true,
-        },
-        py3: {
-            enabled: false,
-        },
-    },
-
-    bazel_module: { bp2build_available: true },
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("py_binary", "foo", AttrNameToString{
-				"python_version": `"PY2"`,
-				"imports":        `["."]`,
-				"srcs":           `["a.py"]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestPythonBinaryHostPy3(t *testing.T) {
-	RunBp2BuildTestCaseSimple(t, Bp2buildTestCase{
-		Description:                "py3 python_binary_host",
-		ModuleTypeUnderTest:        "python_binary_host",
-		ModuleTypeUnderTestFactory: python.PythonBinaryHostFactory,
-		Blueprint: `python_binary_host {
-    name: "foo",
-    srcs: ["a.py"],
-    version: {
-        py2: {
-            enabled: false,
-        },
-        py3: {
-            enabled: true,
-        },
-    },
-
-    bazel_module: { bp2build_available: true },
-}
-`,
-		ExpectedBazelTargets: []string{
-			// python_version is PY3 by default.
-			MakeBazelTarget("py_binary", "foo", AttrNameToString{
-				"imports": `["."]`,
-				"srcs":    `["a.py"]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestPythonBinaryHostArchVariance(t *testing.T) {
-	RunBp2BuildTestCaseSimple(t, Bp2buildTestCase{
-		Description:                "test arch variants",
-		ModuleTypeUnderTest:        "python_binary_host",
-		ModuleTypeUnderTestFactory: python.PythonBinaryHostFactory,
-		Filesystem: map[string]string{
-			"dir/arm.py": "",
-			"dir/x86.py": "",
-		},
-		Blueprint: `python_binary_host {
-					 name: "foo-arm",
-					 arch: {
-						 arm: {
-							 srcs: ["arm.py"],
-						 },
-						 x86: {
-							 srcs: ["x86.py"],
-						 },
-					},
-				 }`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("py_binary", "foo-arm", AttrNameToString{
-				"imports": `["."]`,
-				"srcs": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["arm.py"],
-        "//build/bazel_common_rules/platforms/arch:x86": ["x86.py"],
-        "//conditions:default": [],
-    })`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestPythonBinaryMainIsNotSpecified(t *testing.T) {
-	runBp2BuildTestCaseWithPythonLibraries(t, Bp2buildTestCase{
-		Description:                "python_binary_host main label in same package",
-		ModuleTypeUnderTest:        "python_binary_host",
-		ModuleTypeUnderTestFactory: python.PythonBinaryHostFactory,
-		Blueprint: `python_binary_host {
-    name: "foo",
-    bazel_module: { bp2build_available: true },
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("py_binary", "foo", AttrNameToString{
-				"imports": `["."]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestPythonBinaryMainIsLabel(t *testing.T) {
-	runBp2BuildTestCaseWithPythonLibraries(t, Bp2buildTestCase{
-		Description:                "python_binary_host main label in same package",
-		ModuleTypeUnderTest:        "python_binary_host",
-		ModuleTypeUnderTestFactory: python.PythonBinaryHostFactory,
-		StubbedBuildDefinitions:    []string{"a"},
-		Blueprint: `python_binary_host {
-    name: "foo",
-    main: ":a",
-    bazel_module: { bp2build_available: true },
-}
-
-genrule {
-		name: "a",
-}
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("py_binary", "foo", AttrNameToString{
-				"main":    `":a"`,
-				"imports": `["."]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestPythonBinaryMainIsSubpackageFile(t *testing.T) {
-	runBp2BuildTestCaseWithPythonLibraries(t, Bp2buildTestCase{
-		Description:                "python_binary_host main is subpackage file",
-		ModuleTypeUnderTest:        "python_binary_host",
-		ModuleTypeUnderTestFactory: python.PythonBinaryHostFactory,
-		Filesystem: map[string]string{
-			"a/Android.bp": "",
-			"a/b.py":       "",
-		},
-		Blueprint: `python_binary_host {
-    name: "foo",
-    main: "a/b.py",
-    bazel_module: { bp2build_available: true },
-}
-
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("py_binary", "foo", AttrNameToString{
-				"main":    `"//a:b.py"`,
-				"imports": `["."]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestPythonBinaryMainIsSubDirFile(t *testing.T) {
-	runBp2BuildTestCaseWithPythonLibraries(t, Bp2buildTestCase{
-		Description:                "python_binary_host main is file in sub directory that is not Bazel package",
-		ModuleTypeUnderTest:        "python_binary_host",
-		ModuleTypeUnderTestFactory: python.PythonBinaryHostFactory,
-		Filesystem: map[string]string{
-			"a/b.py": "",
-		},
-		Blueprint: `python_binary_host {
-    name: "foo",
-    main: "a/b.py",
-    bazel_module: { bp2build_available: true },
-}
-
-`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("py_binary", "foo", AttrNameToString{
-				"main":    `"a/b.py"`,
-				"imports": `["."]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
-
-func TestPythonBinaryDuplicatesInRequired(t *testing.T) {
-	runBp2BuildTestCaseWithPythonLibraries(t, Bp2buildTestCase{
-		Description:                "python_binary_host duplicates in required attribute of the module and its defaults",
-		ModuleTypeUnderTest:        "python_binary_host",
-		ModuleTypeUnderTestFactory: python.PythonBinaryHostFactory,
-		StubbedBuildDefinitions:    []string{"r1", "r2"},
-		Blueprint: `python_binary_host {
-    name: "foo",
-    main: "a.py",
-		defaults: ["d"],
-    required: [
-        "r1",
-    ],
-    bazel_module: { bp2build_available: true },
-}
-
-python_defaults {
-    name: "d",
-    required: [
-        "r1",
-        "r2",
-    ],
-}` + simpleModule("genrule", "r1") +
-			simpleModule("genrule", "r2"),
-
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("py_binary", "foo", AttrNameToString{
-				"main":    `"a.py"`,
-				"imports": `["."]`,
-				"data": `[
-        ":r1",
-        ":r2",
-    ]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
diff --git a/bp2build/python_library_conversion_test.go b/bp2build/python_library_conversion_test.go
deleted file mode 100644
index ad6a27b..0000000
--- a/bp2build/python_library_conversion_test.go
+++ /dev/null
@@ -1,392 +0,0 @@
-package bp2build
-
-import (
-	"fmt"
-	"strings"
-	"testing"
-
-	"android/soong/android"
-	"android/soong/python"
-)
-
-// TODO(alexmarquez): Should be lifted into a generic Bp2Build file
-type PythonLibBp2Build func(ctx android.TopDownMutatorContext)
-
-type pythonLibBp2BuildTestCase struct {
-	description             string
-	filesystem              map[string]string
-	blueprint               string
-	expectedBazelTargets    []testBazelTarget
-	dir                     string
-	expectedError           error
-	stubbedBuildDefinitions []string
-}
-
-func convertPythonLibTestCaseToBp2build_Host(tc pythonLibBp2BuildTestCase) Bp2buildTestCase {
-	for i := range tc.expectedBazelTargets {
-		tc.expectedBazelTargets[i].attrs["target_compatible_with"] = `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`
-	}
-
-	return convertPythonLibTestCaseToBp2build(tc)
-}
-
-func convertPythonLibTestCaseToBp2build(tc pythonLibBp2BuildTestCase) Bp2buildTestCase {
-	var bp2BuildTargets []string
-	for _, t := range tc.expectedBazelTargets {
-		bp2BuildTargets = append(bp2BuildTargets, MakeBazelTarget(t.typ, t.name, t.attrs))
-	}
-	// Copy the filesystem so that we can change stuff in it later without it
-	// affecting the original pythonLibBp2BuildTestCase
-	filesystemCopy := make(map[string]string)
-	for k, v := range tc.filesystem {
-		filesystemCopy[k] = v
-	}
-	return Bp2buildTestCase{
-		Description:             tc.description,
-		Filesystem:              filesystemCopy,
-		Blueprint:               tc.blueprint,
-		ExpectedBazelTargets:    bp2BuildTargets,
-		Dir:                     tc.dir,
-		ExpectedErr:             tc.expectedError,
-		StubbedBuildDefinitions: tc.stubbedBuildDefinitions,
-	}
-}
-
-func runPythonLibraryTestCase(t *testing.T, tc pythonLibBp2BuildTestCase) {
-	t.Helper()
-	testCase := convertPythonLibTestCaseToBp2build(tc)
-	testCase.Description = fmt.Sprintf(testCase.Description, "python_library")
-	testCase.Blueprint = fmt.Sprintf(testCase.Blueprint, "python_library")
-	for name, contents := range testCase.Filesystem {
-		if strings.HasSuffix(name, "Android.bp") {
-			testCase.Filesystem[name] = fmt.Sprintf(contents, "python_library")
-		}
-	}
-	testCase.ModuleTypeUnderTest = "python_library"
-	testCase.ModuleTypeUnderTestFactory = python.PythonLibraryFactory
-
-	RunBp2BuildTestCaseSimple(t, testCase)
-}
-
-func runPythonLibraryHostTestCase(t *testing.T, tc pythonLibBp2BuildTestCase) {
-	t.Helper()
-	testCase := convertPythonLibTestCaseToBp2build_Host(tc)
-	testCase.Description = fmt.Sprintf(testCase.Description, "python_library_host")
-	testCase.Blueprint = fmt.Sprintf(testCase.Blueprint, "python_library_host")
-	for name, contents := range testCase.Filesystem {
-		if strings.HasSuffix(name, "Android.bp") {
-			testCase.Filesystem[name] = fmt.Sprintf(contents, "python_library_host")
-		}
-	}
-	testCase.ModuleTypeUnderTest = "python_library_host"
-	testCase.ModuleTypeUnderTestFactory = python.PythonLibraryHostFactory
-	RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("python_library", python.PythonLibraryFactory)
-	},
-		testCase)
-}
-
-func runPythonLibraryTestCases(t *testing.T, tc pythonLibBp2BuildTestCase) {
-	t.Helper()
-	runPythonLibraryTestCase(t, tc)
-	runPythonLibraryHostTestCase(t, tc)
-}
-
-func TestSimplePythonLib(t *testing.T) {
-	testCases := []pythonLibBp2BuildTestCase{
-		{
-			description: "simple %s converts to a native py_library",
-			filesystem: map[string]string{
-				"a.py":           "",
-				"b/c.py":         "",
-				"b/d.py":         "",
-				"b/e.py":         "",
-				"files/data.txt": "",
-			},
-			stubbedBuildDefinitions: []string{"bar"},
-			blueprint: `%s {
-    name: "foo",
-    srcs: ["**/*.py"],
-    exclude_srcs: ["b/e.py"],
-    data: ["files/data.txt",],
-    libs: ["bar"],
-    bazel_module: { bp2build_available: true },
-}
-    python_library {
-      name: "bar",
-      srcs: ["b/e.py"],
-    }`,
-			expectedBazelTargets: []testBazelTarget{
-				{
-					typ:  "py_library",
-					name: "foo",
-					attrs: AttrNameToString{
-						"data": `["files/data.txt"]`,
-						"deps": `[":bar"]`,
-						"srcs": `[
-        "a.py",
-        "b/c.py",
-        "b/d.py",
-    ]`,
-						"srcs_version": `"PY3"`,
-						"imports":      `["."]`,
-					},
-				},
-			},
-		},
-		{
-			description: "py2 %s converts to a native py_library",
-			blueprint: `%s {
-    name: "foo",
-    srcs: ["a.py"],
-    version: {
-        py2: {
-            enabled: true,
-        },
-        py3: {
-            enabled: false,
-        },
-    },
-
-    bazel_module: { bp2build_available: true },
-}`,
-			expectedBazelTargets: []testBazelTarget{
-				{
-					typ:  "py_library",
-					name: "foo",
-					attrs: AttrNameToString{
-						"srcs":         `["a.py"]`,
-						"srcs_version": `"PY2"`,
-						"imports":      `["."]`,
-					},
-				},
-			},
-		},
-		{
-			description: "py3 %s converts to a native py_library",
-			blueprint: `%s {
-    name: "foo",
-    srcs: ["a.py"],
-    version: {
-        py2: {
-            enabled: false,
-        },
-        py3: {
-            enabled: true,
-        },
-    },
-
-    bazel_module: { bp2build_available: true },
-}`,
-			expectedBazelTargets: []testBazelTarget{
-				{
-					typ:  "py_library",
-					name: "foo",
-					attrs: AttrNameToString{
-						"srcs":         `["a.py"]`,
-						"srcs_version": `"PY3"`,
-						"imports":      `["."]`,
-					},
-				},
-			},
-		},
-		{
-			description: "py2&3 %s converts to a native py_library",
-			blueprint: `%s {
-    name: "foo",
-    srcs: ["a.py"],
-    version: {
-        py2: {
-            enabled: true,
-        },
-        py3: {
-            enabled: true,
-        },
-    },
-
-    bazel_module: { bp2build_available: true },
-}`,
-			expectedBazelTargets: []testBazelTarget{
-				{
-					// srcs_version is PY2ANDPY3 by default.
-					typ:  "py_library",
-					name: "foo",
-					attrs: AttrNameToString{
-						"srcs":    `["a.py"]`,
-						"imports": `["."]`,
-					},
-				},
-			},
-		},
-		{
-			description: "%s: pkg_path in a subdirectory of the same name converts correctly",
-			dir:         "mylib/subpackage",
-			filesystem: map[string]string{
-				"mylib/subpackage/a.py": "",
-				"mylib/subpackage/Android.bp": `%s {
-				name: "foo",
-				srcs: ["a.py"],
-				pkg_path: "mylib/subpackage",
-
-				bazel_module: { bp2build_available: true },
-			}`,
-			},
-			blueprint: `%s {name: "bar"}`,
-			expectedBazelTargets: []testBazelTarget{
-				{
-					// srcs_version is PY2ANDPY3 by default.
-					typ:  "py_library",
-					name: "foo",
-					attrs: AttrNameToString{
-						"srcs":         `["a.py"]`,
-						"imports":      `["../.."]`,
-						"srcs_version": `"PY3"`,
-					},
-				},
-			},
-		},
-		{
-			description: "%s: pkg_path in a subdirectory of a different name fails",
-			dir:         "mylib/subpackage",
-			filesystem: map[string]string{
-				"mylib/subpackage/a.py": "",
-				"mylib/subpackage/Android.bp": `%s {
-				name: "foo",
-				srcs: ["a.py"],
-				pkg_path: "mylib/subpackage2",
-				bazel_module: { bp2build_available: true },
-			}`,
-			},
-			blueprint:     `%s {name: "bar"}`,
-			expectedError: fmt.Errorf("Currently, bp2build only supports pkg_paths that are the same as the folders the Android.bp file is in."),
-		},
-	}
-
-	for _, tc := range testCases {
-		t.Run(tc.description, func(t *testing.T) {
-			runPythonLibraryTestCases(t, tc)
-		})
-	}
-}
-
-func TestPythonArchVariance(t *testing.T) {
-	runPythonLibraryTestCases(t, pythonLibBp2BuildTestCase{
-		description: "test %s arch variants",
-		filesystem: map[string]string{
-			"dir/arm.py": "",
-			"dir/x86.py": "",
-		},
-		blueprint: `%s {
-					 name: "foo",
-					 arch: {
-						 arm: {
-							 srcs: ["arm.py"],
-						 },
-						 x86: {
-							 srcs: ["x86.py"],
-						 },
-					},
-				 }`,
-		expectedBazelTargets: []testBazelTarget{
-			{
-				typ:  "py_library",
-				name: "foo",
-				attrs: AttrNameToString{
-					"srcs": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": ["arm.py"],
-        "//build/bazel_common_rules/platforms/arch:x86": ["x86.py"],
-        "//conditions:default": [],
-    })`,
-					"srcs_version": `"PY3"`,
-					"imports":      `["."]`,
-				},
-			},
-		},
-	})
-}
-
-func TestPythonLibraryWithProtobufs(t *testing.T) {
-	runPythonLibraryTestCases(t, pythonLibBp2BuildTestCase{
-		description: "test %s protobuf",
-		filesystem: map[string]string{
-			"dir/mylib.py":      "",
-			"dir/myproto.proto": "",
-		},
-		blueprint: `%s {
-					 name: "foo",
-					 srcs: [
-						"dir/mylib.py",
-						"dir/myproto.proto",
-					 ],
-				 }`,
-		expectedBazelTargets: []testBazelTarget{
-			{
-				typ:  "proto_library",
-				name: "foo_proto",
-				attrs: AttrNameToString{
-					"srcs": `["dir/myproto.proto"]`,
-				},
-			},
-			{
-				typ:  "py_proto_library",
-				name: "foo_py_proto",
-				attrs: AttrNameToString{
-					"deps": `[":foo_proto"]`,
-				},
-			},
-			{
-				typ:  "py_library",
-				name: "foo",
-				attrs: AttrNameToString{
-					"srcs":         `["dir/mylib.py"]`,
-					"srcs_version": `"PY3"`,
-					"imports":      `["."]`,
-					"deps":         `[":foo_py_proto"]`,
-				},
-			},
-		},
-	})
-}
-
-func TestPythonLibraryWithProtobufsAndPkgPath(t *testing.T) {
-	t.Parallel()
-	runBp2BuildTestCaseWithPythonLibraries(t, Bp2buildTestCase{
-		Description: "test python_library protobuf with pkg_path",
-		Filesystem: map[string]string{
-			"dir/foo.proto": "",
-			"dir/bar.proto": "", // bar contains "import dir/foo.proto"
-			"dir/Android.bp": `
-python_library {
-  name: "foo",
-  pkg_path: "dir",
-  srcs: [
-    "foo.proto",
-    "bar.proto",
-  ],
-  bazel_module: {bp2build_available: true},
-}`,
-		},
-		Dir: "dir",
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("proto_library", "foo_proto", AttrNameToString{
-				"import_prefix":       `"dir"`,
-				"strip_import_prefix": `""`,
-				"srcs": `[
-        "foo.proto",
-        "bar.proto",
-    ]`,
-			}),
-			MakeBazelTarget("py_proto_library", "foo_py_proto", AttrNameToString{
-				"deps": `[":foo_proto"]`,
-			}),
-			MakeBazelTarget("py_library", "foo", AttrNameToString{
-				"srcs_version": `"PY3"`,
-				"imports":      `[".."]`,
-				"deps":         `[":foo_py_proto"]`,
-			}),
-		},
-	})
-}
diff --git a/bp2build/python_test_conversion_test.go b/bp2build/python_test_conversion_test.go
deleted file mode 100644
index fca7efb..0000000
--- a/bp2build/python_test_conversion_test.go
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2023 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"testing"
-
-	"android/soong/python"
-)
-
-func TestPythonTestHostSimple(t *testing.T) {
-	runBp2BuildTestCaseWithPythonLibraries(t, Bp2buildTestCase{
-		Description:                "simple python_test_host converts to a native py_test",
-		ModuleTypeUnderTest:        "python_test_host",
-		ModuleTypeUnderTestFactory: python.PythonTestHostFactory,
-		Filesystem: map[string]string{
-			"a.py":           "",
-			"b/c.py":         "",
-			"b/d.py":         "",
-			"b/e.py":         "",
-			"files/data.txt": "",
-		},
-		StubbedBuildDefinitions: []string{"bar"},
-		Blueprint: `python_test_host {
-    name: "foo",
-    main: "a.py",
-    srcs: ["**/*.py"],
-    exclude_srcs: ["b/e.py"],
-    data: ["files/data.txt",],
-    libs: ["bar"],
-    bazel_module: { bp2build_available: true },
-}
-    python_library_host {
-      name: "bar",
-      srcs: ["b/e.py"],
-    }`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("py_test", "foo", AttrNameToString{
-				"data":    `["files/data.txt"]`,
-				"deps":    `[":bar"]`,
-				"main":    `"a.py"`,
-				"imports": `["."]`,
-				"srcs": `[
-        "a.py",
-        "b/c.py",
-        "b/d.py",
-    ]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			}),
-		},
-	})
-}
diff --git a/bp2build/rust_binary_conversion_test.go b/bp2build/rust_binary_conversion_test.go
deleted file mode 100644
index a5abbdb..0000000
--- a/bp2build/rust_binary_conversion_test.go
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright 2023 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"android/soong/android"
-	"android/soong/rust"
-	"testing"
-)
-
-func runRustBinaryTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	RunBp2BuildTestCase(t, registerRustBinaryModuleTypes, tc)
-}
-
-func registerRustBinaryModuleTypes(ctx android.RegistrationContext) {
-	ctx.RegisterModuleType("rust_binary_host", rust.RustBinaryHostFactory)
-	ctx.RegisterModuleType("rust_library_host", rust.RustLibraryHostFactory)
-	ctx.RegisterModuleType("rust_proc_macro", rust.ProcMacroFactory)
-
-}
-
-func TestRustBinaryHost(t *testing.T) {
-	runRustBinaryTestCase(t, Bp2buildTestCase{
-		Dir:       "external/rust/crates/foo",
-		Blueprint: "",
-		Filesystem: map[string]string{
-			"external/rust/crates/foo/src/lib.rs":    "",
-			"external/rust/crates/foo/src/helper.rs": "",
-			"external/rust/crates/foo/Android.bp": `
-rust_binary_host {
-	name: "libfoo",
-	crate_name: "foo",
-	srcs: ["src/main.rs"],
-	edition: "2021",
-	features: ["bah-enabled"],
-	cfgs: ["baz"],
-	rustlibs: ["libbar"],
-	proc_macros: ["libbah"],
-    bazel_module: { bp2build_available: true },
-}
-`,
-			"external/rust/crates/bar/Android.bp": `
-rust_library_host {
-	name: "libbar",
-	crate_name: "bar",
-	srcs: ["src/lib.rs"],
-    bazel_module: { bp2build_available: true },
-}
-`,
-			"external/rust/crates/bah/Android.bp": `
-rust_proc_macro {
-	name: "libbah",
-	crate_name: "bah",
-	srcs: ["src/lib.rs"],
-    bazel_module: { bp2build_available: true },
-}
-`,
-		},
-		ExpectedBazelTargets: []string{
-			makeBazelTargetHostOrDevice("rust_binary", "libfoo", AttrNameToString{
-				"crate_name": `"foo"`,
-				"srcs": `[
-        "src/helper.rs",
-        "src/lib.rs",
-    ]`,
-				"deps":            `["//external/rust/crates/bar:libbar"]`,
-				"proc_macro_deps": `["//external/rust/crates/bah:libbah"]`,
-				"edition":         `"2021"`,
-				"crate_features":  `["bah-enabled"]`,
-				"rustc_flags":     `["--cfg=baz"]`,
-			}, android.HostSupported),
-		},
-	},
-	)
-}
diff --git a/bp2build/rust_ffi_conversion_test.go b/bp2build/rust_ffi_conversion_test.go
deleted file mode 100644
index 97fe297..0000000
--- a/bp2build/rust_ffi_conversion_test.go
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2023 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"android/soong/android"
-	"android/soong/rust"
-	"testing"
-)
-
-func runRustFfiTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	RunBp2BuildTestCase(t, registerRustFfiModuleTypes, tc)
-}
-
-func registerRustFfiModuleTypes(ctx android.RegistrationContext) {
-	ctx.RegisterModuleType("rust_ffi_static", rust.RustFFIStaticFactory)
-	ctx.RegisterModuleType("rust_library", rust.RustLibraryFactory)
-}
-
-func TestRustFfiStatic(t *testing.T) {
-	runRustFfiTestCase(t, Bp2buildTestCase{
-		Dir:       "external/rust/crates/foo",
-		Blueprint: "",
-		Filesystem: map[string]string{
-			"external/rust/crates/foo/src/lib.rs":    "",
-			"external/rust/crates/foo/src/helper.rs": "",
-			"external/rust/crates/foo/Android.bp": `
-rust_ffi_static {
-	name: "libfoo",
-	crate_name: "foo",
-	host_supported: true,
-	srcs: ["src/lib.rs"],
-	edition: "2015",
-	include_dirs: [
-		"include",
-	],
-	rustlibs: ["libbar"],
-	bazel_module: { bp2build_available: true },
-}
-`,
-			"external/rust/crates/bar/Android.bp": `
-rust_library {
-	name: "libbar",
-	crate_name: "bar",
-	host_supported: true,
-	srcs: ["src/lib.rs"],
-	bazel_module: { bp2build_available: true },
-}
-`,
-		},
-		ExpectedBazelTargets: []string{
-			MakeBazelTargetNoRestrictions("rust_ffi_static", "libfoo", AttrNameToString{
-				"crate_name": `"foo"`,
-				"deps":       `["//external/rust/crates/bar:libbar"]`,
-				"srcs": `[
-        "src/helper.rs",
-        "src/lib.rs",
-    ]`,
-				"edition":         `"2015"`,
-				"export_includes": `["include"]`,
-			}),
-		},
-	},
-	)
-}
diff --git a/bp2build/rust_library_conversion_test.go b/bp2build/rust_library_conversion_test.go
deleted file mode 100644
index 09fc0ed..0000000
--- a/bp2build/rust_library_conversion_test.go
+++ /dev/null
@@ -1,109 +0,0 @@
-// Copyright 2023 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"android/soong/android"
-	"android/soong/rust"
-	"testing"
-)
-
-func runRustLibraryTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	RunBp2BuildTestCase(t, registerRustLibraryModuleTypes, tc)
-}
-
-func registerRustLibraryModuleTypes(ctx android.RegistrationContext) {
-	ctx.RegisterModuleType("rust_library", rust.RustLibraryFactory)
-	ctx.RegisterModuleType("rust_library_host", rust.RustLibraryHostFactory)
-}
-
-func TestLibProtobuf(t *testing.T) {
-	runRustLibraryTestCase(t, Bp2buildTestCase{
-		Dir:       "external/rust/crates/foo",
-		Blueprint: "",
-		Filesystem: map[string]string{
-			"external/rust/crates/foo/src/lib.rs": "",
-			"external/rust/crates/foo/Android.bp": `
-rust_library_host {
-	name: "libprotobuf",
-	crate_name: "protobuf",
-	srcs: ["src/lib.rs"],
-    bazel_module: { bp2build_available: true },
-}
-`,
-		},
-		ExpectedBazelTargets: []string{
-			// TODO(b/290790800): Remove the restriction when rust toolchain for android is implemented
-			makeBazelTargetHostOrDevice("rust_library", "libprotobuf", AttrNameToString{
-				"crate_name": `"protobuf"`,
-				"srcs":       `["src/lib.rs"]`,
-				"deps":       `[":libprotobuf_build_script"]`,
-			}, android.HostSupported),
-			makeBazelTargetHostOrDevice("cargo_build_script", "libprotobuf_build_script", AttrNameToString{
-				"srcs": `["build.rs"]`,
-			}, android.HostSupported),
-		},
-	},
-	)
-}
-
-func TestRustLibrary(t *testing.T) {
-	expectedAttrs := AttrNameToString{
-		"crate_name": `"foo"`,
-		"srcs": `[
-        "src/helper.rs",
-        "src/lib.rs",
-    ]`,
-		"crate_features": `["bah-enabled"]`,
-		"edition":        `"2021"`,
-		"rustc_flags":    `["--cfg=baz"]`,
-	}
-
-	runRustLibraryTestCase(t, Bp2buildTestCase{
-		Dir:       "external/rust/crates/foo",
-		Blueprint: "",
-		Filesystem: map[string]string{
-			"external/rust/crates/foo/src/lib.rs":    "",
-			"external/rust/crates/foo/src/helper.rs": "",
-			"external/rust/crates/foo/Android.bp": `
-rust_library {
-	name: "libfoo",
-	crate_name: "foo",
-    host_supported: true,
-	srcs: ["src/lib.rs"],
-	edition: "2021",
-	features: ["bah-enabled"],
-	cfgs: ["baz"],
-    bazel_module: { bp2build_available: true },
-}
-rust_library_host {
-    name: "libfoo_host",
-    crate_name: "foo",
-    srcs: ["src/lib.rs"],
-    edition: "2021",
-    features: ["bah-enabled"],
-    cfgs: ["baz"],
-    bazel_module: { bp2build_available: true },
-}
-`,
-		},
-		ExpectedBazelTargets: []string{
-			MakeBazelTargetNoRestrictions("rust_library", "libfoo", expectedAttrs),
-			makeBazelTargetHostOrDevice("rust_library", "libfoo_host", expectedAttrs, android.HostSupported),
-		},
-	},
-	)
-}
diff --git a/bp2build/rust_proc_macro_conversion_test.go b/bp2build/rust_proc_macro_conversion_test.go
deleted file mode 100644
index 7df37ec..0000000
--- a/bp2build/rust_proc_macro_conversion_test.go
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright 2023 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"android/soong/android"
-	"android/soong/rust"
-	"testing"
-)
-
-func rustRustProcMacroTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	RunBp2BuildTestCase(t, registerRustProcMacroModuleTypes, tc)
-}
-
-func registerRustProcMacroModuleTypes(ctx android.RegistrationContext) {
-	ctx.RegisterModuleType("rust_library_host", rust.RustLibraryHostFactory)
-	ctx.RegisterModuleType("rust_proc_macro", rust.ProcMacroFactory)
-}
-
-func TestRustProcMacroLibrary(t *testing.T) {
-	rustRustProcMacroTestCase(t, Bp2buildTestCase{
-		Dir:       "external/rust/crates/foo",
-		Blueprint: "",
-		Filesystem: map[string]string{
-			"external/rust/crates/foo/src/lib.rs":    "",
-			"external/rust/crates/foo/src/helper.rs": "",
-			"external/rust/crates/foo/Android.bp": `
-rust_proc_macro {
-	name: "libfoo",
-	crate_name: "foo",
-	srcs: ["src/lib.rs"],
-	edition: "2021",
-	features: ["bah-enabled"],
-	cfgs: ["baz"],
-	rustlibs: ["libbar"],
-    bazel_module: { bp2build_available: true },
-}
-`,
-			"external/rust/crates/bar/src/lib.rs": "",
-			"external/rust/crates/bar/Android.bp": `
-rust_library_host {
-    name: "libbar",
-    crate_name: "bar",
-    srcs: ["src/lib.rs"],
-    bazel_module: { bp2build_available: true },
-}`,
-		},
-		ExpectedBazelTargets: []string{
-			makeBazelTargetHostOrDevice("rust_proc_macro", "libfoo", AttrNameToString{
-				"crate_name": `"foo"`,
-				"srcs": `[
-        "src/helper.rs",
-        "src/lib.rs",
-    ]`,
-				"crate_features": `["bah-enabled"]`,
-				"edition":        `"2021"`,
-				"rustc_flags":    `["--cfg=baz"]`,
-				"deps":           `["//external/rust/crates/bar:libbar"]`,
-			}, android.HostSupported),
-		},
-	},
-	)
-}
diff --git a/bp2build/rust_protobuf_conversion_test.go b/bp2build/rust_protobuf_conversion_test.go
deleted file mode 100644
index bd4f54b..0000000
--- a/bp2build/rust_protobuf_conversion_test.go
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright 2023 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"android/soong/android"
-	"android/soong/rust"
-	"testing"
-)
-
-func runRustProtobufTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	RunBp2BuildTestCase(t, registerRustProtobufModuleTypes, tc)
-}
-
-func registerRustProtobufModuleTypes(ctx android.RegistrationContext) {
-	ctx.RegisterModuleType("rust_protobuf_host", rust.RustProtobufHostFactory)
-	ctx.RegisterModuleType("rust_protobuf", rust.RustProtobufHostFactory)
-}
-
-func TestRustProtobufHostTestCase(t *testing.T) {
-	runRustProtobufTestCase(t, Bp2buildTestCase{
-		Dir:       "external/rust/crates/foo",
-		Blueprint: "",
-		Filesystem: map[string]string{
-			"external/rust/crates/foo/src/lib.rs":    "",
-			"external/rust/crates/foo/src/helper.rs": "",
-			"external/rust/crates/foo/Android.bp": `
-rust_protobuf_host {
-	name: "libfoo",
-	crate_name: "foo",
-	protos: ["src/foo.proto"],
-    bazel_module: { bp2build_available: true },
-}
-`,
-		},
-		ExpectedBazelTargets: []string{
-			makeBazelTargetHostOrDevice("proto_library", "libfoo_proto", AttrNameToString{
-				"srcs": `["src/foo.proto"]`,
-			}, android.HostSupported),
-			makeBazelTargetHostOrDevice("rust_proto_library", "libfoo", AttrNameToString{
-				"crate_name": `"foo"`,
-				"deps":       `[":libfoo_proto"]`,
-			}, android.HostSupported),
-		},
-	},
-	)
-}
-
-func TestRustProtobufTestCase(t *testing.T) {
-	runRustProtobufTestCase(t, Bp2buildTestCase{
-		Dir:       "external/rust/crates/foo",
-		Blueprint: "",
-		Filesystem: map[string]string{
-			"external/rust/crates/foo/src/lib.rs":    "",
-			"external/rust/crates/foo/src/helper.rs": "",
-			"external/rust/crates/foo/Android.bp": `
-rust_protobuf {
-	name: "libfoo",
-	crate_name: "foo",
-	protos: ["src/foo.proto"],
-    bazel_module: { bp2build_available: true },
-}
-`,
-		},
-		ExpectedBazelTargets: []string{
-			makeBazelTargetHostOrDevice("proto_library", "libfoo_proto", AttrNameToString{
-				"srcs": `["src/foo.proto"]`,
-			}, android.HostSupported),
-			makeBazelTargetHostOrDevice("rust_proto_library", "libfoo", AttrNameToString{
-				"crate_name": `"foo"`,
-				"deps":       `[":libfoo_proto"]`,
-			}, android.HostSupported),
-		},
-	},
-	)
-}
diff --git a/bp2build/sh_conversion_test.go b/bp2build/sh_conversion_test.go
deleted file mode 100644
index 92b3a65..0000000
--- a/bp2build/sh_conversion_test.go
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright 2021 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"testing"
-
-	"android/soong/android"
-	"android/soong/sh"
-)
-
-func TestShBinaryLoadStatement(t *testing.T) {
-	testCases := []struct {
-		bazelTargets           BazelTargets
-		expectedLoadStatements string
-	}{
-		{
-			bazelTargets: BazelTargets{
-				BazelTarget{
-					name:      "sh_binary_target",
-					ruleClass: "sh_binary",
-					// Note: no bzlLoadLocation for native rules
-					// TODO(ruperts): Could open source the existing, experimental Starlark sh_ rules?
-				},
-			},
-			expectedLoadStatements: ``,
-		},
-	}
-
-	for _, testCase := range testCases {
-		actual := testCase.bazelTargets.LoadStatements()
-		expected := testCase.expectedLoadStatements
-		if actual != expected {
-			t.Fatalf("Expected load statements to be %s, got %s", expected, actual)
-		}
-	}
-}
-
-func runShBinaryTestCase(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {}, tc)
-}
-
-func TestShBinarySimple(t *testing.T) {
-	runShBinaryTestCase(t, Bp2buildTestCase{
-		Description:                "sh_binary test",
-		ModuleTypeUnderTest:        "sh_binary",
-		ModuleTypeUnderTestFactory: sh.ShBinaryFactory,
-		Blueprint: `sh_binary {
-    name: "foo",
-    src: "foo.sh",
-    filename: "foo.exe",
-    sub_dir: "sub",
-    bazel_module: { bp2build_available: true },
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("sh_binary", "foo", AttrNameToString{
-				"srcs":     `["foo.sh"]`,
-				"filename": `"foo.exe"`,
-				"sub_dir":  `"sub"`,
-			})},
-	})
-}
-
-func TestShBinaryDefaults(t *testing.T) {
-	runShBinaryTestCase(t, Bp2buildTestCase{
-		Description:                "sh_binary test",
-		ModuleTypeUnderTest:        "sh_binary",
-		ModuleTypeUnderTestFactory: sh.ShBinaryFactory,
-		Blueprint: `sh_binary {
-    name: "foo",
-    src: "foo.sh",
-    bazel_module: { bp2build_available: true },
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("sh_binary", "foo", AttrNameToString{
-				"srcs": `["foo.sh"]`,
-			})},
-	})
-}
diff --git a/bp2build/sh_test_conversion_test.go b/bp2build/sh_test_conversion_test.go
deleted file mode 100644
index 4bea396..0000000
--- a/bp2build/sh_test_conversion_test.go
+++ /dev/null
@@ -1,340 +0,0 @@
-// Copyright 2023 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"testing"
-
-	"android/soong/android"
-	"android/soong/sh"
-)
-
-func TestShTestSimple(t *testing.T) {
-	RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("filegroup", android.FileGroupFactory)
-	}, Bp2buildTestCase{
-		Description:         "sh_test test",
-		ModuleTypeUnderTest: "sh_test",
-		StubbedBuildDefinitions: []string{"android.hardware.bluetooth@1.1-service.sim",
-			"android.hardware.bluetooth@1.1-impl-sim", "libc++", "libcrypto"},
-		ModuleTypeUnderTestFactory: sh.ShTestFactory,
-		Blueprint: simpleModule("filegroup", "android.hardware.bluetooth@1.1-service.sim") +
-			simpleModule("filegroup", "android.hardware.bluetooth@1.1-impl-sim") +
-			simpleModule("filegroup", "libc++") +
-			simpleModule("filegroup", "libcrypto") + `sh_test{
-    name: "sts-rootcanal-sidebins",
-    src: "empty.sh",
-    test_suites: [
-        "sts",
-        "sts-lite",
-    ],
-    data_bins: [
-        "android.hardware.bluetooth@1.1-service.sim",
-        "android.hardware.bluetooth@1.1-impl-sim"
-    ],
-    data: ["android.hardware.bluetooth@1.1-service.sim.rc"],
-    data_libs: ["libc++","libcrypto"],
-		test_config: "art-gtests-target-install-apex.xml",
-		test_config_template: ":art-run-test-target-template",
-		auto_gen_config: false,
-    test_options:{tags: ["no-remote"],
-	},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("sh_test", "sts-rootcanal-sidebins", AttrNameToString{
-				"srcs":    `["empty.sh"]`,
-				"runs_on": `["device"]`,
-				"data": `[
-        "android.hardware.bluetooth@1.1-service.sim.rc",
-        ":android.hardware.bluetooth@1.1-service.sim",
-        ":android.hardware.bluetooth@1.1-impl-sim",
-        ":libc++",
-        ":libcrypto",
-    ]`,
-				"data_bins": `[
-        ":android.hardware.bluetooth@1.1-service.sim",
-        ":android.hardware.bluetooth@1.1-impl-sim",
-    ]`,
-				"tags": `["no-remote"]`,
-			})},
-	})
-}
-
-func TestShTestHostSimple(t *testing.T) {
-	RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("filegroup", android.FileGroupFactory)
-	}, Bp2buildTestCase{
-		Description:         "sh_test_host test",
-		ModuleTypeUnderTest: "sh_test_host",
-		StubbedBuildDefinitions: []string{"android.hardware.bluetooth@1.1-service.sim",
-			"android.hardware.bluetooth@1.1-impl-sim", "libc++", "libcrypto"},
-		ModuleTypeUnderTestFactory: sh.ShTestHostFactory,
-		Blueprint: simpleModule("filegroup", "android.hardware.bluetooth@1.1-service.sim") +
-			simpleModule("filegroup", "android.hardware.bluetooth@1.1-impl-sim") +
-			simpleModule("filegroup", "libc++") +
-			simpleModule("filegroup", "libcrypto") + `sh_test_host{
-    name: "sts-rootcanal-sidebins",
-    src: "empty.sh",
-    test_suites: [
-        "sts",
-        "sts-lite",
-    ],
-    data_bins: [
-        "android.hardware.bluetooth@1.1-service.sim",
-        "android.hardware.bluetooth@1.1-impl-sim"
-    ],
-    data: ["android.hardware.bluetooth@1.1-service.sim.rc"],
-    data_libs: ["libc++","libcrypto"],
-		test_config: "art-gtests-target-install-apex.xml",
-		test_config_template: ":art-run-test-target-template",
-		auto_gen_config: false,
-    test_options:{tags: ["no-remote"],
-	},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("sh_test", "sts-rootcanal-sidebins", AttrNameToString{
-				"srcs":    `["empty.sh"]`,
-				"runs_on": `["host_without_device"]`,
-				"data": `[
-        "android.hardware.bluetooth@1.1-service.sim.rc",
-        ":android.hardware.bluetooth@1.1-service.sim",
-        ":android.hardware.bluetooth@1.1-impl-sim",
-        ":libc++",
-        ":libcrypto",
-    ]`,
-				"data_bins": `[
-        ":android.hardware.bluetooth@1.1-service.sim",
-        ":android.hardware.bluetooth@1.1-impl-sim",
-    ]`,
-				"tags": `["no-remote"]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			})},
-	})
-}
-
-func TestShTestAutogen(t *testing.T) {
-	RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("filegroup", android.FileGroupFactory)
-	}, Bp2buildTestCase{
-		Description:         "sh_test test",
-		ModuleTypeUnderTest: "sh_test",
-		StubbedBuildDefinitions: []string{"android.hardware.bluetooth@1.1-service.sim",
-			"android.hardware.bluetooth@1.1-impl-sim", "libc++", "libcrypto", "art-run-test-target-template"},
-		ModuleTypeUnderTestFactory: sh.ShTestFactory,
-		Blueprint: simpleModule("filegroup", "android.hardware.bluetooth@1.1-service.sim") +
-			simpleModule("filegroup", "android.hardware.bluetooth@1.1-impl-sim") +
-			simpleModule("filegroup", "libc++") +
-			simpleModule("filegroup", "libcrypto") +
-			simpleModule("filegroup", "art-run-test-target-template") + `sh_test{
-    name: "sts-rootcanal-sidebins",
-    src: "empty.sh",
-    test_suites: [
-        "sts",
-        "sts-lite",
-    ],
-    data_bins: [
-        "android.hardware.bluetooth@1.1-service.sim",
-        "android.hardware.bluetooth@1.1-impl-sim"
-    ],
-    data: ["android.hardware.bluetooth@1.1-service.sim.rc"],
-    data_libs: ["libc++","libcrypto"],
-		test_config: "art-gtests-target-install-apex.xml",
-		test_config_template: ":art-run-test-target-template",
-		auto_gen_config: true,
-    test_options:{tags: ["no-remote"],
-	},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("sh_test", "sts-rootcanal-sidebins", AttrNameToString{
-				"srcs":                      `["empty.sh"]`,
-				"runs_on":                   `["device"]`,
-				"auto_generate_test_config": "True",
-				"target_compatible_with":    `["//build/bazel_common_rules/platforms/os:android"]`,
-				"template_test_config":      `":art-run-test-target-template"`,
-				"data": `[
-        "android.hardware.bluetooth@1.1-service.sim.rc",
-        ":android.hardware.bluetooth@1.1-service.sim",
-        ":android.hardware.bluetooth@1.1-impl-sim",
-        ":libc++",
-        ":libcrypto",
-    ]`,
-				"data_bins": `[
-        ":android.hardware.bluetooth@1.1-service.sim",
-        ":android.hardware.bluetooth@1.1-impl-sim",
-    ]`,
-				"tags": `["no-remote"]`,
-			})},
-	})
-}
-
-func TestShTestHostAutogen(t *testing.T) {
-	RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("filegroup", android.FileGroupFactory)
-	}, Bp2buildTestCase{
-		Description:         "sh_test_host test",
-		ModuleTypeUnderTest: "sh_test_host",
-		StubbedBuildDefinitions: []string{"android.hardware.bluetooth@1.1-service.sim",
-			"android.hardware.bluetooth@1.1-impl-sim", "libc++", "libcrypto", "art-run-test-target-template"},
-		ModuleTypeUnderTestFactory: sh.ShTestHostFactory,
-		Blueprint: simpleModule("filegroup", "android.hardware.bluetooth@1.1-service.sim") +
-			simpleModule("filegroup", "android.hardware.bluetooth@1.1-impl-sim") +
-			simpleModule("filegroup", "libc++") +
-			simpleModule("filegroup", "libcrypto") +
-			simpleModule("filegroup", "art-run-test-target-template") + `sh_test_host{
-    name: "sts-rootcanal-sidebins",
-    src: "empty.sh",
-    test_suites: [
-        "sts",
-        "sts-lite",
-    ],
-    data_bins: [
-        "android.hardware.bluetooth@1.1-service.sim",
-        "android.hardware.bluetooth@1.1-impl-sim"
-    ],
-    data: ["android.hardware.bluetooth@1.1-service.sim.rc"],
-    data_libs: ["libc++","libcrypto"],
-		test_config: "art-gtests-target-install-apex.xml",
-		test_config_template: ":art-run-test-target-template",
-		auto_gen_config: true,
-    test_options:{tags: ["no-remote"],
-	},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("sh_test", "sts-rootcanal-sidebins", AttrNameToString{
-				"srcs":                      `["empty.sh"]`,
-				"runs_on":                   `["host_without_device"]`,
-				"auto_generate_test_config": "True",
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-				"template_test_config": `":art-run-test-target-template"`,
-				"data": `[
-        "android.hardware.bluetooth@1.1-service.sim.rc",
-        ":android.hardware.bluetooth@1.1-service.sim",
-        ":android.hardware.bluetooth@1.1-impl-sim",
-        ":libc++",
-        ":libcrypto",
-    ]`,
-				"data_bins": `[
-        ":android.hardware.bluetooth@1.1-service.sim",
-        ":android.hardware.bluetooth@1.1-impl-sim",
-    ]`,
-				"tags": `["no-remote"]`,
-			})},
-	})
-}
-func TestShTestSimpleUnset(t *testing.T) {
-	RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("filegroup", android.FileGroupFactory)
-	}, Bp2buildTestCase{
-		Description:         "sh_test test",
-		ModuleTypeUnderTest: "sh_test",
-		StubbedBuildDefinitions: []string{"android.hardware.bluetooth@1.1-service.sim",
-			"android.hardware.bluetooth@1.1-impl-sim", "libc++", "libcrypto"},
-		ModuleTypeUnderTestFactory: sh.ShTestFactory,
-		Blueprint: simpleModule("filegroup", "android.hardware.bluetooth@1.1-service.sim") +
-			simpleModule("filegroup", "android.hardware.bluetooth@1.1-impl-sim") +
-			simpleModule("filegroup", "libc++") +
-			simpleModule("filegroup", "libcrypto") + `sh_test{
-    name: "sts-rootcanal-sidebins",
-    src: "empty.sh",
-    test_suites: [
-        "sts",
-        "sts-lite",
-    ],
-    data_bins: [
-        "android.hardware.bluetooth@1.1-service.sim",
-        "android.hardware.bluetooth@1.1-impl-sim"
-    ],
-    data: ["android.hardware.bluetooth@1.1-service.sim.rc"],
-    data_libs: ["libc++","libcrypto"],
-    test_options:{tags: ["no-remote"],
-	},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("sh_test", "sts-rootcanal-sidebins", AttrNameToString{
-				"srcs":    `["empty.sh"]`,
-				"runs_on": `["device"]`,
-				"data": `[
-        "android.hardware.bluetooth@1.1-service.sim.rc",
-        ":android.hardware.bluetooth@1.1-service.sim",
-        ":android.hardware.bluetooth@1.1-impl-sim",
-        ":libc++",
-        ":libcrypto",
-    ]`,
-				"data_bins": `[
-        ":android.hardware.bluetooth@1.1-service.sim",
-        ":android.hardware.bluetooth@1.1-impl-sim",
-    ]`,
-				"tags": `["no-remote"]`,
-			})},
-	})
-}
-
-func TestShTestHostSimpleUnset(t *testing.T) {
-	RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {
-		ctx.RegisterModuleType("filegroup", android.FileGroupFactory)
-	}, Bp2buildTestCase{
-		Description:                "sh_test_host test",
-		ModuleTypeUnderTest:        "sh_test_host",
-		ModuleTypeUnderTestFactory: sh.ShTestHostFactory,
-		StubbedBuildDefinitions: []string{"android.hardware.bluetooth@1.1-service.sim",
-			"android.hardware.bluetooth@1.1-impl-sim", "libc++", "libcrypto"},
-		Blueprint: simpleModule("filegroup", "android.hardware.bluetooth@1.1-service.sim") +
-			simpleModule("filegroup", "android.hardware.bluetooth@1.1-impl-sim") +
-			simpleModule("filegroup", "libc++") +
-			simpleModule("filegroup", "libcrypto") + `sh_test_host{
-    name: "sts-rootcanal-sidebins",
-    src: "empty.sh",
-    test_suites: [
-        "sts",
-        "sts-lite",
-    ],
-    data_bins: [
-        "android.hardware.bluetooth@1.1-service.sim",
-        "android.hardware.bluetooth@1.1-impl-sim"
-    ],
-    data: ["android.hardware.bluetooth@1.1-service.sim.rc"],
-    data_libs: ["libc++","libcrypto"],
-    test_options:{tags: ["no-remote"],
-	},
-}`,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("sh_test", "sts-rootcanal-sidebins", AttrNameToString{
-				"srcs":    `["empty.sh"]`,
-				"runs_on": `["host_without_device"]`,
-				"data": `[
-        "android.hardware.bluetooth@1.1-service.sim.rc",
-        ":android.hardware.bluetooth@1.1-service.sim",
-        ":android.hardware.bluetooth@1.1-impl-sim",
-        ":libc++",
-        ":libcrypto",
-    ]`,
-				"data_bins": `[
-        ":android.hardware.bluetooth@1.1-service.sim",
-        ":android.hardware.bluetooth@1.1-impl-sim",
-    ]`,
-				"tags": `["no-remote"]`,
-				"target_compatible_with": `select({
-        "//build/bazel_common_rules/platforms/os:android": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    })`,
-			})},
-	})
-}
diff --git a/bp2build/soong_config_module_type_conversion_test.go b/bp2build/soong_config_module_type_conversion_test.go
deleted file mode 100644
index 2535cf3..0000000
--- a/bp2build/soong_config_module_type_conversion_test.go
+++ /dev/null
@@ -1,1608 +0,0 @@
-// Copyright 2021 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"fmt"
-	"testing"
-
-	"android/soong/android"
-	"android/soong/cc"
-)
-
-func runSoongConfigModuleTypeTest(t *testing.T, tc Bp2buildTestCase) {
-	t.Helper()
-	RunBp2BuildTestCase(t, registerSoongConfigModuleTypes, tc)
-}
-
-func registerSoongConfigModuleTypes(ctx android.RegistrationContext) {
-	cc.RegisterCCBuildComponents(ctx)
-
-	android.RegisterSoongConfigModuleBuildComponents(ctx)
-
-	ctx.RegisterModuleType("cc_library", cc.LibraryFactory)
-	ctx.RegisterModuleType("custom", customModuleFactoryHostAndDevice)
-}
-
-func TestErrorInBpFileDoesNotPanic(t *testing.T) {
-	bp := `
-soong_config_module_type {
-    name: "library_linking_strategy_cc_defaults",
-    module_type: "cc_defaults",
-    config_namespace: "ANDROID",
-    variables: ["library_linking_strategy"],
-    properties: [
-        "shared_libs",
-        "static_libs",
-    ],
-}
-`
-
-	runSoongConfigModuleTypeTest(t, Bp2buildTestCase{
-		Description:                "soong config variables - generates selects for library_linking_strategy",
-		ModuleTypeUnderTest:        "cc_binary",
-		ModuleTypeUnderTestFactory: cc.BinaryFactory,
-		Blueprint:                  bp,
-		ExpectedErr:                fmt.Errorf(`unknown variable "library_linking_strategy" in module type "library_linking_strategy_cc_defaults`),
-	})
-}
-
-func TestSoongConfigModuleType(t *testing.T) {
-	bp := `
-soong_config_module_type {
-	name: "custom_cc_library_static",
-	module_type: "cc_library_static",
-	config_namespace: "acme",
-	bool_variables: ["feature1"],
-	properties: ["cflags"],
-}
-
-custom_cc_library_static {
-	name: "foo",
-	bazel_module: { bp2build_available: true },
-	host_supported: true,
-	soong_config_variables: {
-		feature1: {
-			conditions_default: {
-				cflags: ["-DDEFAULT1"],
-			},
-			cflags: ["-DFEATURE1"],
-		},
-	},
-}
-`
-
-	runSoongConfigModuleTypeTest(t, Bp2buildTestCase{
-		Description:                "soong config variables - soong_config_module_type is supported in bp2build",
-		ModuleTypeUnderTest:        "cc_library_static",
-		ModuleTypeUnderTestFactory: cc.LibraryStaticFactory,
-		Blueprint:                  bp,
-		ExpectedBazelTargets: []string{`cc_library_static(
-    name = "foo",
-    copts = select({
-        "//build/bazel/product_config/config_settings:acme__feature1": ["-DFEATURE1"],
-        "//conditions:default": ["-DDEFAULT1"],
-    }),
-    local_includes = ["."],
-)`}})
-}
-
-func TestSoongConfigModuleTypeImport(t *testing.T) {
-	configBp := `
-soong_config_module_type {
-	name: "custom_cc_library_static",
-	module_type: "cc_library_static",
-	config_namespace: "acme",
-	bool_variables: ["feature1"],
-	properties: ["cflags"],
-}
-`
-	bp := `
-soong_config_module_type_import {
-	from: "foo/bar/SoongConfig.bp",
-	module_types: ["custom_cc_library_static"],
-}
-
-custom_cc_library_static {
-	name: "foo",
-	bazel_module: { bp2build_available: true },
-	host_supported: true,
-	soong_config_variables: {
-		feature1: {
-			conditions_default: {
-				cflags: ["-DDEFAULT1"],
-			},
-			cflags: ["-DFEATURE1"],
-		},
-	},
-}
-`
-
-	runSoongConfigModuleTypeTest(t, Bp2buildTestCase{
-		Description:                "soong config variables - soong_config_module_type_import is supported in bp2build",
-		ModuleTypeUnderTest:        "cc_library_static",
-		ModuleTypeUnderTestFactory: cc.LibraryStaticFactory,
-		Filesystem: map[string]string{
-			"foo/bar/SoongConfig.bp": configBp,
-		},
-		Blueprint: bp,
-		ExpectedBazelTargets: []string{`cc_library_static(
-    name = "foo",
-    copts = select({
-        "//build/bazel/product_config/config_settings:acme__feature1": ["-DFEATURE1"],
-        "//conditions:default": ["-DDEFAULT1"],
-    }),
-    local_includes = ["."],
-)`}})
-}
-
-func TestSoongConfigModuleType_StringVar(t *testing.T) {
-	bp := `
-soong_config_string_variable {
-	name: "board",
-	values: ["soc_a", "soc_b", "soc_c"],
-}
-
-soong_config_module_type {
-	name: "custom_cc_library_static",
-	module_type: "cc_library_static",
-	config_namespace: "acme",
-	variables: ["board"],
-	properties: ["cflags"],
-}
-
-custom_cc_library_static {
-	name: "foo",
-	bazel_module: { bp2build_available: true },
-	host_supported: true,
-	soong_config_variables: {
-		board: {
-			soc_a: {
-				cflags: ["-DSOC_A"],
-			},
-			soc_b: {
-				cflags: ["-DSOC_B"],
-			},
-			soc_c: {},
-			conditions_default: {
-				cflags: ["-DSOC_DEFAULT"]
-			},
-		},
-	},
-}
-`
-
-	runSoongConfigModuleTypeTest(t, Bp2buildTestCase{
-		Description:                "soong config variables - generates selects for string vars",
-		ModuleTypeUnderTest:        "cc_library_static",
-		ModuleTypeUnderTestFactory: cc.LibraryStaticFactory,
-		Blueprint:                  bp,
-		ExpectedBazelTargets: []string{`cc_library_static(
-    name = "foo",
-    copts = select({
-        "//build/bazel/product_config/config_settings:acme__board__soc_a": ["-DSOC_A"],
-        "//build/bazel/product_config/config_settings:acme__board__soc_b": ["-DSOC_B"],
-        "//build/bazel/product_config/config_settings:acme__board__soc_c": [],
-        "//conditions:default": ["-DSOC_DEFAULT"],
-    }),
-    local_includes = ["."],
-)`}})
-}
-
-func TestSoongConfigModuleType_MultipleBoolVar_PartialUseNotPanic(t *testing.T) {
-	bp := `
-soong_config_bool_variable {
-	name: "feature1",
-}
-
-soong_config_bool_variable {
-	name: "feature2",
-}
-
-soong_config_module_type {
-	name: "custom_cc_library_static",
-	module_type: "cc_library_static",
-	config_namespace: "acme",
-	variables: ["feature1", "feature2",],
-	properties: ["cflags"],
-}
-
-custom_cc_library_static {
-	name: "foo",
-	bazel_module: { bp2build_available: true },
-	host_supported: true,
-	soong_config_variables: {
-		feature1: {
-			conditions_default: {
-				cflags: ["-DDEFAULT1"],
-			},
-			cflags: ["-DFEATURE1"],
-		},
-	},
-}`
-
-	runSoongConfigModuleTypeTest(t, Bp2buildTestCase{
-		Description:                "soong config variables - used part of multiple bool variable do not panic",
-		ModuleTypeUnderTest:        "cc_library_static",
-		ModuleTypeUnderTestFactory: cc.LibraryStaticFactory,
-		Blueprint:                  bp,
-		ExpectedBazelTargets: []string{`cc_library_static(
-    name = "foo",
-    copts = select({
-        "//build/bazel/product_config/config_settings:acme__feature1": ["-DFEATURE1"],
-        "//conditions:default": ["-DDEFAULT1"],
-    }),
-    local_includes = ["."],
-)`}})
-}
-
-func TestSoongConfigModuleType_StringAndBoolVar(t *testing.T) {
-	bp := `
-soong_config_bool_variable {
-	name: "feature1",
-}
-
-soong_config_bool_variable {
-	name: "feature2",
-}
-
-soong_config_string_variable {
-	name: "board",
-	values: ["soc_a", "soc_b", "soc_c", "soc_d"],
-}
-
-soong_config_module_type {
-	name: "custom_cc_library_static",
-	module_type: "cc_library_static",
-	config_namespace: "acme",
-	variables: ["feature1", "feature2", "board"],
-	properties: ["cflags"],
-}
-
-custom_cc_library_static {
-	name: "foo",
-	bazel_module: { bp2build_available: true },
-	host_supported: true,
-	soong_config_variables: {
-		feature1: {
-			conditions_default: {
-				cflags: ["-DDEFAULT1"],
-			},
-			cflags: ["-DFEATURE1"],
-		},
-		feature2: {
-			cflags: ["-DFEATURE2"],
-			conditions_default: {
-				cflags: ["-DDEFAULT2"],
-			},
-		},
-		board: {
-			soc_a: {
-				cflags: ["-DSOC_A"],
-			},
-			soc_b: {
-				cflags: ["-DSOC_B"],
-			},
-			soc_c: {},
-			conditions_default: {
-				cflags: ["-DSOC_DEFAULT"]
-			},
-		},
-	},
-}`
-
-	runSoongConfigModuleTypeTest(t, Bp2buildTestCase{
-		Description:                "soong config variables - generates selects for multiple variable types",
-		ModuleTypeUnderTest:        "cc_library_static",
-		ModuleTypeUnderTestFactory: cc.LibraryStaticFactory,
-		Blueprint:                  bp,
-		ExpectedBazelTargets: []string{`cc_library_static(
-    name = "foo",
-    copts = select({
-        "//build/bazel/product_config/config_settings:acme__board__soc_a": ["-DSOC_A"],
-        "//build/bazel/product_config/config_settings:acme__board__soc_b": ["-DSOC_B"],
-        "//build/bazel/product_config/config_settings:acme__board__soc_c": [],
-        "//conditions:default": ["-DSOC_DEFAULT"],
-    }) + select({
-        "//build/bazel/product_config/config_settings:acme__feature1": ["-DFEATURE1"],
-        "//conditions:default": ["-DDEFAULT1"],
-    }) + select({
-        "//build/bazel/product_config/config_settings:acme__feature2": ["-DFEATURE2"],
-        "//conditions:default": ["-DDEFAULT2"],
-    }),
-    local_includes = ["."],
-)`}})
-}
-
-func TestSoongConfigModuleType_StringVar_LabelListDeps(t *testing.T) {
-	bp := `
-soong_config_string_variable {
-	name: "board",
-	values: ["soc_a", "soc_b", "soc_c", "soc_d"],
-}
-
-soong_config_module_type {
-	name: "custom_cc_library_static",
-	module_type: "cc_library_static",
-	config_namespace: "acme",
-	variables: ["board"],
-	properties: ["cflags", "static_libs"],
-}
-
-custom_cc_library_static {
-	name: "foo",
-	bazel_module: { bp2build_available: true },
-	host_supported: true,
-	soong_config_variables: {
-		board: {
-			soc_a: {
-				cflags: ["-DSOC_A"],
-				static_libs: ["soc_a_dep"],
-			},
-			soc_b: {
-				cflags: ["-DSOC_B"],
-				static_libs: ["soc_b_dep"],
-			},
-			soc_c: {},
-			conditions_default: {
-				cflags: ["-DSOC_DEFAULT"],
-				static_libs: ["soc_default_static_dep"],
-			},
-		},
-	},
-}`
-
-	otherDeps := `
-cc_library_static { name: "soc_a_dep"}
-cc_library_static { name: "soc_b_dep"}
-cc_library_static { name: "soc_default_static_dep"}
-`
-
-	runSoongConfigModuleTypeTest(t, Bp2buildTestCase{
-		Description:                "soong config variables - generates selects for label list attributes",
-		ModuleTypeUnderTest:        "cc_library_static",
-		ModuleTypeUnderTestFactory: cc.LibraryStaticFactory,
-		Blueprint:                  bp,
-		Filesystem: map[string]string{
-			"foo/bar/Android.bp": otherDeps,
-		},
-		StubbedBuildDefinitions: []string{"//foo/bar:soc_a_dep", "//foo/bar:soc_b_dep", "//foo/bar:soc_default_static_dep"},
-		ExpectedBazelTargets: []string{`cc_library_static(
-    name = "foo",
-    copts = select({
-        "//build/bazel/product_config/config_settings:acme__board__soc_a": ["-DSOC_A"],
-        "//build/bazel/product_config/config_settings:acme__board__soc_b": ["-DSOC_B"],
-        "//build/bazel/product_config/config_settings:acme__board__soc_c": [],
-        "//conditions:default": ["-DSOC_DEFAULT"],
-    }),
-    implementation_deps = select({
-        "//build/bazel/product_config/config_settings:acme__board__soc_a": ["//foo/bar:soc_a_dep"],
-        "//build/bazel/product_config/config_settings:acme__board__soc_b": ["//foo/bar:soc_b_dep"],
-        "//build/bazel/product_config/config_settings:acme__board__soc_c": [],
-        "//conditions:default": ["//foo/bar:soc_default_static_dep"],
-    }),
-    local_includes = ["."],
-)`}})
-}
-
-func TestSoongConfigModuleType_Defaults_SingleNamespace(t *testing.T) {
-	bp := `
-soong_config_module_type {
-	name: "vendor_foo_cc_defaults",
-	module_type: "cc_defaults",
-	config_namespace: "vendor_foo",
-	bool_variables: ["feature"],
-	properties: ["cflags", "cppflags"],
-}
-
-vendor_foo_cc_defaults {
-	name: "foo_defaults_1",
-	soong_config_variables: {
-		feature: {
-			cflags: ["-cflag_feature_1"],
-			conditions_default: {
-				cflags: ["-cflag_default_1"],
-			},
-		},
-	},
-}
-
-vendor_foo_cc_defaults {
-	name: "foo_defaults_2",
-	defaults: ["foo_defaults_1"],
-	soong_config_variables: {
-		feature: {
-			cflags: ["-cflag_feature_2"],
-			conditions_default: {
-				cflags: ["-cflag_default_2"],
-			},
-		},
-	},
-}
-
-cc_library_static {
-	name: "lib",
-	defaults: ["foo_defaults_2"],
-	bazel_module: { bp2build_available: true },
-	host_supported: true,
-}
-`
-
-	runSoongConfigModuleTypeTest(t, Bp2buildTestCase{
-		Description:                "soong config variables - defaults with a single namespace",
-		ModuleTypeUnderTest:        "cc_library_static",
-		ModuleTypeUnderTestFactory: cc.LibraryStaticFactory,
-		Blueprint:                  bp,
-		ExpectedBazelTargets: []string{`cc_library_static(
-    name = "lib",
-    copts = select({
-        "//build/bazel/product_config/config_settings:vendor_foo__feature": [
-            "-cflag_feature_2",
-            "-cflag_feature_1",
-        ],
-        "//conditions:default": [
-            "-cflag_default_2",
-            "-cflag_default_1",
-        ],
-    }),
-    local_includes = ["."],
-)`}})
-}
-
-func TestSoongConfigModuleType_MultipleDefaults_SingleNamespace(t *testing.T) {
-	bp := `
-soong_config_module_type {
-	name: "foo_cc_defaults",
-	module_type: "cc_defaults",
-	config_namespace: "acme",
-	bool_variables: ["feature"],
-	properties: ["cflags"],
-}
-
-soong_config_module_type {
-	name: "bar_cc_defaults",
-	module_type: "cc_defaults",
-	config_namespace: "acme",
-	bool_variables: ["feature"],
-	properties: ["cflags", "asflags"],
-}
-
-foo_cc_defaults {
-	name: "foo_defaults",
-	soong_config_variables: {
-		feature: {
-			cflags: ["-cflag_foo"],
-			conditions_default: {
-				cflags: ["-cflag_default_foo"],
-			},
-		},
-	},
-}
-
-bar_cc_defaults {
-	name: "bar_defaults",
-	srcs: ["file.S"],
-	soong_config_variables: {
-		feature: {
-			cflags: ["-cflag_bar"],
-			asflags: ["-asflag_bar"],
-			conditions_default: {
-				asflags: ["-asflag_default_bar"],
-				cflags: ["-cflag_default_bar"],
-			},
-		},
-	},
-}
-
-cc_library_static {
-	name: "lib",
-	defaults: ["foo_defaults", "bar_defaults"],
-	bazel_module: { bp2build_available: true },
-	host_supported: true,
-}
-
-cc_library_static {
-	name: "lib2",
-	defaults: ["bar_defaults", "foo_defaults"],
-	bazel_module: { bp2build_available: true },
-	host_supported: true,
-}
-`
-
-	runSoongConfigModuleTypeTest(t, Bp2buildTestCase{
-		Description:                "soong config variables - multiple defaults with a single namespace",
-		ModuleTypeUnderTest:        "cc_library_static",
-		ModuleTypeUnderTestFactory: cc.LibraryStaticFactory,
-		Blueprint:                  bp,
-		ExpectedBazelTargets: []string{`cc_library_static(
-    name = "lib",
-    asflags = select({
-        "//build/bazel/product_config/config_settings:acme__feature": ["-asflag_bar"],
-        "//conditions:default": ["-asflag_default_bar"],
-    }),
-    copts = select({
-        "//build/bazel/product_config/config_settings:acme__feature": [
-            "-cflag_foo",
-            "-cflag_bar",
-        ],
-        "//conditions:default": [
-            "-cflag_default_foo",
-            "-cflag_default_bar",
-        ],
-    }),
-    local_includes = ["."],
-    srcs_as = ["file.S"],
-)`,
-			`cc_library_static(
-    name = "lib2",
-    asflags = select({
-        "//build/bazel/product_config/config_settings:acme__feature": ["-asflag_bar"],
-        "//conditions:default": ["-asflag_default_bar"],
-    }),
-    copts = select({
-        "//build/bazel/product_config/config_settings:acme__feature": [
-            "-cflag_bar",
-            "-cflag_foo",
-        ],
-        "//conditions:default": [
-            "-cflag_default_bar",
-            "-cflag_default_foo",
-        ],
-    }),
-    local_includes = ["."],
-    srcs_as = ["file.S"],
-)`}})
-}
-
-func TestSoongConfigModuleType_Defaults_MultipleNamespaces(t *testing.T) {
-	bp := `
-soong_config_module_type {
-	name: "vendor_foo_cc_defaults",
-	module_type: "cc_defaults",
-	config_namespace: "vendor_foo",
-	bool_variables: ["feature"],
-	properties: ["cflags"],
-}
-
-soong_config_module_type {
-	name: "vendor_bar_cc_defaults",
-	module_type: "cc_defaults",
-	config_namespace: "vendor_bar",
-	bool_variables: ["feature"],
-	properties: ["cflags"],
-}
-
-soong_config_module_type {
-	name: "vendor_qux_cc_defaults",
-	module_type: "cc_defaults",
-	config_namespace: "vendor_qux",
-	bool_variables: ["feature"],
-	properties: ["cflags"],
-}
-
-vendor_foo_cc_defaults {
-	name: "foo_defaults",
-	soong_config_variables: {
-		feature: {
-			cflags: ["-DVENDOR_FOO_FEATURE"],
-			conditions_default: {
-				cflags: ["-DVENDOR_FOO_DEFAULT"],
-			},
-		},
-	},
-}
-
-vendor_bar_cc_defaults {
-	name: "bar_defaults",
-	soong_config_variables: {
-		feature: {
-			cflags: ["-DVENDOR_BAR_FEATURE"],
-			conditions_default: {
-				cflags: ["-DVENDOR_BAR_DEFAULT"],
-			},
-		},
-	},
-}
-
-vendor_qux_cc_defaults {
-	name: "qux_defaults",
-	defaults: ["bar_defaults"],
-	soong_config_variables: {
-		feature: {
-			cflags: ["-DVENDOR_QUX_FEATURE"],
-			conditions_default: {
-				cflags: ["-DVENDOR_QUX_DEFAULT"],
-			},
-		},
-	},
-}
-
-cc_library_static {
-	name: "lib",
-	defaults: ["foo_defaults", "qux_defaults"],
-	bazel_module: { bp2build_available: true },
-	host_supported: true,
-}
-`
-
-	runSoongConfigModuleTypeTest(t, Bp2buildTestCase{
-		Description:                "soong config variables - defaults with multiple namespaces",
-		ModuleTypeUnderTest:        "cc_library_static",
-		ModuleTypeUnderTestFactory: cc.LibraryStaticFactory,
-		Blueprint:                  bp,
-		ExpectedBazelTargets: []string{`cc_library_static(
-    name = "lib",
-    copts = select({
-        "//build/bazel/product_config/config_settings:vendor_bar__feature": ["-DVENDOR_BAR_FEATURE"],
-        "//conditions:default": ["-DVENDOR_BAR_DEFAULT"],
-    }) + select({
-        "//build/bazel/product_config/config_settings:vendor_foo__feature": ["-DVENDOR_FOO_FEATURE"],
-        "//conditions:default": ["-DVENDOR_FOO_DEFAULT"],
-    }) + select({
-        "//build/bazel/product_config/config_settings:vendor_qux__feature": ["-DVENDOR_QUX_FEATURE"],
-        "//conditions:default": ["-DVENDOR_QUX_DEFAULT"],
-    }),
-    local_includes = ["."],
-)`}})
-}
-
-func TestSoongConfigModuleType_Defaults_UseBaselineValueForStringProp(t *testing.T) {
-	bp := `
-soong_config_string_variable {
-    name: "library_linking_strategy",
-    values: [
-        "prefer_static",
-    ],
-}
-
-soong_config_module_type {
-    name: "library_linking_strategy_custom",
-    module_type: "custom",
-    config_namespace: "ANDROID",
-    variables: ["library_linking_strategy"],
-    properties: [
-        "string_literal_prop",
-    ],
-}
-
-library_linking_strategy_custom {
-    name: "foo",
-    string_literal_prop: "29",
-    soong_config_variables: {
-        library_linking_strategy: {
-            prefer_static: {},
-            conditions_default: {
-              string_literal_prop: "30",
-            },
-        },
-    },
-}`
-
-	runSoongConfigModuleTypeTest(t, Bp2buildTestCase{
-		Description:                "soong config variables - generates selects for library_linking_strategy",
-		ModuleTypeUnderTest:        "cc_binary",
-		ModuleTypeUnderTestFactory: cc.BinaryFactory,
-		Blueprint:                  bp,
-		Filesystem:                 map[string]string{},
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("custom", "foo", AttrNameToString{
-				"string_literal_prop": `select({
-        "//build/bazel/product_config/config_settings:android__library_linking_strategy__prefer_static": "29",
-        "//conditions:default": "30",
-    })`,
-			}),
-		},
-	})
-}
-
-func TestSoongConfigModuleType_UnsetConditions(t *testing.T) {
-	bp := `
-soong_config_string_variable {
-    name: "library_linking_strategy",
-    values: [
-        "prefer_static",
-    ],
-}
-
-soong_config_module_type {
-    name: "library_linking_strategy_cc_defaults",
-    module_type: "cc_defaults",
-    config_namespace: "ANDROID",
-    variables: ["library_linking_strategy"],
-    properties: [
-        "shared_libs",
-        "static_libs",
-    ],
-}
-
-library_linking_strategy_cc_defaults {
-    name: "library_linking_strategy_lib_a_defaults",
-    soong_config_variables: {
-        library_linking_strategy: {
-            prefer_static: {},
-            conditions_default: {
-                shared_libs: [
-                    "lib_a",
-                ],
-            },
-        },
-    },
-}
-
-library_linking_strategy_cc_defaults {
-    name: "library_linking_strategy_merged_defaults",
-    defaults: ["library_linking_strategy_lib_a_defaults"],
-    host_supported: true,
-    soong_config_variables: {
-        library_linking_strategy: {
-            prefer_static: {},
-            conditions_default: {
-                shared_libs: [
-                    "lib_b",
-                ],
-            },
-        },
-    },
-}
-
-cc_binary {
-    name: "library_linking_strategy_sample_binary",
-    srcs: ["library_linking_strategy.cc"],
-    defaults: ["library_linking_strategy_merged_defaults"],
-    include_build_directory: false,
-}`
-
-	otherDeps := `
-cc_library { name: "lib_a"}
-cc_library { name: "lib_b"}
-cc_library { name: "lib_default"}
-`
-
-	runSoongConfigModuleTypeTest(t, Bp2buildTestCase{
-		Description:                "soong config variables - generates selects for library_linking_strategy",
-		ModuleTypeUnderTest:        "cc_binary",
-		ModuleTypeUnderTestFactory: cc.BinaryFactory,
-		Blueprint:                  bp,
-		StubbedBuildDefinitions:    []string{"//foo/bar:lib_a", "//foo/bar:lib_b", "//foo/bar:lib_default"},
-		Filesystem: map[string]string{
-			"foo/bar/Android.bp": otherDeps,
-		},
-		ExpectedBazelTargets: []string{`cc_binary(
-    name = "library_linking_strategy_sample_binary",
-    dynamic_deps = select({
-        "//build/bazel/product_config/config_settings:android__library_linking_strategy__prefer_static": [],
-        "//conditions:default": [
-            "//foo/bar:lib_b",
-            "//foo/bar:lib_a",
-        ],
-    }),
-    srcs = ["library_linking_strategy.cc"],
-)`}})
-}
-
-func TestSoongConfigModuleType_UnsetConditionsExcludeLibs(t *testing.T) {
-	bp := `
-soong_config_string_variable {
-    name: "library_linking_strategy",
-    values: [
-        "prefer_static",
-    ],
-}
-
-soong_config_module_type {
-    name: "library_linking_strategy_cc_defaults",
-    module_type: "cc_defaults",
-    config_namespace: "ANDROID",
-    variables: ["library_linking_strategy"],
-    properties: ["shared_libs"],
-}
-
-library_linking_strategy_cc_defaults {
-    name: "library_linking_strategy_lib_a_defaults",
-    soong_config_variables: {
-        library_linking_strategy: {
-            prefer_static: {},
-            conditions_default: {
-                shared_libs: [
-                    "lib_a",
-                ],
-            },
-        },
-    },
-}
-
-library_linking_strategy_cc_defaults {
-    name: "library_linking_strategy_merged_defaults",
-    defaults: ["library_linking_strategy_lib_a_defaults"],
-    host_supported: true,
-    soong_config_variables: {
-        library_linking_strategy: {
-            prefer_static: {},
-            conditions_default: {
-                shared_libs: [
-                    "lib_b",
-                    "lib_c",
-                ],
-            },
-        },
-    },
-    exclude_shared_libs: ["lib_a"],
-}
-
-cc_binary {
-    name: "library_linking_strategy_sample_binary",
-    defaults: ["library_linking_strategy_merged_defaults"],
-    include_build_directory: false,
-}
-
-cc_binary {
-    name: "library_linking_strategy_sample_binary_with_excludes",
-    defaults: ["library_linking_strategy_merged_defaults"],
-    exclude_shared_libs: ["lib_c"],
-    include_build_directory: false,
-}`
-
-	otherDeps := `
-cc_library { name: "lib_a"}
-cc_library { name: "lib_b"}
-cc_library { name: "lib_c"}
-`
-
-	runSoongConfigModuleTypeTest(t, Bp2buildTestCase{
-		Description:                "soong config variables - generates selects for library_linking_strategy",
-		ModuleTypeUnderTest:        "cc_binary",
-		ModuleTypeUnderTestFactory: cc.BinaryFactory,
-		StubbedBuildDefinitions:    []string{"//foo/bar:lib_a", "//foo/bar:lib_b", "//foo/bar:lib_c"},
-		Blueprint:                  bp,
-		Filesystem: map[string]string{
-			"foo/bar/Android.bp": otherDeps,
-		},
-		ExpectedBazelTargets: []string{
-			MakeBazelTargetNoRestrictions("cc_binary", "library_linking_strategy_sample_binary", AttrNameToString{
-				"dynamic_deps": `select({
-        "//build/bazel/product_config/config_settings:android__library_linking_strategy__prefer_static": [],
-        "//conditions:default": [
-            "//foo/bar:lib_b",
-            "//foo/bar:lib_c",
-        ],
-    })`,
-			}),
-			MakeBazelTargetNoRestrictions("cc_binary", "library_linking_strategy_sample_binary_with_excludes", AttrNameToString{
-				"dynamic_deps": `select({
-        "//build/bazel/product_config/config_settings:android__library_linking_strategy__prefer_static": [],
-        "//conditions:default": ["//foo/bar:lib_b"],
-    })`,
-			}),
-		}})
-}
-
-func TestSoongConfigModuleType_Defaults(t *testing.T) {
-	bp := `
-soong_config_string_variable {
-    name: "library_linking_strategy",
-    values: [
-        "prefer_static",
-    ],
-}
-
-soong_config_module_type {
-    name: "library_linking_strategy_cc_defaults",
-    module_type: "cc_defaults",
-    config_namespace: "ANDROID",
-    variables: ["library_linking_strategy"],
-    properties: [
-        "shared_libs",
-        "static_libs",
-    ],
-}
-
-library_linking_strategy_cc_defaults {
-    name: "library_linking_strategy_lib_a_defaults",
-    soong_config_variables: {
-        library_linking_strategy: {
-            prefer_static: {
-                static_libs: [
-                    "lib_a",
-                ],
-            },
-            conditions_default: {
-                shared_libs: [
-                    "lib_a",
-                ],
-            },
-        },
-    },
-}
-
-library_linking_strategy_cc_defaults {
-    name: "library_linking_strategy_merged_defaults",
-    defaults: ["library_linking_strategy_lib_a_defaults"],
-    host_supported: true,
-    soong_config_variables: {
-        library_linking_strategy: {
-            prefer_static: {
-                static_libs: [
-                    "lib_b",
-                ],
-            },
-            conditions_default: {
-                shared_libs: [
-                    "lib_b",
-                ],
-            },
-        },
-    },
-}
-
-cc_binary {
-    name: "library_linking_strategy_sample_binary",
-    srcs: ["library_linking_strategy.cc"],
-    defaults: ["library_linking_strategy_merged_defaults"],
-}`
-
-	otherDeps := `
-cc_library { name: "lib_a"}
-cc_library { name: "lib_b"}
-cc_library { name: "lib_default"}
-`
-
-	runSoongConfigModuleTypeTest(t, Bp2buildTestCase{
-		Description:                "soong config variables - generates selects for library_linking_strategy",
-		ModuleTypeUnderTest:        "cc_binary",
-		ModuleTypeUnderTestFactory: cc.BinaryFactory,
-		Blueprint:                  bp,
-		Filesystem: map[string]string{
-			"foo/bar/Android.bp": otherDeps,
-		},
-		StubbedBuildDefinitions: []string{"//foo/bar:lib_a", "//foo/bar:lib_b", "//foo/bar:lib_default"},
-		ExpectedBazelTargets: []string{`cc_binary(
-    name = "library_linking_strategy_sample_binary",
-    deps = select({
-        "//build/bazel/product_config/config_settings:android__library_linking_strategy__prefer_static": [
-            "//foo/bar:lib_b_bp2build_cc_library_static",
-            "//foo/bar:lib_a_bp2build_cc_library_static",
-        ],
-        "//conditions:default": [],
-    }),
-    dynamic_deps = select({
-        "//build/bazel/product_config/config_settings:android__library_linking_strategy__prefer_static": [],
-        "//conditions:default": [
-            "//foo/bar:lib_b",
-            "//foo/bar:lib_a",
-        ],
-    }),
-    local_includes = ["."],
-    srcs = ["library_linking_strategy.cc"],
-)`}})
-}
-
-func TestSoongConfigModuleType_Defaults_Another(t *testing.T) {
-	bp := `
-soong_config_string_variable {
-    name: "library_linking_strategy",
-    values: [
-        "prefer_static",
-    ],
-}
-
-soong_config_module_type {
-    name: "library_linking_strategy_cc_defaults",
-    module_type: "cc_defaults",
-    config_namespace: "ANDROID",
-    variables: ["library_linking_strategy"],
-    properties: [
-        "shared_libs",
-        "static_libs",
-    ],
-}
-
-library_linking_strategy_cc_defaults {
-    name: "library_linking_strategy_sample_defaults",
-    soong_config_variables: {
-        library_linking_strategy: {
-            prefer_static: {
-                static_libs: [
-                    "lib_a",
-                    "lib_b",
-                ],
-            },
-            conditions_default: {
-                shared_libs: [
-                    "lib_a",
-                    "lib_b",
-                ],
-            },
-        },
-    },
-}
-
-cc_binary {
-    name: "library_linking_strategy_sample_binary",
-    host_supported: true,
-    srcs: ["library_linking_strategy.cc"],
-    defaults: ["library_linking_strategy_sample_defaults"],
-}`
-
-	otherDeps := `
-cc_library { name: "lib_a"}
-cc_library { name: "lib_b"}
-`
-
-	runSoongConfigModuleTypeTest(t, Bp2buildTestCase{
-		Description:                "soong config variables - generates selects for library_linking_strategy",
-		ModuleTypeUnderTest:        "cc_binary",
-		ModuleTypeUnderTestFactory: cc.BinaryFactory,
-		Blueprint:                  bp,
-		StubbedBuildDefinitions:    []string{"//foo/bar:lib_a", "//foo/bar:lib_b"},
-		Filesystem: map[string]string{
-			"foo/bar/Android.bp": otherDeps,
-		},
-		ExpectedBazelTargets: []string{`cc_binary(
-    name = "library_linking_strategy_sample_binary",
-    deps = select({
-        "//build/bazel/product_config/config_settings:android__library_linking_strategy__prefer_static": [
-            "//foo/bar:lib_a_bp2build_cc_library_static",
-            "//foo/bar:lib_b_bp2build_cc_library_static",
-        ],
-        "//conditions:default": [],
-    }),
-    dynamic_deps = select({
-        "//build/bazel/product_config/config_settings:android__library_linking_strategy__prefer_static": [],
-        "//conditions:default": [
-            "//foo/bar:lib_a",
-            "//foo/bar:lib_b",
-        ],
-    }),
-    local_includes = ["."],
-    srcs = ["library_linking_strategy.cc"],
-)`}})
-}
-
-func TestSoongConfigModuleType_Defaults_UnusedProps(t *testing.T) {
-	bp := `
-soong_config_string_variable {
-    name: "alphabet",
-    values: [
-        "a",
-        "b",
-        "c", // unused
-    ],
-}
-
-soong_config_module_type {
-    name: "alphabet_cc_defaults",
-    module_type: "cc_defaults",
-    config_namespace: "ANDROID",
-    variables: ["alphabet"],
-    properties: [
-        "cflags", // unused
-        "shared_libs",
-        "static_libs",
-    ],
-}
-
-alphabet_cc_defaults {
-    name: "alphabet_sample_cc_defaults",
-    soong_config_variables: {
-        alphabet: {
-            a: {
-                shared_libs: [
-                    "lib_a",
-                ],
-            },
-            b: {
-                shared_libs: [
-                    "lib_b",
-                ],
-            },
-            conditions_default: {
-                static_libs: [
-                    "lib_default",
-                ],
-            },
-        },
-    },
-}
-
-cc_binary {
-    name: "alphabet_binary",
-    host_supported: true,
-    srcs: ["main.cc"],
-    defaults: ["alphabet_sample_cc_defaults"],
-}`
-
-	otherDeps := `
-cc_library { name: "lib_a"}
-cc_library { name: "lib_b"}
-cc_library { name: "lib_default"}
-`
-
-	runSoongConfigModuleTypeTest(t, Bp2buildTestCase{
-		Description:                "soong config variables - generates selects for library_linking_strategy",
-		ModuleTypeUnderTest:        "cc_binary",
-		ModuleTypeUnderTestFactory: cc.BinaryFactory,
-		Blueprint:                  bp,
-		Filesystem: map[string]string{
-			"foo/bar/Android.bp": otherDeps,
-		},
-		StubbedBuildDefinitions: []string{"//foo/bar:lib_a", "//foo/bar:lib_b", "//foo/bar:lib_default"},
-		ExpectedBazelTargets: []string{`cc_binary(
-    name = "alphabet_binary",
-    deps = select({
-        "//build/bazel/product_config/config_settings:android__alphabet__a": [],
-        "//build/bazel/product_config/config_settings:android__alphabet__b": [],
-        "//conditions:default": ["//foo/bar:lib_default_bp2build_cc_library_static"],
-    }),
-    dynamic_deps = select({
-        "//build/bazel/product_config/config_settings:android__alphabet__a": ["//foo/bar:lib_a"],
-        "//build/bazel/product_config/config_settings:android__alphabet__b": ["//foo/bar:lib_b"],
-        "//conditions:default": [],
-    }),
-    local_includes = ["."],
-    srcs = ["main.cc"],
-)`}})
-}
-
-func TestSoongConfigModuleType_ProductVariableConfigWithPlatformConfig(t *testing.T) {
-	bp := `
-soong_config_bool_variable {
-    name: "special_build",
-}
-
-soong_config_module_type {
-    name: "alphabet_cc_defaults",
-    module_type: "cc_defaults",
-    config_namespace: "alphabet_module",
-    bool_variables: ["special_build"],
-    properties: ["enabled"],
-}
-
-alphabet_cc_defaults {
-    name: "alphabet_sample_cc_defaults",
-    soong_config_variables: {
-        special_build: {
-            enabled: true,
-        },
-    },
-}
-
-cc_binary {
-    name: "alphabet_binary",
-    srcs: ["main.cc"],
-    host_supported: true,
-    defaults: ["alphabet_sample_cc_defaults"],
-    enabled: false,
-    arch: {
-        x86_64: {
-            enabled: false,
-        },
-    },
-    target: {
-        darwin: {
-            enabled: false,
-        },
-    },
-}`
-
-	runSoongConfigModuleTypeTest(t, Bp2buildTestCase{
-		Description:                "soong config variables - generates selects for library_linking_strategy",
-		ModuleTypeUnderTest:        "cc_binary",
-		ModuleTypeUnderTestFactory: cc.BinaryFactory,
-		Blueprint:                  bp,
-		Filesystem:                 map[string]string{},
-		ExpectedBazelTargets: []string{`cc_binary(
-    name = "alphabet_binary",
-    local_includes = ["."],
-    srcs = ["main.cc"],
-    target_compatible_with = select({
-        "//build/bazel_common_rules/platforms/os_arch:android_x86_64": ["@platforms//:incompatible"],
-        "//build/bazel_common_rules/platforms/os_arch:darwin_arm64": ["@platforms//:incompatible"],
-        "//build/bazel_common_rules/platforms/os_arch:darwin_x86_64": ["@platforms//:incompatible"],
-        "//build/bazel_common_rules/platforms/os_arch:linux_bionic_x86_64": ["@platforms//:incompatible"],
-        "//build/bazel_common_rules/platforms/os_arch:linux_glibc_x86_64": ["@platforms//:incompatible"],
-        "//build/bazel_common_rules/platforms/os_arch:linux_musl_x86_64": ["@platforms//:incompatible"],
-        "//build/bazel_common_rules/platforms/os_arch:windows_x86_64": ["@platforms//:incompatible"],
-        "//conditions:default": [],
-    }) + select({
-        "//build/bazel/product_config/config_settings:alphabet_module__special_build": [],
-        "//conditions:default": ["@platforms//:incompatible"],
-    }),
-)`}})
-}
-
-func TestSoongConfigModuleType_ProductVariableConfigOverridesEnable(t *testing.T) {
-	bp := `
-soong_config_bool_variable {
-    name: "special_build",
-}
-
-soong_config_module_type {
-    name: "alphabet_cc_defaults",
-    module_type: "cc_defaults",
-    config_namespace: "alphabet_module",
-    bool_variables: ["special_build"],
-    properties: ["enabled"],
-}
-
-alphabet_cc_defaults {
-    name: "alphabet_sample_cc_defaults",
-    soong_config_variables: {
-        special_build: {
-            enabled: true,
-        },
-    },
-}
-
-cc_binary {
-    name: "alphabet_binary",
-    srcs: ["main.cc"],
-    defaults: ["alphabet_sample_cc_defaults"],
-    enabled: false,
-}
-
-alphabet_cc_defaults {
-    name: "alphabet_sample_cc_defaults_conditions_default",
-    soong_config_variables: {
-        special_build: {
-		conditions_default: {
-			enabled: false,
-		},
-	},
-    },
-}
-
-cc_binary {
-    name: "alphabet_binary_conditions_default",
-    srcs: ["main.cc"],
-    defaults: ["alphabet_sample_cc_defaults_conditions_default"],
-    enabled: false,
-}`
-
-	runSoongConfigModuleTypeTest(t, Bp2buildTestCase{
-		Description:                "soong config variables - generates selects for library_linking_strategy",
-		ModuleTypeUnderTest:        "cc_binary",
-		ModuleTypeUnderTestFactory: cc.BinaryFactory,
-		Blueprint:                  bp,
-		Filesystem:                 map[string]string{},
-		ExpectedBazelTargets: []string{`cc_binary(
-    name = "alphabet_binary",
-    local_includes = ["."],
-    srcs = ["main.cc"],
-    target_compatible_with = select({
-        "//build/bazel/product_config/config_settings:alphabet_module__special_build": [],
-        "//conditions:default": ["@platforms//:incompatible"],
-    }),
-)`,
-			MakeBazelTarget("cc_binary", "alphabet_binary_conditions_default", AttrNameToString{
-				"local_includes":         `["."]`,
-				"srcs":                   `["main.cc"]`,
-				"target_compatible_with": `["@platforms//:incompatible"]`,
-			}),
-		}})
-}
-
-func TestSoongConfigModuleType_ProductVariableIgnoredIfEnabledByDefault(t *testing.T) {
-	bp := `
-soong_config_bool_variable {
-    name: "special_build",
-}
-
-soong_config_module_type {
-    name: "alphabet_cc_defaults",
-    module_type: "cc_defaults",
-    config_namespace: "alphabet_module",
-    bool_variables: ["special_build"],
-    properties: ["enabled"],
-}
-
-alphabet_cc_defaults {
-    name: "alphabet_sample_cc_defaults",
-    host_supported: true,
-    soong_config_variables: {
-        special_build: {
-            enabled: true,
-        },
-    },
-}
-
-cc_binary {
-    name: "alphabet_binary",
-    srcs: ["main.cc"],
-    defaults: ["alphabet_sample_cc_defaults"],
-}`
-
-	runSoongConfigModuleTypeTest(t, Bp2buildTestCase{
-		Description:                "soong config variables - generates selects for library_linking_strategy",
-		ModuleTypeUnderTest:        "cc_binary",
-		ModuleTypeUnderTestFactory: cc.BinaryFactory,
-		Blueprint:                  bp,
-		Filesystem:                 map[string]string{},
-		ExpectedBazelTargets: []string{`cc_binary(
-    name = "alphabet_binary",
-    local_includes = ["."],
-    srcs = ["main.cc"],
-)`}})
-}
-
-func TestSoongConfigModuleType_CombinedWithArchVariantProperties(t *testing.T) {
-	bp := `
-soong_config_bool_variable {
-    name: "my_bool_variable",
-}
-
-soong_config_string_variable {
-    name: "my_string_variable",
-    values: [
-        "value1",
-        "value2",
-    ],
-}
-
-soong_config_module_type {
-    name: "special_build_cc_defaults",
-    module_type: "cc_defaults",
-    config_namespace: "my_namespace",
-    bool_variables: ["my_bool_variable"],
-    variables: ["my_string_variable"],
-    properties: ["target.android.cflags", "cflags"],
-}
-
-special_build_cc_defaults {
-    name: "sample_cc_defaults",
-    target: {
-        android: {
-            cflags: ["-DFOO"],
-        },
-    },
-    soong_config_variables: {
-        my_bool_variable: {
-            target: {
-                android: {
-                    cflags: ["-DBAR"],
-                },
-            },
-            conditions_default: {
-                target: {
-                    android: {
-                        cflags: ["-DBAZ"],
-                    },
-                },
-            },
-        },
-        my_string_variable: {
-            value1: {
-                cflags: ["-DVALUE1_NOT_ANDROID"],
-                target: {
-                    android: {
-                        cflags: ["-DVALUE1"],
-                    },
-                },
-            },
-            value2: {
-                target: {
-                    android: {
-                        cflags: ["-DVALUE2"],
-                    },
-                },
-            },
-            conditions_default: {
-                target: {
-                    android: {
-                        cflags: ["-DSTRING_VAR_CONDITIONS_DEFAULT"],
-                    },
-                },
-            },
-        },
-    },
-}
-
-cc_binary {
-    name: "my_binary",
-    srcs: ["main.cc"],
-    defaults: ["sample_cc_defaults"],
-}`
-
-	runSoongConfigModuleTypeTest(t, Bp2buildTestCase{
-		Description:                "soong config variables - generates selects for library_linking_strategy",
-		ModuleTypeUnderTest:        "cc_binary",
-		ModuleTypeUnderTestFactory: cc.BinaryFactory,
-		Blueprint:                  bp,
-		Filesystem:                 map[string]string{},
-		ExpectedBazelTargets: []string{`cc_binary(
-    name = "my_binary",
-    copts = select({
-        "//build/bazel_common_rules/platforms/os:android": ["-DFOO"],
-        "//conditions:default": [],
-    }) + select({
-        "//build/bazel/product_config/config_settings:my_namespace__my_bool_variable__android": ["-DBAR"],
-        "//build/bazel/product_config/config_settings:my_namespace__my_bool_variable__conditions_default__android": ["-DBAZ"],
-        "//conditions:default": [],
-    }) + select({
-        "//build/bazel/product_config/config_settings:my_namespace__my_string_variable__value1": ["-DVALUE1_NOT_ANDROID"],
-        "//conditions:default": [],
-    }) + select({
-        "//build/bazel/product_config/config_settings:my_namespace__my_string_variable__conditions_default__android": ["-DSTRING_VAR_CONDITIONS_DEFAULT"],
-        "//build/bazel/product_config/config_settings:my_namespace__my_string_variable__value1__android": ["-DVALUE1"],
-        "//build/bazel/product_config/config_settings:my_namespace__my_string_variable__value2__android": ["-DVALUE2"],
-        "//conditions:default": [],
-    }),
-    local_includes = ["."],
-    srcs = ["main.cc"],
-    target_compatible_with = ["//build/bazel_common_rules/platforms/os:android"],
-)`}})
-}
-
-// If we have
-// A. a soong_config_module_type with target.android_<arch>.* in properties
-// B. a module that uses this module type but does not set target.android_<arch>.* via soong config vars
-// Then we should not panic
-func TestPanicsIfSoongConfigModuleTypeHasArchSpecificProperties(t *testing.T) {
-	commonBp := `
-soong_config_bool_variable {
-	name: "my_bool_variable",
-}
-soong_config_module_type {
-	name: "special_cc_defaults",
-	module_type: "cc_defaults",
-	config_namespace: "my_namespace",
-	bool_variables: ["my_bool_variable"],
-	properties: [
-		"cflags",
-		"target.android_arm64.shared_libs",
-	],
-}
-cc_binary {
-	name: "my_binary",
-	defaults: ["my_special_cc_defaults"],
-}
-`
-	testCases := []struct {
-		desc            string
-		additionalBp    string
-		isPanicExpected bool
-	}{
-		{
-			desc: "target.android_arm64 is not set, bp2build should not panic",
-			additionalBp: `
-special_cc_defaults {
-	name: "my_special_cc_defaults",
-	soong_config_variables: {
-		my_bool_variable: {
-			cflags: ["-DFOO"],
-			conditions_default: {
-				cflags: ["-DBAR"],
-			}
-		}
-	},
-}
-			`,
-			isPanicExpected: false,
-		},
-		{
-			desc: "target.android_arm64 is set using the bool soong config var, bp2build should panic",
-			additionalBp: `
-special_cc_defaults {
-	name: "my_special_cc_defaults",
-	soong_config_variables: {
-		my_bool_variable: {
-			cflags: ["-DFOO"],
-			target: {
-				android_arm64: {
-					shared_libs: ["liblog"],
-				},
-			},
-			conditions_default: {
-				cflags: ["-DBAR"],
-			}
-		}
-	},
-}
-			`,
-			isPanicExpected: true,
-		},
-		{
-			desc: "target.android_arm64 is set using conditions_default for the bool soong config var, bp2build should panic",
-			additionalBp: `
-special_cc_defaults {
-	name: "my_special_cc_defaults",
-	soong_config_variables: {
-		my_bool_variable: {
-			cflags: ["-DFOO"],
-			conditions_default: {
-				cflags: ["-DBAR"],
-				target: {
-					android_arm64: {
-						shared_libs: ["liblog"],
-					},
-				},
-			}
-		}
-	},
-}
-			`,
-			isPanicExpected: true,
-		},
-	}
-	for _, tc := range testCases {
-		bp2buildTestCase := Bp2buildTestCase{
-			Description:                tc.desc,
-			ModuleTypeUnderTest:        "cc_binary",
-			ModuleTypeUnderTestFactory: cc.BinaryFactory,
-			Blueprint:                  commonBp + tc.additionalBp,
-			// Check in `foo` dir so that we can check whether it panics or not and not trip over an empty `ExpectedBazelTargets`
-			Dir:                  "foo",
-			ExpectedBazelTargets: []string{},
-		}
-		if tc.isPanicExpected {
-			bp2buildTestCase.ExpectedErr = fmt.Errorf("TODO: support other target types in soong config variable structs: Android_arm64")
-		}
-		runSoongConfigModuleTypeTest(t, bp2buildTestCase)
-	}
-}
-
-func TestNoPanicIfEnabledIsNotUsed(t *testing.T) {
-	bp := `
-soong_config_string_variable {
-	name: "my_string_variable",
-	values: ["val1", "val2"],
-}
-soong_config_module_type {
-	name: "special_cc_defaults",
-	module_type: "cc_defaults",
-	config_namespace: "my_namespace",
-	variables: ["my_string_variable"],
-	properties: [
-		"cflags",
-		"enabled",
-	],
-}
-special_cc_defaults {
-	name: "my_special_cc_defaults",
-	soong_config_variables: {
-		my_string_variable: {
-			val1: {
-				cflags: ["-DFOO"],
-			},
-			val2: {
-				cflags: ["-DBAR"],
-			},
-		},
-	},
-}
-cc_binary {
-	name: "my_binary",
-	enabled: false,
-	defaults: ["my_special_cc_defaults"],
-}
-`
-	tc := Bp2buildTestCase{
-		Description:                "Soong config vars is not used to set `enabled` property",
-		ModuleTypeUnderTest:        "cc_binary",
-		ModuleTypeUnderTestFactory: cc.BinaryFactory,
-		Blueprint:                  bp,
-		ExpectedBazelTargets: []string{
-			MakeBazelTarget("cc_binary", "my_binary", AttrNameToString{
-				"copts": `select({
-        "//build/bazel/product_config/config_settings:my_namespace__my_string_variable__val1": ["-DFOO"],
-        "//build/bazel/product_config/config_settings:my_namespace__my_string_variable__val2": ["-DBAR"],
-        "//conditions:default": [],
-    })`,
-				"local_includes":         `["."]`,
-				"target_compatible_with": `["@platforms//:incompatible"]`,
-			}),
-		},
-	}
-	runSoongConfigModuleTypeTest(t, tc)
-}
diff --git a/bpf/bpf.go b/bpf/bpf.go
index 8c0d28b..ce57b46 100644
--- a/bpf/bpf.go
+++ b/bpf/bpf.go
@@ -22,8 +22,6 @@
 	"strings"
 
 	"android/soong/android"
-	"android/soong/bazel"
-	"android/soong/bazel/cquery"
 	"android/soong/cc"
 
 	"github.com/google/blueprint"
@@ -98,7 +96,6 @@
 
 type bpf struct {
 	android.ModuleBase
-	android.BazelModuleBase
 
 	properties BpfProperties
 
@@ -245,35 +242,6 @@
 	}
 }
 
-var _ android.MixedBuildBuildable = (*bpf)(nil)
-
-func (bpf *bpf) IsMixedBuildSupported(ctx android.BaseModuleContext) bool {
-	return true
-}
-
-func (bpf *bpf) QueueBazelCall(ctx android.BaseModuleContext) {
-	bazelCtx := ctx.Config().BazelContext
-	bazelCtx.QueueBazelRequest(
-		bpf.GetBazelLabel(ctx, bpf),
-		cquery.GetOutputFiles,
-		android.GetConfigKey(ctx))
-}
-
-func (bpf *bpf) ProcessBazelQueryResponse(ctx android.ModuleContext) {
-	bazelCtx := ctx.Config().BazelContext
-	objPaths, err := bazelCtx.GetOutputFiles(bpf.GetBazelLabel(ctx, bpf), android.GetConfigKey(ctx))
-	if err != nil {
-		ctx.ModuleErrorf(err.Error())
-		return
-	}
-
-	bazelOuts := android.Paths{}
-	for _, p := range objPaths {
-		bazelOuts = append(bazelOuts, android.PathForBazelOut(ctx, p))
-	}
-	bpf.objs = bazelOuts
-}
-
 // Implements OutputFileFileProducer interface so that the obj output can be used in the data property
 // of other modules.
 func (bpf *bpf) OutputFiles(tag string) (android.Paths, error) {
@@ -297,39 +265,5 @@
 	module.AddProperties(&module.properties)
 
 	android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibCommon)
-	android.InitBazelModule(module)
 	return module
 }
-
-type bazelBpfAttributes struct {
-	Srcs              bazel.LabelListAttribute
-	Copts             bazel.StringListAttribute
-	Absolute_includes bazel.StringListAttribute
-	Btf               *bool
-	// TODO(b/249528391): Add support for sub_dir
-}
-
-// bpf bp2build converter
-func (b *bpf) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	if ctx.ModuleType() != "bpf" {
-		return
-	}
-
-	srcs := bazel.MakeLabelListAttribute(android.BazelLabelForModuleSrc(ctx, b.properties.Srcs))
-	copts := bazel.MakeStringListAttribute(b.properties.Cflags)
-	absolute_includes := bazel.MakeStringListAttribute(b.properties.Include_dirs)
-	btf := b.properties.Btf
-
-	attrs := bazelBpfAttributes{
-		Srcs:              srcs,
-		Copts:             copts,
-		Absolute_includes: absolute_includes,
-		Btf:               btf,
-	}
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "bpf",
-		Bzl_load_location: "//build/bazel/rules/bpf:bpf.bzl",
-	}
-
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: b.Name()}, &attrs)
-}
diff --git a/bpf/bpf_test.go b/bpf/bpf_test.go
index a2010ff..6e39096 100644
--- a/bpf/bpf_test.go
+++ b/bpf/bpf_test.go
@@ -71,26 +71,3 @@
 		`\QAndroid.bp:2:3: module "bpf_invalid_name.o" variant "android_common": invalid character '_' in source name\E`)).
 		RunTestWithBp(t, bp)
 }
-
-func TestBpfWithBazel(t *testing.T) {
-	bp := `
-		bpf {
-			name: "bpf.o",
-			srcs: ["bpf.c"],
-			bazel_module: { label: "//bpf" },
-		}
-	`
-
-	result := android.GroupFixturePreparers(
-		prepareForBpfTest, android.FixtureModifyConfig(func(config android.Config) {
-			config.BazelContext = android.MockBazelContext{
-				OutputBaseDir: "outputbase",
-				LabelToOutputFiles: map[string][]string{
-					"//bpf": []string{"bpf.o"}}}
-		})).RunTestWithBp(t, bp)
-
-	output := result.Module("bpf.o", "android_common").(*bpf)
-
-	expectedOutputFiles := []string{"outputbase/execroot/__main__/bpf.o"}
-	android.AssertDeepEquals(t, "output files", expectedOutputFiles, output.objs.Strings())
-}
diff --git a/cc/Android.bp b/cc/Android.bp
index 351f3f6..9e4b763 100644
--- a/cc/Android.bp
+++ b/cc/Android.bp
@@ -12,14 +12,12 @@
         "soong-aconfig",
         "soong-aidl-library",
         "soong-android",
-        "soong-bazel",
         "soong-cc-config",
         "soong-etc",
         "soong-fuzz",
         "soong-genrule",
         "soong-multitree",
         "soong-snapshot",
-        "soong-sysprop-bp2build",
         "soong-testing",
         "soong-tradefed",
     ],
@@ -28,7 +26,6 @@
         "fdo_profile.go",
         "androidmk.go",
         "api_level.go",
-        "bp2build.go",
         "builder.go",
         "cc.go",
         "ccdeps.go",
diff --git a/cc/afdo.go b/cc/afdo.go
index e7dea0e..bad16a1 100644
--- a/cc/afdo.go
+++ b/cc/afdo.go
@@ -24,16 +24,6 @@
 	"github.com/google/blueprint/proptools"
 )
 
-// TODO(b/267229066): Remove globalAfdoProfileProjects after implementing bp2build converter for fdo_profile
-var (
-	globalAfdoProfileProjects = []string{
-		"vendor/google_data/pgo_profile/sampling/",
-		"toolchain/pgo-profiles/sampling/",
-	}
-)
-
-var afdoProfileProjectsConfigKey = android.NewOnceKey("AfdoProfileProjects")
-
 // This flag needs to be in both CFlags and LdFlags to ensure correct symbol ordering
 const afdoFlagsFormat = "-fprofile-sample-use=%s -fprofile-sample-accurate"
 
diff --git a/cc/binary.go b/cc/binary.go
index 0f05605..ebe672b 100644
--- a/cc/binary.go
+++ b/cc/binary.go
@@ -17,13 +17,8 @@
 import (
 	"path/filepath"
 
-	"android/soong/bazel/cquery"
-
-	"github.com/google/blueprint"
-	"github.com/google/blueprint/proptools"
-
 	"android/soong/android"
-	"android/soong/bazel"
+	"github.com/google/blueprint"
 )
 
 type BinaryLinkerProperties struct {
@@ -71,14 +66,13 @@
 
 // cc_binary produces a binary that is runnable on a device.
 func BinaryFactory() android.Module {
-	module, _ := newBinary(android.HostAndDeviceSupported, true)
-	module.bazelHandler = &ccBinaryBazelHandler{module: module}
+	module, _ := newBinary(android.HostAndDeviceSupported)
 	return module.Init()
 }
 
 // cc_binary_host produces a binary that is runnable on a host.
 func BinaryHostFactory() android.Module {
-	module, _ := newBinary(android.HostSupported, true)
+	module, _ := newBinary(android.HostSupported)
 	return module.Init()
 }
 
@@ -196,10 +190,10 @@
 // Individual module implementations which comprise a C++ binary should call this function,
 // set some fields on the result, and then call the Init function.
 func NewBinary(hod android.HostOrDeviceSupported) (*Module, *binaryDecorator) {
-	return newBinary(hod, true)
+	return newBinary(hod)
 }
 
-func newBinary(hod android.HostOrDeviceSupported, bazelable bool) (*Module, *binaryDecorator) {
+func newBinary(hod android.HostOrDeviceSupported) (*Module, *binaryDecorator) {
 	module := newModule(hod, android.MultilibFirst)
 	binary := &binaryDecorator{
 		baseLinker:    NewBaseLinker(module.sanitize),
@@ -208,7 +202,6 @@
 	module.compiler = NewBaseCompiler()
 	module.linker = binary
 	module.installer = binary
-	module.bazelable = bazelable
 
 	// Allow module to be added as member of an sdk/module_exports.
 	module.sdkMemberTypes = []android.SdkMemberType{
@@ -568,149 +561,3 @@
 		},
 	})
 }
-
-type ccBinaryBazelHandler struct {
-	module *Module
-}
-
-var _ BazelHandler = (*ccBinaryBazelHandler)(nil)
-
-func (handler *ccBinaryBazelHandler) QueueBazelCall(ctx android.BaseModuleContext, label string) {
-	bazelCtx := ctx.Config().BazelContext
-	bazelCtx.QueueBazelRequest(label, cquery.GetCcUnstrippedInfo, android.GetConfigKeyApexVariant(ctx, GetApexConfigKey(ctx)))
-}
-
-func (handler *ccBinaryBazelHandler) ProcessBazelQueryResponse(ctx android.ModuleContext, label string) {
-	bazelCtx := ctx.Config().BazelContext
-	info, err := bazelCtx.GetCcUnstrippedInfo(label, android.GetConfigKeyApexVariant(ctx, GetApexConfigKey(ctx)))
-	if err != nil {
-		ctx.ModuleErrorf(err.Error())
-		return
-	}
-
-	var outputFilePath android.Path = android.PathForBazelOut(ctx, info.OutputFile)
-	if len(info.TidyFiles) > 0 {
-		handler.module.tidyFiles = android.PathsForBazelOut(ctx, info.TidyFiles)
-		outputFilePath = android.AttachValidationActions(ctx, outputFilePath, handler.module.tidyFiles)
-	}
-	handler.module.outputFile = android.OptionalPathForPath(outputFilePath)
-	handler.module.linker.(*binaryDecorator).unstrippedOutputFile = android.PathForBazelOut(ctx, info.UnstrippedOutput)
-
-	handler.module.setAndroidMkVariablesFromCquery(info.CcAndroidMkInfo)
-}
-
-func binaryBp2buildAttrs(ctx android.Bp2buildMutatorContext, m *Module) binaryAttributes {
-	baseAttrs := bp2BuildParseBaseProps(ctx, m)
-	binaryLinkerAttrs := bp2buildBinaryLinkerProps(ctx, m)
-
-	if proptools.BoolDefault(binaryLinkerAttrs.Linkshared, true) {
-		baseAttrs.implementationDynamicDeps.Add(baseAttrs.protoDependency)
-	} else {
-		baseAttrs.implementationDeps.Add(baseAttrs.protoDependency)
-	}
-
-	// binaries don't have implementation_whole_archive_deps
-	baseAttrs.wholeArchiveDeps.Append(baseAttrs.implementationWholeArchiveDeps)
-
-	attrs := binaryAttributes{
-		binaryLinkerAttrs: binaryLinkerAttrs,
-
-		Srcs:    baseAttrs.srcs,
-		Srcs_c:  baseAttrs.cSrcs,
-		Srcs_as: baseAttrs.asSrcs,
-
-		Copts:      baseAttrs.copts,
-		Cppflags:   baseAttrs.cppFlags,
-		Conlyflags: baseAttrs.conlyFlags,
-		Asflags:    baseAttrs.asFlags,
-
-		Deps:               baseAttrs.implementationDeps,
-		Dynamic_deps:       baseAttrs.implementationDynamicDeps,
-		Whole_archive_deps: baseAttrs.wholeArchiveDeps,
-		System_deps:        baseAttrs.systemDynamicDeps,
-		Runtime_deps:       baseAttrs.runtimeDeps,
-
-		Local_includes:    baseAttrs.localIncludes,
-		Absolute_includes: baseAttrs.absoluteIncludes,
-		Linkopts:          baseAttrs.linkopts,
-		Use_version_lib:   baseAttrs.useVersionLib,
-		Rtti:              baseAttrs.rtti,
-		Stl:               baseAttrs.stl,
-		Cpp_std:           baseAttrs.cppStd,
-
-		Additional_linker_inputs:   baseAttrs.additionalLinkerInputs,
-		Additional_compiler_inputs: baseAttrs.additionalCompilerInputs,
-
-		Strip: stripAttributes{
-			Keep_symbols:                 baseAttrs.stripKeepSymbols,
-			Keep_symbols_and_debug_frame: baseAttrs.stripKeepSymbolsAndDebugFrame,
-			Keep_symbols_list:            baseAttrs.stripKeepSymbolsList,
-			All:                          baseAttrs.stripAll,
-			None:                         baseAttrs.stripNone,
-		},
-
-		Features: baseAttrs.features,
-
-		SdkAttributes: Bp2BuildParseSdkAttributes(m),
-
-		Native_coverage: baseAttrs.Native_coverage,
-	}
-
-	m.convertTidyAttributes(ctx, &attrs.tidyAttributes)
-
-	return attrs
-}
-
-func binaryBp2build(ctx android.Bp2buildMutatorContext, m *Module) {
-	// shared with cc_test
-	binaryAttrs := binaryBp2buildAttrs(ctx, m)
-
-	tags := android.ApexAvailableTagsWithoutTestApexes(ctx, m)
-	ctx.CreateBazelTargetModule(bazel.BazelTargetModuleProperties{
-		Rule_class:        "cc_binary",
-		Bzl_load_location: "//build/bazel/rules/cc:cc_binary.bzl",
-	},
-		android.CommonAttributes{Name: m.Name(), Tags: tags},
-		&binaryAttrs)
-}
-
-// binaryAttributes contains Bazel attributes corresponding to a cc binary
-type binaryAttributes struct {
-	binaryLinkerAttrs
-	Srcs    bazel.LabelListAttribute
-	Srcs_c  bazel.LabelListAttribute
-	Srcs_as bazel.LabelListAttribute
-
-	Copts                      bazel.StringListAttribute
-	Cppflags                   bazel.StringListAttribute
-	Conlyflags                 bazel.StringListAttribute
-	Asflags                    bazel.StringListAttribute
-	Additional_compiler_inputs bazel.LabelListAttribute
-
-	Deps               bazel.LabelListAttribute
-	Dynamic_deps       bazel.LabelListAttribute
-	Whole_archive_deps bazel.LabelListAttribute
-	System_deps        bazel.LabelListAttribute
-	Runtime_deps       bazel.LabelListAttribute
-
-	Local_includes    bazel.StringListAttribute
-	Absolute_includes bazel.StringListAttribute
-
-	Linkopts                 bazel.StringListAttribute
-	Additional_linker_inputs bazel.LabelListAttribute
-	Use_version_lib          bazel.BoolAttribute
-
-	Rtti    bazel.BoolAttribute
-	Stl     *string
-	Cpp_std *string
-
-	Strip stripAttributes
-
-	Features bazel.StringListAttribute
-
-	SdkAttributes
-
-	tidyAttributes
-
-	Native_coverage *bool
-}
diff --git a/cc/binary_test.go b/cc/binary_test.go
index 2fac002..3e18940 100644
--- a/cc/binary_test.go
+++ b/cc/binary_test.go
@@ -17,89 +17,9 @@
 import (
 	"testing"
 
-	"android/soong/bazel/cquery"
-
 	"android/soong/android"
 )
 
-func TestCcBinaryWithBazel(t *testing.T) {
-	t.Parallel()
-	bp := `
-cc_binary {
-	name: "foo",
-	srcs: ["foo.cc"],
-	bazel_module: { label: "//foo/bar:bar" },
-}`
-	config := TestConfig(t.TempDir(), android.Android, nil, bp, nil)
-	config.BazelContext = android.MockBazelContext{
-		OutputBaseDir: "outputbase",
-		LabelToCcBinary: map[string]cquery.CcUnstrippedInfo{
-			"//foo/bar:bar": cquery.CcUnstrippedInfo{
-				OutputFile:       "foo",
-				UnstrippedOutput: "foo.unstripped",
-			},
-		},
-	}
-	ctx := testCcWithConfig(t, config)
-
-	binMod := ctx.ModuleForTests("foo", "android_arm64_armv8-a").Module()
-	producer := binMod.(android.OutputFileProducer)
-	outputFiles, err := producer.OutputFiles("")
-	if err != nil {
-		t.Errorf("Unexpected error getting cc_binary outputfiles %s", err)
-	}
-	expectedOutputFiles := []string{"outputbase/execroot/__main__/foo"}
-	android.AssertDeepEquals(t, "output files", expectedOutputFiles, outputFiles.Strings())
-
-	unStrippedFilePath := binMod.(*Module).UnstrippedOutputFile()
-	expectedUnStrippedFile := "outputbase/execroot/__main__/foo.unstripped"
-	android.AssertStringEquals(t, "Unstripped output file", expectedUnStrippedFile, unStrippedFilePath.String())
-
-	entries := android.AndroidMkEntriesForTest(t, ctx, binMod)[0]
-	android.AssertStringEquals(t, "unexpected LOCAL_SOONG_MODULE_TYPE", "cc_binary", entries.EntryMap["LOCAL_SOONG_MODULE_TYPE"][0])
-}
-
-func TestCcBinaryWithBazelValidations(t *testing.T) {
-	t.Parallel()
-	bp := `
-cc_binary {
-	name: "foo",
-	srcs: ["foo.cc"],
-	bazel_module: { label: "//foo/bar:bar" },
-	tidy: true,
-}`
-	config := TestConfig(t.TempDir(), android.Android, nil, bp, nil)
-	config.BazelContext = android.MockBazelContext{
-		OutputBaseDir: "outputbase",
-		LabelToCcBinary: map[string]cquery.CcUnstrippedInfo{
-			"//foo/bar:bar": cquery.CcUnstrippedInfo{
-				OutputFile:       "foo",
-				UnstrippedOutput: "foo.unstripped",
-				TidyFiles:        []string{"foo.c.tidy"},
-			},
-		},
-	}
-	ctx := android.GroupFixturePreparers(
-		prepareForCcTest,
-		android.FixtureMergeEnv(map[string]string{
-			"ALLOW_LOCAL_TIDY_TRUE": "1",
-		}),
-	).RunTestWithConfig(t, config).TestContext
-
-	binMod := ctx.ModuleForTests("foo", "android_arm64_armv8-a").Module()
-	producer := binMod.(android.OutputFileProducer)
-	outputFiles, err := producer.OutputFiles("")
-	if err != nil {
-		t.Errorf("Unexpected error getting cc_binary outputfiles %s", err)
-	}
-	expectedOutputFiles := []string{"out/soong/.intermediates/foo/android_arm64_armv8-a/validated/foo"}
-	android.AssertPathsRelativeToTopEquals(t, "output files", expectedOutputFiles, outputFiles)
-
-	unStrippedFilePath := binMod.(*Module).UnstrippedOutputFile()
-	expectedUnStrippedFile := "outputbase/execroot/__main__/foo.unstripped"
-	android.AssertStringEquals(t, "Unstripped output file", expectedUnStrippedFile, unStrippedFilePath.String())
-}
-
 func TestBinaryLinkerScripts(t *testing.T) {
 	t.Parallel()
 	result := PrepareForIntegrationTestWithCc.RunTestWithBp(t, `
diff --git a/cc/bp2build.go b/cc/bp2build.go
deleted file mode 100644
index 919b4d4..0000000
--- a/cc/bp2build.go
+++ /dev/null
@@ -1,2127 +0,0 @@
-// Copyright 2021 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//	http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-package cc
-
-import (
-	"fmt"
-	"path/filepath"
-	"strings"
-	"sync"
-
-	"android/soong/android"
-	"android/soong/bazel"
-	"android/soong/cc/config"
-	"android/soong/genrule"
-
-	"github.com/google/blueprint"
-
-	"github.com/google/blueprint/proptools"
-)
-
-const (
-	cSrcPartition       = "c"
-	asSrcPartition      = "as"
-	asmSrcPartition     = "asm"
-	lSrcPartition       = "l"
-	llSrcPartition      = "ll"
-	cppSrcPartition     = "cpp"
-	protoSrcPartition   = "proto"
-	aidlSrcPartition    = "aidl"
-	syspropSrcPartition = "sysprop"
-
-	yaccSrcPartition = "yacc"
-
-	rScriptSrcPartition = "renderScript"
-
-	xsdSrcPartition = "xsd"
-
-	genrulePartition = "genrule"
-
-	protoFromGenPartition = "proto_gen"
-
-	hdrPartition = "hdr"
-
-	stubsSuffix = "_stub_libs_current"
-)
-
-// staticOrSharedAttributes are the Bazel-ified versions of StaticOrSharedProperties --
-// properties which apply to either the shared or static version of a cc_library module.
-type staticOrSharedAttributes struct {
-	Srcs      bazel.LabelListAttribute
-	Srcs_c    bazel.LabelListAttribute
-	Srcs_as   bazel.LabelListAttribute
-	Srcs_aidl bazel.LabelListAttribute
-	Hdrs      bazel.LabelListAttribute
-	Copts     bazel.StringListAttribute
-
-	Additional_compiler_inputs bazel.LabelListAttribute
-
-	Deps                              bazel.LabelListAttribute
-	Implementation_deps               bazel.LabelListAttribute
-	Dynamic_deps                      bazel.LabelListAttribute
-	Implementation_dynamic_deps       bazel.LabelListAttribute
-	Whole_archive_deps                bazel.LabelListAttribute
-	Implementation_whole_archive_deps bazel.LabelListAttribute
-	Runtime_deps                      bazel.LabelListAttribute
-
-	System_dynamic_deps bazel.LabelListAttribute
-
-	Enabled bazel.BoolAttribute
-
-	Native_coverage *bool
-
-	Apex_available []string
-
-	Features bazel.StringListAttribute
-
-	SdkAttributes
-
-	tidyAttributes
-}
-
-type tidyAttributes struct {
-	Tidy                  *string
-	Tidy_flags            []string
-	Tidy_checks           []string
-	Tidy_checks_as_errors []string
-	Tidy_disabled_srcs    bazel.LabelListAttribute
-	Tidy_timeout_srcs     bazel.LabelListAttribute
-}
-
-func (m *Module) convertTidyAttributes(ctx android.Bp2buildMutatorContext, moduleAttrs *tidyAttributes) {
-	for _, f := range m.features {
-		if tidy, ok := f.(*tidyFeature); ok {
-			var tidyAttr *string
-			if tidy.Properties.Tidy != nil {
-				if *tidy.Properties.Tidy {
-					tidyAttr = proptools.StringPtr("local")
-				} else {
-					tidyAttr = proptools.StringPtr("never")
-				}
-			}
-			moduleAttrs.Tidy = tidyAttr
-			moduleAttrs.Tidy_flags = tidy.Properties.Tidy_flags
-			moduleAttrs.Tidy_checks = tidy.Properties.Tidy_checks
-			moduleAttrs.Tidy_checks_as_errors = tidy.Properties.Tidy_checks_as_errors
-		}
-
-	}
-	archVariantProps := m.GetArchVariantProperties(ctx, &BaseCompilerProperties{})
-	for axis, configToProps := range archVariantProps {
-		for cfg, _props := range configToProps {
-			if archProps, ok := _props.(*BaseCompilerProperties); ok {
-				archDisabledSrcs := android.BazelLabelForModuleSrc(ctx, archProps.Tidy_disabled_srcs)
-				moduleAttrs.Tidy_disabled_srcs.SetSelectValue(axis, cfg, archDisabledSrcs)
-				archTimeoutSrcs := android.BazelLabelForModuleSrc(ctx, archProps.Tidy_timeout_srcs)
-				moduleAttrs.Tidy_timeout_srcs.SetSelectValue(axis, cfg, archTimeoutSrcs)
-			}
-		}
-	}
-}
-
-// Returns an unchanged label and a bool indicating whether the dep is a genrule that produces .proto files
-func protoFromGenPartitionMapper(pathCtx android.BazelConversionContext) bazel.LabelMapper {
-	return func(ctx bazel.OtherModuleContext, label bazel.Label) (string, bool) {
-		mod, exists := ctx.ModuleFromName(label.OriginalModuleName)
-		if !exists {
-			return label.Label, false
-		}
-		gen, isGen := mod.(*genrule.Module)
-		if !isGen {
-			return label.Label, false
-		}
-		if containsProto(ctx, gen.RawOutputFiles(pathCtx)) {
-			// Return unmodified label + true
-			// True will ensure that this module gets dropped from `srcs` of the generated cc_* target. `srcs` is reserved for .cpp files
-			return label.Label, true
-		}
-		return label.Label, false
-	}
-}
-
-// Returns true if srcs contains only .proto files
-// Raises an exception if there is a combination of .proto and non .proto srcs
-func containsProto(ctx bazel.OtherModuleContext, srcs []string) bool {
-	onlyProtos := false
-	for _, src := range srcs {
-		if strings.HasSuffix(src, ".proto") {
-			onlyProtos = true
-		} else if onlyProtos {
-			// This is not a proto file, and we have encountered a .proto file previously
-			ctx.ModuleErrorf("TOOD: Add bp2build support combination of .proto and non .proto files in outs of genrule")
-		}
-	}
-	return onlyProtos
-}
-
-// groupSrcsByExtension partitions `srcs` into groups based on file extension.
-func groupSrcsByExtension(ctx android.BazelConversionPathContext, srcs bazel.LabelListAttribute) bazel.PartitionToLabelListAttribute {
-	// Convert filegroup dependencies into extension-specific filegroups filtered in the filegroup.bzl
-	// macro.
-	addSuffixForFilegroup := func(suffix string) bazel.LabelMapper {
-		return func(otherModuleCtx bazel.OtherModuleContext, label bazel.Label) (string, bool) {
-
-			m, exists := otherModuleCtx.ModuleFromName(label.OriginalModuleName)
-			labelStr := label.Label
-			if !exists || !android.IsFilegroup(otherModuleCtx, m) {
-				return labelStr, false
-			}
-			// If the filegroup is already converted to aidl_library or proto_library,
-			// skip creating _c_srcs, _as_srcs, _cpp_srcs filegroups
-			fg, _ := m.(android.FileGroupAsLibrary)
-			if fg.ShouldConvertToAidlLibrary(ctx) || fg.ShouldConvertToProtoLibrary(ctx) {
-				return labelStr, false
-			}
-			return labelStr + suffix, true
-		}
-	}
-
-	// TODO(b/190006308): Handle language detection of sources in a Bazel rule.
-	labels := bazel.LabelPartitions{
-		protoSrcPartition: android.ProtoSrcLabelPartition,
-		cSrcPartition:     bazel.LabelPartition{Extensions: []string{".c"}, LabelMapper: addSuffixForFilegroup("_c_srcs")},
-		asSrcPartition:    bazel.LabelPartition{Extensions: []string{".s", ".S"}, LabelMapper: addSuffixForFilegroup("_as_srcs")},
-		asmSrcPartition:   bazel.LabelPartition{Extensions: []string{".asm"}},
-		aidlSrcPartition:  android.AidlSrcLabelPartition,
-		// TODO(http://b/231968910): If there is ever a filegroup target that
-		// 		contains .l or .ll files we will need to find a way to add a
-		// 		LabelMapper for these that identifies these filegroups and
-		//		converts them appropriately
-		lSrcPartition:         bazel.LabelPartition{Extensions: []string{".l"}},
-		llSrcPartition:        bazel.LabelPartition{Extensions: []string{".ll"}},
-		rScriptSrcPartition:   bazel.LabelPartition{Extensions: []string{".fs", ".rscript"}},
-		xsdSrcPartition:       bazel.LabelPartition{LabelMapper: android.XsdLabelMapper(xsdConfigCppTarget)},
-		protoFromGenPartition: bazel.LabelPartition{LabelMapper: protoFromGenPartitionMapper(ctx)},
-		// C++ is the "catch-all" group, and comprises generated sources because we don't
-		// know the language of these sources until the genrule is executed.
-		cppSrcPartition:     bazel.LabelPartition{Extensions: []string{".cpp", ".cc", ".cxx", ".mm"}, LabelMapper: addSuffixForFilegroup("_cpp_srcs"), Keep_remainder: true},
-		syspropSrcPartition: bazel.LabelPartition{Extensions: []string{".sysprop"}},
-		yaccSrcPartition:    bazel.LabelPartition{Extensions: []string{".y", "yy"}},
-	}
-
-	return bazel.PartitionLabelListAttribute(ctx, &srcs, labels)
-}
-
-func partitionHeaders(ctx android.BazelConversionPathContext, hdrs bazel.LabelListAttribute) bazel.PartitionToLabelListAttribute {
-	labels := bazel.LabelPartitions{
-		xsdSrcPartition:  bazel.LabelPartition{LabelMapper: android.XsdLabelMapper(xsdConfigCppTarget)},
-		genrulePartition: bazel.LabelPartition{LabelMapper: genrule.GenruleCcHeaderLabelMapper},
-		hdrPartition:     bazel.LabelPartition{Keep_remainder: true},
-	}
-	return bazel.PartitionLabelListAttribute(ctx, &hdrs, labels)
-}
-
-// bp2BuildParseLibProps returns the attributes for a variant of a cc_library.
-func bp2BuildParseLibProps(ctx android.Bp2buildMutatorContext, module *Module, isStatic bool) staticOrSharedAttributes {
-	lib, ok := module.compiler.(*libraryDecorator)
-	if !ok {
-		return staticOrSharedAttributes{}
-	}
-	return bp2buildParseStaticOrSharedProps(ctx, module, lib, isStatic)
-}
-
-// bp2buildParseSharedProps returns the attributes for the shared variant of a cc_library.
-func bp2BuildParseSharedProps(ctx android.Bp2buildMutatorContext, module *Module) staticOrSharedAttributes {
-	return bp2BuildParseLibProps(ctx, module, false)
-}
-
-// bp2buildParseStaticProps returns the attributes for the static variant of a cc_library.
-func bp2BuildParseStaticProps(ctx android.Bp2buildMutatorContext, module *Module) staticOrSharedAttributes {
-	return bp2BuildParseLibProps(ctx, module, true)
-}
-
-type depsPartition struct {
-	export         bazel.LabelList
-	implementation bazel.LabelList
-}
-
-type bazelLabelForDepsFn func(android.Bp2buildMutatorContext, []string) bazel.LabelList
-
-func maybePartitionExportedAndImplementationsDeps(ctx android.Bp2buildMutatorContext, exportsDeps bool, allDeps, exportedDeps []string, fn bazelLabelForDepsFn) depsPartition {
-	if !exportsDeps {
-		return depsPartition{
-			implementation: fn(ctx, allDeps),
-		}
-	}
-
-	implementation, export := android.FilterList(allDeps, exportedDeps)
-
-	return depsPartition{
-		export:         fn(ctx, export),
-		implementation: fn(ctx, implementation),
-	}
-}
-
-type bazelLabelForDepsExcludesFn func(android.Bp2buildMutatorContext, []string, []string) bazel.LabelList
-
-func maybePartitionExportedAndImplementationsDepsExcludes(ctx android.Bp2buildMutatorContext, exportsDeps bool, allDeps, excludes, exportedDeps []string, fn bazelLabelForDepsExcludesFn) depsPartition {
-	if !exportsDeps {
-		return depsPartition{
-			implementation: fn(ctx, allDeps, excludes),
-		}
-	}
-	implementation, export := android.FilterList(allDeps, exportedDeps)
-
-	return depsPartition{
-		export:         fn(ctx, export, excludes),
-		implementation: fn(ctx, implementation, excludes),
-	}
-}
-
-func bp2BuildPropParseHelper(ctx android.ArchVariantContext, module *Module, propsType interface{}, parseFunc func(axis bazel.ConfigurationAxis, config string, props interface{})) {
-	for axis, configToProps := range module.GetArchVariantProperties(ctx, propsType) {
-		for cfg, props := range configToProps {
-			parseFunc(axis, cfg, props)
-		}
-	}
-}
-
-// Parses properties common to static and shared libraries. Also used for prebuilt libraries.
-func bp2buildParseStaticOrSharedProps(ctx android.Bp2buildMutatorContext, module *Module, lib *libraryDecorator, isStatic bool) staticOrSharedAttributes {
-	attrs := staticOrSharedAttributes{}
-
-	setAttrs := func(axis bazel.ConfigurationAxis, config string, props StaticOrSharedProperties) {
-		attrs.Copts.SetSelectValue(axis, config, parseCommandLineFlags(props.Cflags, filterOutStdFlag, filterOutHiddenVisibility))
-		attrs.Srcs.SetSelectValue(axis, config, android.BazelLabelForModuleSrc(ctx, props.Srcs))
-		attrs.System_dynamic_deps.SetSelectValue(axis, config, bazelLabelForSharedDeps(ctx, props.System_shared_libs))
-
-		staticDeps := maybePartitionExportedAndImplementationsDeps(ctx, true, props.Static_libs, props.Export_static_lib_headers, bazelLabelForStaticDeps)
-		attrs.Deps.SetSelectValue(axis, config, staticDeps.export)
-		attrs.Implementation_deps.SetSelectValue(axis, config, staticDeps.implementation)
-
-		sharedDeps := maybePartitionExportedAndImplementationsDeps(ctx, true, props.Shared_libs, props.Export_shared_lib_headers, bazelLabelForSharedDeps)
-		attrs.Dynamic_deps.SetSelectValue(axis, config, sharedDeps.export)
-		attrs.Implementation_dynamic_deps.SetSelectValue(axis, config, sharedDeps.implementation)
-
-		attrs.Whole_archive_deps.SetSelectValue(axis, config, bazelLabelForWholeDeps(ctx, props.Whole_static_libs))
-		attrs.Enabled.SetSelectValue(axis, config, props.Enabled)
-	}
-	// system_dynamic_deps distinguishes between nil/empty list behavior:
-	//    nil -> use default values
-	//    empty list -> no values specified
-	attrs.System_dynamic_deps.ForceSpecifyEmptyList = true
-
-	var apexAvailable []string
-	if isStatic {
-		apexAvailable = lib.StaticProperties.Static.Apex_available
-		bp2BuildPropParseHelper(ctx, module, &StaticProperties{}, func(axis bazel.ConfigurationAxis, config string, props interface{}) {
-			if staticOrSharedProps, ok := props.(*StaticProperties); ok {
-				setAttrs(axis, config, staticOrSharedProps.Static)
-			}
-		})
-	} else {
-		apexAvailable = lib.SharedProperties.Shared.Apex_available
-		bp2BuildPropParseHelper(ctx, module, &SharedProperties{}, func(axis bazel.ConfigurationAxis, config string, props interface{}) {
-			if staticOrSharedProps, ok := props.(*SharedProperties); ok {
-				setAttrs(axis, config, staticOrSharedProps.Shared)
-			}
-		})
-	}
-
-	partitionedSrcs := groupSrcsByExtension(ctx, attrs.Srcs)
-	attrs.Srcs = partitionedSrcs[cppSrcPartition]
-	attrs.Srcs_c = partitionedSrcs[cSrcPartition]
-	attrs.Srcs_as = partitionedSrcs[asSrcPartition]
-
-	attrs.Apex_available = android.ConvertApexAvailableToTagsWithoutTestApexes(ctx, apexAvailable)
-
-	attrs.Features.Append(convertHiddenVisibilityToFeatureStaticOrShared(ctx, module, isStatic))
-
-	if !partitionedSrcs[protoSrcPartition].IsEmpty() {
-		// TODO(b/208815215): determine whether this is used and add support if necessary
-		ctx.ModuleErrorf("Migrating static/shared only proto srcs is not currently supported")
-	}
-
-	return attrs
-}
-
-// Convenience struct to hold all attributes parsed from prebuilt properties.
-type prebuiltAttributes struct {
-	Src     bazel.LabelAttribute
-	Enabled bazel.BoolAttribute
-}
-
-func parseSrc(ctx android.Bp2buildMutatorContext, srcLabelAttribute *bazel.LabelAttribute, axis bazel.ConfigurationAxis, config string, srcs []string) {
-	srcFileError := func() {
-		ctx.ModuleErrorf("parseSrc: Expected at most one source file for %s %s\n", axis, config)
-	}
-	if len(srcs) > 1 {
-		srcFileError()
-		return
-	} else if len(srcs) == 0 {
-		return
-	}
-	if srcLabelAttribute.SelectValue(axis, config) != nil {
-		srcFileError()
-		return
-	}
-	srcLabelAttribute.SetSelectValue(axis, config, android.BazelLabelForModuleSrcSingle(ctx, srcs[0]))
-}
-
-// NOTE: Used outside of Soong repo project, in the clangprebuilts.go bootstrap_go_package
-func Bp2BuildParsePrebuiltLibraryProps(ctx android.Bp2buildMutatorContext, module *Module, isStatic bool) prebuiltAttributes {
-
-	var srcLabelAttribute bazel.LabelAttribute
-	bp2BuildPropParseHelper(ctx, module, &prebuiltLinkerProperties{}, func(axis bazel.ConfigurationAxis, config string, props interface{}) {
-		if prebuiltLinkerProperties, ok := props.(*prebuiltLinkerProperties); ok {
-			parseSrc(ctx, &srcLabelAttribute, axis, config, prebuiltLinkerProperties.Srcs)
-		}
-	})
-
-	var enabledLabelAttribute bazel.BoolAttribute
-	parseAttrs := func(axis bazel.ConfigurationAxis, config string, props StaticOrSharedProperties) {
-		if props.Enabled != nil {
-			enabledLabelAttribute.SetSelectValue(axis, config, props.Enabled)
-		}
-		parseSrc(ctx, &srcLabelAttribute, axis, config, props.Srcs)
-	}
-
-	if isStatic {
-		bp2BuildPropParseHelper(ctx, module, &StaticProperties{}, func(axis bazel.ConfigurationAxis, config string, props interface{}) {
-			if staticProperties, ok := props.(*StaticProperties); ok {
-				parseAttrs(axis, config, staticProperties.Static)
-			}
-		})
-	} else {
-		bp2BuildPropParseHelper(ctx, module, &SharedProperties{}, func(axis bazel.ConfigurationAxis, config string, props interface{}) {
-			if sharedProperties, ok := props.(*SharedProperties); ok {
-				parseAttrs(axis, config, sharedProperties.Shared)
-			}
-		})
-	}
-
-	return prebuiltAttributes{
-		Src:     srcLabelAttribute,
-		Enabled: enabledLabelAttribute,
-	}
-}
-
-func bp2BuildParsePrebuiltBinaryProps(ctx android.Bp2buildMutatorContext, module *Module) prebuiltAttributes {
-	var srcLabelAttribute bazel.LabelAttribute
-	bp2BuildPropParseHelper(ctx, module, &prebuiltLinkerProperties{}, func(axis bazel.ConfigurationAxis, config string, props interface{}) {
-		if props, ok := props.(*prebuiltLinkerProperties); ok {
-			parseSrc(ctx, &srcLabelAttribute, axis, config, props.Srcs)
-		}
-	})
-
-	return prebuiltAttributes{
-		Src: srcLabelAttribute,
-	}
-}
-
-func bp2BuildParsePrebuiltObjectProps(ctx android.Bp2buildMutatorContext, module *Module) prebuiltAttributes {
-	var srcLabelAttribute bazel.LabelAttribute
-	bp2BuildPropParseHelper(ctx, module, &prebuiltObjectProperties{}, func(axis bazel.ConfigurationAxis, config string, props interface{}) {
-		if props, ok := props.(*prebuiltObjectProperties); ok {
-			parseSrc(ctx, &srcLabelAttribute, axis, config, props.Srcs)
-		}
-	})
-
-	return prebuiltAttributes{
-		Src: srcLabelAttribute,
-	}
-}
-
-type baseAttributes struct {
-	compilerAttributes
-	linkerAttributes
-
-	// A combination of compilerAttributes.features and linkerAttributes.features, as well as sanitizer features
-	features        bazel.StringListAttribute
-	protoDependency *bazel.LabelAttribute
-	aidlDependency  *bazel.LabelAttribute
-	Native_coverage *bool
-}
-
-// Convenience struct to hold all attributes parsed from compiler properties.
-type compilerAttributes struct {
-	// Options for all languages
-	copts bazel.StringListAttribute
-	// Assembly options and sources
-	asFlags bazel.StringListAttribute
-	asSrcs  bazel.LabelListAttribute
-	asmSrcs bazel.LabelListAttribute
-	// C options and sources
-	conlyFlags bazel.StringListAttribute
-	cSrcs      bazel.LabelListAttribute
-	// C++ options and sources
-	cppFlags bazel.StringListAttribute
-	srcs     bazel.LabelListAttribute
-
-	// xsd config sources
-	xsdSrcs       bazel.LabelListAttribute
-	exportXsdSrcs bazel.LabelListAttribute
-
-	// genrule headers
-	genruleHeaders       bazel.LabelListAttribute
-	exportGenruleHeaders bazel.LabelListAttribute
-
-	// Lex sources and options
-	lSrcs   bazel.LabelListAttribute
-	llSrcs  bazel.LabelListAttribute
-	lexopts bazel.StringListAttribute
-
-	// Sysprop sources
-	syspropSrcs bazel.LabelListAttribute
-
-	// Yacc sources
-	yaccSrc               *bazel.LabelAttribute
-	yaccFlags             bazel.StringListAttribute
-	yaccGenLocationHeader bazel.BoolAttribute
-	yaccGenPositionHeader bazel.BoolAttribute
-
-	rsSrcs bazel.LabelListAttribute
-
-	hdrs bazel.LabelListAttribute
-
-	rtti bazel.BoolAttribute
-
-	// Not affected by arch variants
-	stl    *string
-	cStd   *string
-	cppStd *string
-
-	localIncludes    bazel.StringListAttribute
-	absoluteIncludes bazel.StringListAttribute
-
-	includes BazelIncludes
-
-	protoSrcs   bazel.LabelListAttribute
-	aidlSrcs    bazel.LabelListAttribute
-	rscriptSrcs bazel.LabelListAttribute
-
-	stubsSymbolFile *string
-	stubsVersions   bazel.StringListAttribute
-
-	features bazel.StringListAttribute
-
-	stem   bazel.StringAttribute
-	suffix bazel.StringAttribute
-
-	fdoProfile bazel.LabelAttribute
-
-	additionalCompilerInputs bazel.LabelListAttribute
-}
-
-type filterOutFn func(string) bool
-
-// filterOutHiddenVisibility removes the flag specifying hidden visibility as
-// this flag is converted to a toolchain feature
-func filterOutHiddenVisibility(flag string) bool {
-	return flag == config.VisibilityHiddenFlag
-}
-
-func filterOutStdFlag(flag string) bool {
-	return strings.HasPrefix(flag, "-std=")
-}
-
-func filterOutClangUnknownCflags(flag string) bool {
-	for _, f := range config.ClangUnknownCflags {
-		if f == flag {
-			return true
-		}
-	}
-	return false
-}
-
-func parseCommandLineFlags(soongFlags []string, filterOut ...filterOutFn) []string {
-	var result []string
-	for _, flag := range soongFlags {
-		skipFlag := false
-		for _, filter := range filterOut {
-			if filter != nil && filter(flag) {
-				skipFlag = true
-			}
-		}
-		if skipFlag {
-			continue
-		}
-		// Soong's cflags can contain spaces, like `-include header.h`. For
-		// Bazel's copts, split them up to be compatible with the
-		// no_copts_tokenization feature.
-		result = append(result, strings.Split(flag, " ")...)
-	}
-	return result
-}
-
-func (ca *compilerAttributes) bp2buildForAxisAndConfig(ctx android.Bp2buildMutatorContext, axis bazel.ConfigurationAxis, config string, props *BaseCompilerProperties) {
-	// If there's arch specific srcs or exclude_srcs, generate a select entry for it.
-	// TODO(b/186153868): do this for OS specific srcs and exclude_srcs too.
-	srcsList, ok := parseSrcs(ctx, props)
-
-	if ok {
-		ca.srcs.SetSelectValue(axis, config, srcsList)
-	}
-
-	localIncludeDirs := props.Local_include_dirs
-	if axis == bazel.NoConfigAxis {
-		ca.cStd, ca.cppStd = bp2buildResolveCppStdValue(props.C_std, props.Cpp_std, props.Gnu_extensions)
-		if includeBuildDirectory(props.Include_build_directory) {
-			localIncludeDirs = append(localIncludeDirs, ".")
-		}
-	}
-
-	ca.absoluteIncludes.SetSelectValue(axis, config, props.Include_dirs)
-	ca.localIncludes.SetSelectValue(axis, config, localIncludeDirs)
-
-	instructionSet := proptools.StringDefault(props.Instruction_set, "")
-	if instructionSet == "arm" {
-		ca.features.SetSelectValue(axis, config, []string{"arm_isa_arm"})
-	} else if instructionSet != "" && instructionSet != "thumb" {
-		ctx.ModuleErrorf("Unknown value for instruction_set: %s", instructionSet)
-	}
-
-	// In Soong, cflags occur on the command line before -std=<val> flag, resulting in the value being
-	// overridden. In Bazel we always allow overriding, via flags; however, this can cause
-	// incompatibilities, so we remove "-std=" flags from Cflag properties while leaving it in other
-	// cases.
-	ca.copts.SetSelectValue(axis, config, parseCommandLineFlags(props.Cflags, filterOutStdFlag, filterOutClangUnknownCflags, filterOutHiddenVisibility))
-	ca.asFlags.SetSelectValue(axis, config, parseCommandLineFlags(props.Asflags, nil))
-	ca.conlyFlags.SetSelectValue(axis, config, parseCommandLineFlags(props.Conlyflags, filterOutClangUnknownCflags))
-	ca.cppFlags.SetSelectValue(axis, config, parseCommandLineFlags(props.Cppflags, filterOutClangUnknownCflags))
-	ca.rtti.SetSelectValue(axis, config, props.Rtti)
-}
-
-func (ca *compilerAttributes) convertStlProps(ctx android.ArchVariantContext, module *Module) {
-	bp2BuildPropParseHelper(ctx, module, &StlProperties{}, func(axis bazel.ConfigurationAxis, config string, props interface{}) {
-		if stlProps, ok := props.(*StlProperties); ok {
-			if stlProps.Stl == nil {
-				return
-			}
-			if ca.stl == nil {
-				stl := deduplicateStlInput(*stlProps.Stl)
-				ca.stl = &stl
-			} else if ca.stl != stlProps.Stl {
-				ctx.ModuleErrorf("Unsupported conversion: module with different stl for different variants: %s and %s", *ca.stl, stlProps.Stl)
-			}
-		}
-	})
-}
-
-func (ca *compilerAttributes) convertProductVariables(ctx android.BazelConversionPathContext, productVariableProps android.ProductConfigProperties) {
-	productVarPropNameToAttribute := map[string]*bazel.StringListAttribute{
-		"Cflags":   &ca.copts,
-		"Asflags":  &ca.asFlags,
-		"Cppflags": &ca.cppFlags,
-	}
-	for propName, attr := range productVarPropNameToAttribute {
-		if productConfigProps, exists := productVariableProps[propName]; exists {
-			for productConfigProp, prop := range productConfigProps {
-				flags, ok := prop.([]string)
-				if !ok {
-					ctx.ModuleErrorf("Could not convert product variable %s property", proptools.PropertyNameForField(propName))
-				}
-				newFlags, _ := bazel.TryVariableSubstitutions(flags, productConfigProp.Name())
-				attr.SetSelectValue(productConfigProp.ConfigurationAxis(), productConfigProp.SelectKey(), newFlags)
-			}
-		}
-	}
-}
-
-func (ca *compilerAttributes) finalize(ctx android.BazelConversionPathContext, implementationHdrs, exportHdrs bazel.LabelListAttribute) {
-	ca.srcs.ResolveExcludes()
-	partitionedSrcs := groupSrcsByExtension(ctx, ca.srcs)
-	partitionedImplHdrs := partitionHeaders(ctx, implementationHdrs)
-	partitionedHdrs := partitionHeaders(ctx, exportHdrs)
-
-	ca.protoSrcs = partitionedSrcs[protoSrcPartition]
-	ca.protoSrcs.Append(partitionedSrcs[protoFromGenPartition])
-	ca.aidlSrcs = partitionedSrcs[aidlSrcPartition]
-
-	for p, lla := range partitionedSrcs {
-		// if there are no sources, there is no need for headers
-		if lla.IsEmpty() {
-			continue
-		}
-		lla.Append(partitionedImplHdrs[hdrPartition])
-		partitionedSrcs[p] = lla
-	}
-
-	ca.hdrs = partitionedHdrs[hdrPartition]
-
-	ca.includesFromHeaders(ctx, partitionedImplHdrs[hdrPartition], partitionedHdrs[hdrPartition])
-
-	xsdSrcs := bazel.SubtractBazelLabelListAttribute(partitionedSrcs[xsdSrcPartition], partitionedHdrs[xsdSrcPartition])
-	xsdSrcs.Append(partitionedImplHdrs[xsdSrcPartition])
-	ca.exportXsdSrcs = partitionedHdrs[xsdSrcPartition]
-	ca.xsdSrcs = bazel.FirstUniqueBazelLabelListAttribute(xsdSrcs)
-
-	ca.genruleHeaders = partitionedImplHdrs[genrulePartition]
-	ca.exportGenruleHeaders = partitionedHdrs[genrulePartition]
-
-	ca.srcs = partitionedSrcs[cppSrcPartition]
-	ca.cSrcs = partitionedSrcs[cSrcPartition]
-	ca.asSrcs = partitionedSrcs[asSrcPartition]
-	ca.asmSrcs = partitionedSrcs[asmSrcPartition]
-	ca.lSrcs = partitionedSrcs[lSrcPartition]
-	ca.llSrcs = partitionedSrcs[llSrcPartition]
-	if yacc := partitionedSrcs[yaccSrcPartition]; !yacc.IsEmpty() {
-		if len(yacc.Value.Includes) > 1 {
-			ctx.PropertyErrorf("srcs", "Found multiple yacc (.y/.yy) files in library")
-		}
-		ca.yaccSrc = bazel.MakeLabelAttribute(yacc.Value.Includes[0].Label)
-	}
-	ca.syspropSrcs = partitionedSrcs[syspropSrcPartition]
-	ca.rscriptSrcs = partitionedSrcs[rScriptSrcPartition]
-
-	ca.absoluteIncludes.DeduplicateAxesFromBase()
-	ca.localIncludes.DeduplicateAxesFromBase()
-}
-
-// Parse srcs from an arch or OS's props value.
-func parseSrcs(ctx android.Bp2buildMutatorContext, props *BaseCompilerProperties) (bazel.LabelList, bool) {
-	anySrcs := false
-	// Add srcs-like dependencies such as generated files.
-	// First create a LabelList containing these dependencies, then merge the values with srcs.
-	genSrcs := props.Generated_sources
-	generatedSrcsLabelList := android.BazelLabelForModuleDepsExcludes(ctx, genSrcs, props.Exclude_generated_sources)
-	if len(props.Generated_sources) > 0 || len(props.Exclude_generated_sources) > 0 {
-		anySrcs = true
-	}
-
-	allSrcsLabelList := android.BazelLabelForModuleSrcExcludes(ctx, props.Srcs, props.Exclude_srcs)
-
-	if len(props.Srcs) > 0 || len(props.Exclude_srcs) > 0 {
-		anySrcs = true
-	}
-
-	return bazel.AppendBazelLabelLists(allSrcsLabelList, generatedSrcsLabelList), anySrcs
-}
-
-func bp2buildStdVal(std *string, prefix string, useGnu bool) *string {
-	defaultVal := prefix + "_std_default"
-	// If c{,pp}std properties are not specified, don't generate them in the BUILD file.
-	// Defaults are handled by the toolchain definition.
-	// However, if gnu_extensions is false, then the default gnu-to-c version must be specified.
-	stdVal := proptools.StringDefault(std, defaultVal)
-	if stdVal == "experimental" || stdVal == defaultVal {
-		if stdVal == "experimental" {
-			stdVal = prefix + "_std_experimental"
-		}
-		if !useGnu {
-			stdVal += "_no_gnu"
-		}
-	} else if !useGnu {
-		stdVal = gnuToCReplacer.Replace(stdVal)
-	}
-
-	if stdVal == defaultVal {
-		return nil
-	}
-	return &stdVal
-}
-
-func bp2buildResolveCppStdValue(c_std *string, cpp_std *string, gnu_extensions *bool) (*string, *string) {
-	useGnu := useGnuExtensions(gnu_extensions)
-
-	return bp2buildStdVal(c_std, "c", useGnu), bp2buildStdVal(cpp_std, "cpp", useGnu)
-}
-
-// packageFromLabel extracts package from a fully-qualified or relative Label and whether the label
-// is fully-qualified.
-// e.g. fully-qualified "//a/b:foo" -> "a/b", true, relative: ":bar" -> ".", false
-func packageFromLabel(label string) (string, bool) {
-	split := strings.Split(label, ":")
-	if len(split) != 2 {
-		return "", false
-	}
-	if split[0] == "" {
-		return ".", false
-	}
-	// remove leading "//"
-	return split[0][2:], true
-}
-
-// includesFromHeaders gets the include directories needed from generated headers
-func (ca *compilerAttributes) includesFromHeaders(ctx android.BazelConversionPathContext, implHdrs, hdrs bazel.LabelListAttribute) {
-	local, absolute := includesFromLabelListAttribute(implHdrs, ca.localIncludes, ca.absoluteIncludes)
-	localExport, absoluteExport := includesFromLabelListAttribute(hdrs, ca.includes.Includes, ca.includes.AbsoluteIncludes)
-
-	ca.localIncludes = local
-	ca.absoluteIncludes = absolute
-
-	ca.includes.Includes = localExport
-	ca.includes.AbsoluteIncludes = absoluteExport
-}
-
-// includesFromLabelList extracts the packages from a LabelListAttribute that should be includes and
-// combines them with existing local/absolute includes.
-func includesFromLabelListAttribute(attr bazel.LabelListAttribute, existingLocal, existingAbsolute bazel.StringListAttribute) (bazel.StringListAttribute, bazel.StringListAttribute) {
-	localAttr := existingLocal.Clone()
-	absoluteAttr := existingAbsolute.Clone()
-	if !attr.Value.IsEmpty() {
-		l, a := includesFromLabelList(attr.Value, existingLocal.Value, existingAbsolute.Value)
-		localAttr.SetSelectValue(bazel.NoConfigAxis, "", l)
-		absoluteAttr.SetSelectValue(bazel.NoConfigAxis, "", a)
-	}
-	for axis, configToLabels := range attr.ConfigurableValues {
-		for c, labels := range configToLabels {
-			local := existingLocal.SelectValue(axis, c)
-			absolute := existingAbsolute.SelectValue(axis, c)
-			l, a := includesFromLabelList(labels, local, absolute)
-			localAttr.SetSelectValue(axis, c, l)
-			absoluteAttr.SetSelectValue(axis, c, a)
-		}
-	}
-	return *localAttr, *absoluteAttr
-}
-
-// includesFromLabelList extracts relative/absolute includes from a bazel.LabelList.
-func includesFromLabelList(labelList bazel.LabelList, existingRel, existingAbs []string) ([]string, []string) {
-	var relative, absolute []string
-	for _, hdr := range labelList.Includes {
-		if pkg, hasPkg := packageFromLabel(hdr.Label); hasPkg {
-			absolute = append(absolute, pkg)
-		} else if pkg != "" {
-			relative = append(relative, pkg)
-		}
-	}
-	if len(relative)+len(existingRel) != 0 {
-		relative = android.FirstUniqueStrings(append(append([]string{}, existingRel...), relative...))
-	}
-	if len(absolute)+len(existingAbs) != 0 {
-		absolute = android.FirstUniqueStrings(append(append([]string{}, existingAbs...), absolute...))
-	}
-	return relative, absolute
-}
-
-type YasmAttributes struct {
-	Srcs         bazel.LabelListAttribute
-	Flags        bazel.StringListAttribute
-	Include_dirs bazel.StringListAttribute
-}
-
-func bp2BuildYasm(ctx android.Bp2buildMutatorContext, m *Module, ca compilerAttributes) *bazel.LabelAttribute {
-	if ca.asmSrcs.IsEmpty() {
-		return nil
-	}
-
-	// Yasm needs the include directories from both local_includes and
-	// export_include_dirs. We don't care about actually exporting them from the
-	// yasm rule though, because they will also be present on the cc_ rule that
-	// wraps this yasm rule.
-	includes := ca.localIncludes.Clone()
-	bp2BuildPropParseHelper(ctx, m, &FlagExporterProperties{}, func(axis bazel.ConfigurationAxis, config string, props interface{}) {
-		if flagExporterProperties, ok := props.(*FlagExporterProperties); ok {
-			if len(flagExporterProperties.Export_include_dirs) > 0 {
-				x := bazel.StringListAttribute{}
-				x.SetSelectValue(axis, config, flagExporterProperties.Export_include_dirs)
-				includes.Append(x)
-			}
-		}
-	})
-
-	ctx.CreateBazelTargetModule(
-		bazel.BazelTargetModuleProperties{
-			Rule_class:        "yasm",
-			Bzl_load_location: "//build/bazel/rules/cc:yasm.bzl",
-		},
-		android.CommonAttributes{Name: m.Name() + "_yasm"},
-		&YasmAttributes{
-			Srcs:         ca.asmSrcs,
-			Flags:        ca.asFlags,
-			Include_dirs: *includes,
-		})
-
-	// We only want to add a dependency on the _yasm target if there are asm
-	// sources in the current configuration. If there are unconfigured asm
-	// sources, always add the dependency. Otherwise, add the dependency only
-	// on the configuration axes and values that had asm sources.
-	if len(ca.asmSrcs.Value.Includes) > 0 {
-		return bazel.MakeLabelAttribute(":" + m.Name() + "_yasm")
-	}
-
-	ret := &bazel.LabelAttribute{}
-	for _, axis := range ca.asmSrcs.SortedConfigurationAxes() {
-		for cfg := range ca.asmSrcs.ConfigurableValues[axis] {
-			ret.SetSelectValue(axis, cfg, bazel.Label{Label: ":" + m.Name() + "_yasm"})
-		}
-	}
-	return ret
-}
-
-// bp2BuildParseBaseProps returns all compiler, linker, library attributes of a cc module.
-func bp2BuildParseBaseProps(ctx android.Bp2buildMutatorContext, module *Module) baseAttributes {
-	archVariantCompilerProps := module.GetArchVariantProperties(ctx, &BaseCompilerProperties{})
-	archVariantLinkerProps := module.GetArchVariantProperties(ctx, &BaseLinkerProperties{})
-	archVariantLibraryProperties := module.GetArchVariantProperties(ctx, &LibraryProperties{})
-
-	axisToConfigs := map[bazel.ConfigurationAxis]map[string]bool{}
-	allAxesAndConfigs := func(cp android.ConfigurationAxisToArchVariantProperties) {
-		for axis, configMap := range cp {
-			if _, ok := axisToConfigs[axis]; !ok {
-				axisToConfigs[axis] = map[string]bool{}
-			}
-			for cfg := range configMap {
-				axisToConfigs[axis][cfg] = true
-			}
-		}
-	}
-	allAxesAndConfigs(archVariantCompilerProps)
-	allAxesAndConfigs(archVariantLinkerProps)
-	allAxesAndConfigs(archVariantLibraryProperties)
-
-	compilerAttrs := compilerAttributes{}
-	linkerAttrs := linkerAttributes{}
-
-	var aidlLibs bazel.LabelList
-	var implementationHdrs, exportHdrs bazel.LabelListAttribute
-
-	// Iterate through these axes in a deterministic order. This is required
-	// because processing certain dependencies may result in concatenating
-	// elements along other axes. (For example, processing NoConfig may result
-	// in elements being added to InApex). This is thus the only way to ensure
-	// that the order of entries in each list is in a predictable order.
-	for _, axis := range bazel.SortedConfigurationAxes(axisToConfigs) {
-		configs := axisToConfigs[axis]
-		for cfg := range configs {
-			var allHdrs []string
-			if baseCompilerProps, ok := archVariantCompilerProps[axis][cfg].(*BaseCompilerProperties); ok {
-				allHdrs = baseCompilerProps.Generated_headers
-
-				if baseCompilerProps.Lex != nil {
-					compilerAttrs.lexopts.SetSelectValue(axis, cfg, baseCompilerProps.Lex.Flags)
-				}
-				if baseCompilerProps.Yacc != nil {
-					compilerAttrs.yaccFlags.SetSelectValue(axis, cfg, baseCompilerProps.Yacc.Flags)
-					compilerAttrs.yaccGenLocationHeader.SetSelectValue(axis, cfg, baseCompilerProps.Yacc.Gen_location_hh)
-					compilerAttrs.yaccGenPositionHeader.SetSelectValue(axis, cfg, baseCompilerProps.Yacc.Gen_position_hh)
-				}
-				(&compilerAttrs).bp2buildForAxisAndConfig(ctx, axis, cfg, baseCompilerProps)
-				aidlLibs.Append(android.BazelLabelForModuleDeps(ctx, baseCompilerProps.Aidl.Libs))
-			}
-
-			var exportedHdrs []string
-
-			if baseLinkerProps, ok := archVariantLinkerProps[axis][cfg].(*BaseLinkerProperties); ok {
-				exportedHdrs = baseLinkerProps.Export_generated_headers
-				(&linkerAttrs).bp2buildForAxisAndConfig(ctx, module, axis, cfg, baseLinkerProps)
-			}
-
-			headers := maybePartitionExportedAndImplementationsDeps(ctx, !module.Binary(), allHdrs, exportedHdrs, android.BazelLabelForModuleDeps)
-
-			implementationHdrs.SetSelectValue(axis, cfg, headers.implementation)
-			exportHdrs.SetSelectValue(axis, cfg, headers.export)
-
-			if libraryProps, ok := archVariantLibraryProperties[axis][cfg].(*LibraryProperties); ok {
-				if axis == bazel.NoConfigAxis {
-					if libraryProps.Stubs.Symbol_file != nil {
-						compilerAttrs.stubsSymbolFile = libraryProps.Stubs.Symbol_file
-						versions := android.CopyOf(libraryProps.Stubs.Versions)
-						normalizeVersions(ctx, versions)
-						versions = addCurrentVersionIfNotPresent(versions)
-						compilerAttrs.stubsVersions.SetSelectValue(axis, cfg, versions)
-					}
-				}
-				if stem := libraryProps.Stem; stem != nil {
-					compilerAttrs.stem.SetSelectValue(axis, cfg, stem)
-				}
-				if suffix := libraryProps.Suffix; suffix != nil {
-					compilerAttrs.suffix.SetSelectValue(axis, cfg, suffix)
-				}
-			}
-
-		}
-	}
-
-	compilerAttrs.convertStlProps(ctx, module)
-	(&linkerAttrs).convertStripProps(ctx, module)
-
-	var nativeCoverage *bool
-	if module.coverage != nil && module.coverage.Properties.Native_coverage != nil &&
-		!Bool(module.coverage.Properties.Native_coverage) {
-		nativeCoverage = BoolPtr(false)
-	}
-
-	productVariableProps, errs := android.ProductVariableProperties(ctx, ctx.Module())
-	for _, err := range errs {
-		ctx.ModuleErrorf("ProductVariableProperties error: %s", err)
-	}
-
-	(&compilerAttrs).convertProductVariables(ctx, productVariableProps)
-	(&linkerAttrs).convertProductVariables(ctx, productVariableProps)
-
-	(&compilerAttrs).finalize(ctx, implementationHdrs, exportHdrs)
-	(&linkerAttrs).finalize(ctx)
-
-	(&compilerAttrs.srcs).Add(bp2BuildYasm(ctx, module, compilerAttrs))
-
-	(&linkerAttrs).deps.Append(compilerAttrs.exportGenruleHeaders)
-	(&linkerAttrs).implementationDeps.Append(compilerAttrs.genruleHeaders)
-
-	(&linkerAttrs).wholeArchiveDeps.Append(compilerAttrs.exportXsdSrcs)
-	(&linkerAttrs).implementationWholeArchiveDeps.Append(compilerAttrs.xsdSrcs)
-
-	protoDep := bp2buildProto(ctx, module, compilerAttrs.protoSrcs, linkerAttrs)
-
-	// bp2buildProto will only set wholeStaticLib or implementationWholeStaticLib, but we don't know
-	// which. This will add the newly generated proto library to the appropriate attribute and nothing
-	// to the other
-	(&linkerAttrs).wholeArchiveDeps.Add(protoDep.wholeStaticLib)
-	(&linkerAttrs).implementationWholeArchiveDeps.Add(protoDep.implementationWholeStaticLib)
-
-	aidlDep := bp2buildCcAidlLibrary(
-		ctx, module,
-		compilerAttrs.aidlSrcs,
-		bazel.LabelListAttribute{
-			Value: aidlLibs,
-		},
-		linkerAttrs,
-		compilerAttrs,
-	)
-	if aidlDep != nil {
-		if lib, ok := module.linker.(*libraryDecorator); ok {
-			if proptools.Bool(lib.Properties.Aidl.Export_aidl_headers) {
-				(&linkerAttrs).wholeArchiveDeps.Add(aidlDep)
-			} else {
-				(&linkerAttrs).implementationWholeArchiveDeps.Add(aidlDep)
-			}
-		}
-	}
-
-	// Create a cc_yacc_static_library if srcs contains .y/.yy files
-	// This internal target will produce an .a file that will be statically linked to the parent library
-	if yaccDep := bp2buildCcYaccLibrary(ctx, compilerAttrs, linkerAttrs); yaccDep != nil {
-		(&linkerAttrs).implementationWholeArchiveDeps.Add(yaccDep)
-	}
-
-	convertedLSrcs := bp2BuildLex(ctx, module.Name(), compilerAttrs)
-	(&compilerAttrs).srcs.Add(&convertedLSrcs.srcName)
-	(&compilerAttrs).cSrcs.Add(&convertedLSrcs.cSrcName)
-
-	if module.afdo != nil && module.afdo.Properties.Afdo {
-		fdoProfileDep := bp2buildFdoProfile(ctx, module)
-		if fdoProfileDep != nil {
-			// TODO(b/276287371): Only set fdo_profile for android platform
-			// https://cs.android.com/android/platform/superproject/main/+/main:build/soong/cc/afdo.go;l=105;drc=2dbe160d1af445de32725098570ec594e3944fc5
-			(&compilerAttrs).fdoProfile.SetValue(*fdoProfileDep)
-		}
-	}
-
-	if !compilerAttrs.syspropSrcs.IsEmpty() {
-		(&linkerAttrs).wholeArchiveDeps.Add(bp2buildCcSysprop(ctx, module.Name(), module.Properties.Min_sdk_version, compilerAttrs.syspropSrcs))
-	}
-
-	linkerAttrs.wholeArchiveDeps.Prepend = true
-	linkerAttrs.deps.Prepend = true
-	compilerAttrs.localIncludes.Prepend = true
-	compilerAttrs.absoluteIncludes.Prepend = true
-	compilerAttrs.hdrs.Prepend = true
-
-	convertedRsSrcs, rsAbsIncludes, rsLocalIncludes := bp2buildRScript(ctx, module, compilerAttrs)
-	(&compilerAttrs).srcs.Add(&convertedRsSrcs)
-	(&compilerAttrs).absoluteIncludes.Append(rsAbsIncludes)
-	(&compilerAttrs).localIncludes.Append(rsLocalIncludes)
-	(&compilerAttrs).localIncludes.Value = android.FirstUniqueStrings(compilerAttrs.localIncludes.Value)
-
-	sanitizerValues := bp2buildSanitizerFeatures(ctx, module)
-
-	features := compilerAttrs.features.Clone().Append(linkerAttrs.features).Append(sanitizerValues.features)
-	features = features.Append(bp2buildLtoFeatures(ctx, module))
-	features = features.Append(convertHiddenVisibilityToFeatureBase(ctx, module))
-	features.DeduplicateAxesFromBase()
-
-	compilerAttrs.copts = *compilerAttrs.copts.Append(sanitizerValues.copts)
-	compilerAttrs.additionalCompilerInputs = *compilerAttrs.additionalCompilerInputs.Append(sanitizerValues.additionalCompilerInputs)
-
-	addMuslSystemDynamicDeps(ctx, linkerAttrs)
-
-	// Dedupe all deps.
-	(&linkerAttrs).deps.Value = bazel.FirstUniqueBazelLabelList((&linkerAttrs).deps.Value)
-	(&linkerAttrs).implementationDeps.Value = bazel.FirstUniqueBazelLabelList((&linkerAttrs).implementationDeps.Value)
-	(&linkerAttrs).implementationDynamicDeps.Value = bazel.FirstUniqueBazelLabelList((&linkerAttrs).implementationDynamicDeps.Value)
-	(&linkerAttrs).wholeArchiveDeps.Value = bazel.FirstUniqueBazelLabelList((&linkerAttrs).wholeArchiveDeps.Value)
-	(&linkerAttrs).implementationWholeArchiveDeps.Value = bazel.FirstUniqueBazelLabelList((&linkerAttrs).implementationWholeArchiveDeps.Value)
-
-	return baseAttributes{
-		compilerAttrs,
-		linkerAttrs,
-		*features,
-		protoDep.protoDep,
-		aidlDep,
-		nativeCoverage,
-	}
-}
-
-type ccYaccLibraryAttributes struct {
-	Src                         bazel.LabelAttribute
-	Flags                       bazel.StringListAttribute
-	Gen_location_hh             bazel.BoolAttribute
-	Gen_position_hh             bazel.BoolAttribute
-	Local_includes              bazel.StringListAttribute
-	Implementation_deps         bazel.LabelListAttribute
-	Implementation_dynamic_deps bazel.LabelListAttribute
-}
-
-func bp2buildCcYaccLibrary(ctx android.Bp2buildMutatorContext, ca compilerAttributes, la linkerAttributes) *bazel.LabelAttribute {
-	if ca.yaccSrc == nil {
-		return nil
-	}
-	yaccLibraryLabel := ctx.Module().Name() + "_yacc"
-	ctx.CreateBazelTargetModule(
-		bazel.BazelTargetModuleProperties{
-			Rule_class:        "cc_yacc_static_library",
-			Bzl_load_location: "//build/bazel/rules/cc:cc_yacc_library.bzl",
-		},
-		android.CommonAttributes{
-			Name: yaccLibraryLabel,
-		},
-		&ccYaccLibraryAttributes{
-			Src:                         *ca.yaccSrc,
-			Flags:                       ca.yaccFlags,
-			Gen_location_hh:             ca.yaccGenLocationHeader,
-			Gen_position_hh:             ca.yaccGenPositionHeader,
-			Local_includes:              ca.localIncludes,
-			Implementation_deps:         la.implementationDeps,
-			Implementation_dynamic_deps: la.implementationDynamicDeps,
-		},
-	)
-
-	yaccLibrary := &bazel.LabelAttribute{
-		Value: &bazel.Label{
-			Label: ":" + yaccLibraryLabel,
-		},
-	}
-	return yaccLibrary
-}
-
-// As a workaround for b/261657184, we are manually adding the default value
-// of system_dynamic_deps for the linux_musl os.
-// TODO: Solve this properly
-func addMuslSystemDynamicDeps(ctx android.Bp2buildMutatorContext, attrs linkerAttributes) {
-	systemDynamicDeps := attrs.systemDynamicDeps.SelectValue(bazel.OsConfigurationAxis, "linux_musl")
-	if attrs.systemDynamicDeps.HasAxisSpecificValues(bazel.OsConfigurationAxis) && systemDynamicDeps.IsNil() {
-		attrs.systemDynamicDeps.SetSelectValue(bazel.OsConfigurationAxis, "linux_musl", android.BazelLabelForModuleDeps(ctx, config.MuslDefaultSharedLibraries))
-	}
-}
-
-type fdoProfileAttributes struct {
-	Absolute_path_profile string
-}
-
-func bp2buildFdoProfile(
-	ctx android.Bp2buildMutatorContext,
-	m *Module,
-) *bazel.Label {
-	// TODO(b/267229066): Convert to afdo boolean attribute and let Bazel handles finding
-	// fdo_profile target from AfdoProfiles product var
-	for _, project := range globalAfdoProfileProjects {
-		// Ensure it's a Soong package
-		bpPath := android.ExistentPathForSource(ctx, project, "Android.bp")
-		if bpPath.Valid() {
-			// TODO(b/260714900): Handle arch-specific afdo profiles (e.g. `<module-name>-arm<64>.afdo`)
-			path := android.ExistentPathForSource(ctx, project, m.Name()+".afdo")
-			if path.Valid() {
-				fdoProfileLabel := "//" + strings.TrimSuffix(project, "/") + ":" + m.Name()
-				return &bazel.Label{
-					Label: fdoProfileLabel,
-				}
-			}
-		}
-	}
-
-	return nil
-}
-
-func bp2buildCcAidlLibrary(
-	ctx android.Bp2buildMutatorContext,
-	m *Module,
-	aidlSrcs bazel.LabelListAttribute,
-	aidlLibs bazel.LabelListAttribute,
-	linkerAttrs linkerAttributes,
-	compilerAttrs compilerAttributes,
-) *bazel.LabelAttribute {
-	var aidlLibsFromSrcs, aidlFiles bazel.LabelListAttribute
-	apexAvailableTags := android.ApexAvailableTagsWithoutTestApexes(ctx, ctx.Module())
-
-	if !aidlSrcs.IsEmpty() {
-		aidlLibsFromSrcs, aidlFiles = aidlSrcs.Partition(func(src bazel.Label) bool {
-			if fg, ok := android.ToFileGroupAsLibrary(ctx, src.OriginalModuleName); ok &&
-				fg.ShouldConvertToAidlLibrary(ctx) {
-				return true
-			}
-			return false
-		})
-
-		if !aidlFiles.IsEmpty() {
-			aidlLibName := m.Name() + "_aidl_library"
-			ctx.CreateBazelTargetModule(
-				bazel.BazelTargetModuleProperties{
-					Rule_class:        "aidl_library",
-					Bzl_load_location: "//build/bazel/rules/aidl:aidl_library.bzl",
-				},
-				android.CommonAttributes{
-					Name: aidlLibName,
-					Tags: apexAvailableTags,
-				},
-				&aidlLibraryAttributes{
-					Srcs: aidlFiles,
-				},
-			)
-			aidlLibsFromSrcs.Add(&bazel.LabelAttribute{Value: &bazel.Label{Label: ":" + aidlLibName}})
-		}
-	}
-
-	allAidlLibs := aidlLibs.Clone()
-	allAidlLibs.Append(aidlLibsFromSrcs)
-
-	if !allAidlLibs.IsEmpty() {
-		ccAidlLibrarylabel := m.Name() + "_cc_aidl_library"
-		// Since parent cc_library already has these dependencies, we can add them as implementation
-		// deps so that they don't re-export
-		implementationDeps := linkerAttrs.deps.Clone()
-		implementationDeps.Append(linkerAttrs.implementationDeps)
-		implementationDynamicDeps := linkerAttrs.dynamicDeps.Clone()
-		implementationDynamicDeps.Append(linkerAttrs.implementationDynamicDeps)
-
-		sdkAttrs := Bp2BuildParseSdkAttributes(m)
-
-		exportedIncludes := bp2BuildParseExportedIncludes(ctx, m, &compilerAttrs.includes)
-		includeAttrs := includesAttributes{
-			Export_includes:          exportedIncludes.Includes,
-			Export_absolute_includes: exportedIncludes.AbsoluteIncludes,
-			Export_system_includes:   exportedIncludes.SystemIncludes,
-			Local_includes:           compilerAttrs.localIncludes,
-			Absolute_includes:        compilerAttrs.absoluteIncludes,
-		}
-
-		ctx.CreateBazelTargetModule(
-			bazel.BazelTargetModuleProperties{
-				Rule_class:        "cc_aidl_library",
-				Bzl_load_location: "//build/bazel/rules/cc:cc_aidl_library.bzl",
-			},
-			android.CommonAttributes{Name: ccAidlLibrarylabel},
-			&ccAidlLibraryAttributes{
-				Deps:                        *allAidlLibs,
-				Implementation_deps:         *implementationDeps,
-				Implementation_dynamic_deps: *implementationDynamicDeps,
-				Tags:                        apexAvailableTags,
-				SdkAttributes:               sdkAttrs,
-				includesAttributes:          includeAttrs,
-			},
-		)
-		label := &bazel.LabelAttribute{
-			Value: &bazel.Label{
-				Label: ":" + ccAidlLibrarylabel,
-			},
-		}
-		return label
-	}
-
-	return nil
-}
-
-func Bp2BuildParseSdkAttributes(module *Module) SdkAttributes {
-	return SdkAttributes{
-		Sdk_version:     module.Properties.Sdk_version,
-		Min_sdk_version: module.Properties.Min_sdk_version,
-	}
-}
-
-type SdkAttributes struct {
-	Sdk_version     *string
-	Min_sdk_version *string
-}
-
-// Convenience struct to hold all attributes parsed from linker properties.
-type linkerAttributes struct {
-	deps                             bazel.LabelListAttribute
-	implementationDeps               bazel.LabelListAttribute
-	dynamicDeps                      bazel.LabelListAttribute
-	implementationDynamicDeps        bazel.LabelListAttribute
-	runtimeDeps                      bazel.LabelListAttribute
-	wholeArchiveDeps                 bazel.LabelListAttribute
-	implementationWholeArchiveDeps   bazel.LabelListAttribute
-	systemDynamicDeps                bazel.LabelListAttribute
-	usedSystemDynamicDepAsStaticDep  map[string]bool
-	usedSystemDynamicDepAsDynamicDep map[string]bool
-
-	useVersionLib                 bazel.BoolAttribute
-	linkopts                      bazel.StringListAttribute
-	additionalLinkerInputs        bazel.LabelListAttribute
-	stripKeepSymbols              bazel.BoolAttribute
-	stripKeepSymbolsAndDebugFrame bazel.BoolAttribute
-	stripKeepSymbolsList          bazel.StringListAttribute
-	stripAll                      bazel.BoolAttribute
-	stripNone                     bazel.BoolAttribute
-	features                      bazel.StringListAttribute
-}
-
-var (
-	soongSystemSharedLibs = []string{"libc", "libm", "libdl"}
-	versionLib            = "libbuildversion"
-)
-
-// resolveTargetApex re-adds the shared and static libs in target.apex.exclude_shared|static_libs props to non-apex variant
-// since all libs are already excluded by default
-func (la *linkerAttributes) resolveTargetApexProp(ctx android.Bp2buildMutatorContext, props *BaseLinkerProperties) {
-	excludeSharedLibs := bazelLabelForSharedDeps(ctx, props.Target.Apex.Exclude_shared_libs)
-	sharedExcludes := bazel.LabelList{Excludes: excludeSharedLibs.Includes}
-	sharedExcludesLabelList := bazel.LabelListAttribute{}
-	sharedExcludesLabelList.SetSelectValue(bazel.InApexAxis, bazel.InApex, sharedExcludes)
-
-	la.dynamicDeps.Append(sharedExcludesLabelList)
-	la.implementationDynamicDeps.Append(sharedExcludesLabelList)
-
-	excludeStaticLibs := bazelLabelForStaticDeps(ctx, props.Target.Apex.Exclude_static_libs)
-	staticExcludes := bazel.LabelList{Excludes: excludeStaticLibs.Includes}
-	staticExcludesLabelList := bazel.LabelListAttribute{}
-	staticExcludesLabelList.SetSelectValue(bazel.InApexAxis, bazel.InApex, staticExcludes)
-
-	la.deps.Append(staticExcludesLabelList)
-	la.implementationDeps.Append(staticExcludesLabelList)
-}
-
-func (la *linkerAttributes) bp2buildForAxisAndConfig(ctx android.Bp2buildMutatorContext, module *Module, axis bazel.ConfigurationAxis, config string, props *BaseLinkerProperties) {
-	isBinary := module.Binary()
-	// Use a single variable to capture usage of nocrt in arch variants, so there's only 1 error message for this module
-	var axisFeatures []string
-
-	wholeStaticLibs := android.FirstUniqueStrings(props.Whole_static_libs)
-	staticLibs := android.FirstUniqueStrings(android.RemoveListFromList(props.Static_libs, wholeStaticLibs))
-	if axis == bazel.NoConfigAxis {
-		la.useVersionLib.SetSelectValue(axis, config, props.Use_version_lib)
-		if proptools.Bool(props.Use_version_lib) {
-			versionLibAlreadyInDeps := android.InList(versionLib, wholeStaticLibs)
-			// remove from static libs so there is no duplicate dependency
-			_, staticLibs = android.RemoveFromList(versionLib, staticLibs)
-			// only add the dep if it is not in progress
-			if !versionLibAlreadyInDeps {
-				wholeStaticLibs = append(wholeStaticLibs, versionLib)
-			}
-		}
-	}
-
-	// Excludes to parallel Soong:
-	// https://cs.android.com/android/platform/superproject/+/master:build/soong/cc/linker.go;l=247-249;drc=088b53577dde6e40085ffd737a1ae96ad82fc4b0
-	la.wholeArchiveDeps.SetSelectValue(axis, config, bazelLabelForWholeDepsExcludes(ctx, wholeStaticLibs, props.Exclude_static_libs))
-
-	if isBinary && module.StaticExecutable() {
-		usedSystemStatic := android.FilterListPred(staticLibs, func(s string) bool {
-			return android.InList(s, soongSystemSharedLibs) && !android.InList(s, props.Exclude_static_libs)
-		})
-
-		for _, el := range usedSystemStatic {
-			if la.usedSystemDynamicDepAsStaticDep == nil {
-				la.usedSystemDynamicDepAsStaticDep = map[string]bool{}
-			}
-			la.usedSystemDynamicDepAsStaticDep[el] = true
-		}
-	}
-	staticDeps := maybePartitionExportedAndImplementationsDepsExcludes(
-		ctx,
-		!isBinary,
-		staticLibs,
-		props.Exclude_static_libs,
-		props.Export_static_lib_headers,
-		bazelLabelForStaticDepsExcludes,
-	)
-
-	headerLibs := android.FirstUniqueStrings(props.Header_libs)
-	hDeps := maybePartitionExportedAndImplementationsDeps(ctx, !isBinary, headerLibs, props.Export_header_lib_headers, bazelLabelForHeaderDeps)
-
-	(&hDeps.export).Append(staticDeps.export)
-	la.deps.SetSelectValue(axis, config, hDeps.export)
-
-	(&hDeps.implementation).Append(staticDeps.implementation)
-	la.implementationDeps.SetSelectValue(axis, config, hDeps.implementation)
-
-	systemSharedLibs := props.System_shared_libs
-	// systemSharedLibs distinguishes between nil/empty list behavior:
-	//    nil -> use default values
-	//    empty list -> no values specified
-	if len(systemSharedLibs) > 0 {
-		systemSharedLibs = android.FirstUniqueStrings(systemSharedLibs)
-	}
-	la.systemDynamicDeps.SetSelectValue(axis, config, bazelLabelForSharedDeps(ctx, systemSharedLibs))
-
-	sharedLibs := android.FirstUniqueStrings(props.Shared_libs)
-	excludeSharedLibs := props.Exclude_shared_libs
-	usedSystem := android.FilterListPred(sharedLibs, func(s string) bool {
-		return android.InList(s, soongSystemSharedLibs) && !android.InList(s, excludeSharedLibs)
-	})
-
-	for _, el := range usedSystem {
-		if la.usedSystemDynamicDepAsDynamicDep == nil {
-			la.usedSystemDynamicDepAsDynamicDep = map[string]bool{}
-		}
-		la.usedSystemDynamicDepAsDynamicDep[el] = true
-	}
-
-	sharedDeps := maybePartitionExportedAndImplementationsDepsExcludes(
-		ctx,
-		!isBinary,
-		sharedLibs,
-		props.Exclude_shared_libs,
-		props.Export_shared_lib_headers,
-		bazelLabelForSharedDepsExcludes,
-	)
-	la.dynamicDeps.SetSelectValue(axis, config, sharedDeps.export)
-	la.implementationDynamicDeps.SetSelectValue(axis, config, sharedDeps.implementation)
-	la.resolveTargetApexProp(ctx, props)
-
-	if axis == bazel.NoConfigAxis || (axis == bazel.OsConfigurationAxis && config == bazel.OsAndroid) {
-		// If a dependency in la.implementationDynamicDeps or la.dynamicDeps has stubs, its
-		// stub variant should be used when the dependency is linked in a APEX. The
-		// dependencies in NoConfigAxis and OsConfigurationAxis/OsAndroid are grouped by
-		// having stubs or not, so Bazel select() statement can be used to choose
-		// source/stub variants of them.
-		apexAvailable := module.ApexAvailable()
-		SetStubsForDynamicDeps(ctx, axis, config, apexAvailable, sharedDeps.export, &la.dynamicDeps, &la.deps, 0, false)
-		SetStubsForDynamicDeps(ctx, axis, config, apexAvailable, sharedDeps.implementation, &la.implementationDynamicDeps, &la.deps, 1, false)
-		if len(systemSharedLibs) > 0 {
-			SetStubsForDynamicDeps(ctx, axis, config, apexAvailable, bazelLabelForSharedDeps(ctx, systemSharedLibs), &la.systemDynamicDeps, &la.deps, 2, true)
-		}
-	}
-
-	if !BoolDefault(props.Pack_relocations, packRelocationsDefault) {
-		axisFeatures = append(axisFeatures, "disable_pack_relocations")
-	}
-
-	if Bool(props.Allow_undefined_symbols) {
-		axisFeatures = append(axisFeatures, "-no_undefined_symbols")
-	}
-
-	var linkerFlags []string
-	if len(props.Ldflags) > 0 {
-		linkerFlags = append(linkerFlags, proptools.NinjaEscapeList(props.Ldflags)...)
-		// binaries remove static flag if -shared is in the linker flags
-		if isBinary && android.InList("-shared", linkerFlags) {
-			axisFeatures = append(axisFeatures, "-static_flag")
-		}
-	}
-
-	if !props.libCrt() {
-		axisFeatures = append(axisFeatures, "-use_libcrt")
-	}
-	if !props.crt() {
-		axisFeatures = append(axisFeatures, "-link_crt")
-	}
-
-	// This must happen before the addition of flags for Version Script and
-	// Dynamic List, as these flags must be split on spaces and those must not
-	linkerFlags = parseCommandLineFlags(linkerFlags, filterOutClangUnknownCflags)
-
-	additionalLinkerInputs := bazel.LabelList{}
-	if props.Version_script != nil {
-		label := android.BazelLabelForModuleSrcSingle(ctx, *props.Version_script)
-		additionalLinkerInputs.Add(&label)
-		linkerFlags = append(linkerFlags, fmt.Sprintf("-Wl,--version-script,$(location %s)", label.Label))
-		axisFeatures = append(axisFeatures, "android_cfi_exports_map")
-	}
-
-	if props.Dynamic_list != nil {
-		label := android.BazelLabelForModuleSrcSingle(ctx, *props.Dynamic_list)
-		additionalLinkerInputs.Add(&label)
-		linkerFlags = append(linkerFlags, fmt.Sprintf("-Wl,--dynamic-list,$(location %s)", label.Label))
-	}
-
-	la.additionalLinkerInputs.SetSelectValue(axis, config, additionalLinkerInputs)
-	if axis == bazel.OsConfigurationAxis && (config == bazel.OsDarwin || config == bazel.OsLinux || config == bazel.OsWindows) {
-		linkerFlags = append(linkerFlags, props.Host_ldlibs...)
-	}
-	la.linkopts.SetSelectValue(axis, config, linkerFlags)
-
-	if axisFeatures != nil {
-		la.features.SetSelectValue(axis, config, axisFeatures)
-	}
-
-	runtimeDeps := android.BazelLabelForModuleDepsExcludes(ctx, props.Runtime_libs, props.Exclude_runtime_libs)
-	if !runtimeDeps.IsEmpty() {
-		la.runtimeDeps.SetSelectValue(axis, config, runtimeDeps)
-	}
-}
-
-var (
-	apiSurfaceModuleLibCurrentPackage = "@api_surfaces//" + android.ModuleLibApi.String() + "/current:"
-)
-
-func availableToSameApexes(a, b []string) bool {
-	if len(a) == 0 && len(b) == 0 {
-		return true
-	}
-	differ, _, _ := android.ListSetDifference(a, b)
-	return !differ
-}
-
-var (
-	apiDomainConfigSettingKey  = android.NewOnceKey("apiDomainConfigSettingKey")
-	apiDomainConfigSettingLock sync.Mutex
-)
-
-func getApiDomainConfigSettingMap(config android.Config) *map[string]bool {
-	return config.Once(apiDomainConfigSettingKey, func() interface{} {
-		return &map[string]bool{}
-	}).(*map[string]bool)
-}
-
-var (
-	testApexNameToApiDomain = map[string]string{
-		"test_broken_com.android.art": "com.android.art",
-	}
-)
-
-// GetApiDomain returns the canonical name of the apex. This is synonymous to the apex_name definition.
-// https://cs.android.com/android/_/android/platform/build/soong/+/e3f0281b8897da1fe23b2f4f3a05f1dc87bcc902:apex/prebuilt.go;l=81-83;drc=2dc7244af985a6ad701b22f1271e606cabba527f;bpv=1;bpt=0
-// For test apexes, it uses a naming convention heuristic to determine the api domain.
-// TODO (b/281548611): Move this build/soong/android
-func GetApiDomain(apexName string) string {
-	if apiDomain, exists := testApexNameToApiDomain[apexName]; exists {
-		return apiDomain
-	}
-	// Remove `test_` prefix
-	return strings.TrimPrefix(apexName, "test_")
-}
-
-// Create a config setting for this apex in build/bazel/rules/apex
-// The use case for this is stub/impl selection in cc libraries
-// Long term, these config_setting(s) should be colocated with the respective apex definitions.
-// Note that this is an anti-pattern: The config_setting should be created from the apex definition
-// and not from a cc_library.
-// This anti-pattern is needed today since not all apexes have been allowlisted.
-func createInApexConfigSetting(ctx android.Bp2buildMutatorContext, apexName string) {
-	if apexName == android.AvailableToPlatform || apexName == android.AvailableToAnyApex {
-		// These correspond to android-non_apex and android-in_apex
-		return
-	}
-	apiDomainConfigSettingLock.Lock()
-	defer apiDomainConfigSettingLock.Unlock()
-
-	// Return if a config_setting has already been created
-	apiDomain := GetApiDomain(apexName)
-	acsm := getApiDomainConfigSettingMap(ctx.Config())
-	if _, exists := (*acsm)[apiDomain]; exists {
-		return
-	}
-	(*acsm)[apiDomain] = true
-
-	csa := bazel.ConfigSettingAttributes{
-		Flag_values: bazel.StringMapAttribute{
-			"//build/bazel/rules/apex:api_domain": apiDomain,
-		},
-		// Constraint this to android
-		Constraint_values: bazel.MakeLabelListAttribute(
-			bazel.MakeLabelList(
-				[]bazel.Label{
-					bazel.Label{Label: "//build/bazel_common_rules/platforms/os:android"},
-				},
-			),
-		),
-	}
-	ca := android.CommonAttributes{
-		Name: apiDomain,
-	}
-	ctx.CreateBazelConfigSetting(
-		csa,
-		ca,
-		"build/bazel/rules/apex",
-	)
-}
-
-func inApexConfigSetting(apexAvailable string) string {
-	if apexAvailable == android.AvailableToPlatform {
-		return bazel.AndroidPlatform
-	}
-	if apexAvailable == android.AvailableToAnyApex {
-		return bazel.AndroidAndInApex
-	}
-	apiDomain := GetApiDomain(apexAvailable)
-	return "//build/bazel/rules/apex:" + apiDomain
-}
-
-// Inputs to stub vs impl selection.
-type stubSelectionInfo struct {
-	// Label of the implementation library (e.g. //bionic/libc:libc)
-	impl bazel.Label
-	// Axis containing the implementation library
-	axis bazel.ConfigurationAxis
-	// Axis key containing the implementation library
-	config string
-	// API domain of the apex
-	// For test apexes (test_com.android.foo), this will be the source apex (com.android.foo)
-	apiDomain string
-	// List of dep labels
-	dynamicDeps *bazel.LabelListAttribute
-	// Boolean value for determining if the dep is in the same api domain
-	// If false, the label will be rewritten to to the stub label
-	sameApiDomain bool
-}
-
-func useStubOrImplInApexWithName(ssi stubSelectionInfo) {
-	lib := ssi.impl
-	if !ssi.sameApiDomain {
-		lib = bazel.Label{
-			Label: apiSurfaceModuleLibCurrentPackage + strings.TrimPrefix(lib.OriginalModuleName, ":"),
-		}
-	}
-	// Create a select statement specific to this apex
-	inApexSelectValue := ssi.dynamicDeps.SelectValue(bazel.OsAndInApexAxis, inApexConfigSetting(ssi.apiDomain))
-	(&inApexSelectValue).Append(bazel.MakeLabelList([]bazel.Label{lib}))
-	ssi.dynamicDeps.SetSelectValue(bazel.OsAndInApexAxis, inApexConfigSetting(ssi.apiDomain), bazel.FirstUniqueBazelLabelList(inApexSelectValue))
-	// Delete the library from the common config for this apex
-	implDynamicDeps := ssi.dynamicDeps.SelectValue(ssi.axis, ssi.config)
-	implDynamicDeps = bazel.SubtractBazelLabelList(implDynamicDeps, bazel.MakeLabelList([]bazel.Label{ssi.impl}))
-	ssi.dynamicDeps.SetSelectValue(ssi.axis, ssi.config, implDynamicDeps)
-	if ssi.axis == bazel.NoConfigAxis {
-		// Set defaults. Defaults (i.e. host) should use impl and not stubs.
-		defaultSelectValue := ssi.dynamicDeps.SelectValue(bazel.OsAndInApexAxis, bazel.ConditionsDefaultConfigKey)
-		(&defaultSelectValue).Append(bazel.MakeLabelList([]bazel.Label{ssi.impl}))
-		ssi.dynamicDeps.SetSelectValue(bazel.OsAndInApexAxis, bazel.ConditionsDefaultConfigKey, bazel.FirstUniqueBazelLabelList(defaultSelectValue))
-	}
-}
-
-// hasNdkStubs returns true for libfoo if there exists a libfoo.ndk of type ndk_library
-func hasNdkStubs(ctx android.BazelConversionPathContext, c *Module) bool {
-	mod, exists := ctx.ModuleFromName(c.Name() + ndkLibrarySuffix)
-	return exists && ctx.OtherModuleType(mod) == "ndk_library"
-}
-
-func SetStubsForDynamicDeps(ctx android.Bp2buildMutatorContext, axis bazel.ConfigurationAxis,
-	config string, apexAvailable []string, dynamicLibs bazel.LabelList, dynamicDeps *bazel.LabelListAttribute, deps *bazel.LabelListAttribute, ind int, buildNonApexWithStubs bool) {
-
-	// Create a config_setting for each apex_available.
-	// This will be used to select impl of a dep if dep is available to the same apex.
-	for _, aa := range apexAvailable {
-		createInApexConfigSetting(ctx, aa)
-	}
-
-	apiDomainForSelects := []string{}
-	for _, apex := range apexAvailable {
-		apiDomainForSelects = append(apiDomainForSelects, GetApiDomain(apex))
-	}
-	// Always emit a select statement for the platform variant.
-	// This ensures that b build //foo --config=android works
-	// Soong always creates a platform variant even when the library might not be available to platform.
-	if !android.InList(android.AvailableToPlatform, apiDomainForSelects) {
-		apiDomainForSelects = append(apiDomainForSelects, android.AvailableToPlatform)
-	}
-	apiDomainForSelects = android.SortedUniqueStrings(apiDomainForSelects)
-
-	// Create a select for each apex this library could be included in.
-	for _, l := range dynamicLibs.Includes {
-		dep, _ := ctx.ModuleFromName(l.OriginalModuleName)
-		if c, ok := dep.(*Module); !ok || !c.HasStubsVariants() {
-			continue
-		}
-		// TODO (b/280339069): Decrease the verbosity of the generated BUILD files
-		for _, apiDomain := range apiDomainForSelects {
-			var sameApiDomain bool
-			if apiDomain == android.AvailableToPlatform {
-				// Platform variants in Soong use equality of apex_available for stub/impl selection.
-				// https://cs.android.com/android/_/android/platform/build/soong/+/316b0158fe57ee7764235923e7c6f3d530da39c6:cc/cc.go;l=3393-3404;drc=176271a426496fa2688efe2b40d5c74340c63375;bpv=1;bpt=0
-				// One of the factors behind this design choice is cc_test
-				// Tests only have a platform variant, and using equality of apex_available ensures
-				// that tests of an apex library gets its implementation and not stubs.
-				// TODO (b/280343104): Discuss if we can drop this special handling for platform variants.
-				sameApiDomain = availableToSameApexes(apexAvailable, dep.(*Module).ApexAvailable())
-				if linkable, ok := ctx.Module().(LinkableInterface); ok && linkable.Bootstrap() {
-					sameApiDomain = true
-				}
-				// If dependency has `apex_available: ["//apex_available:platform]`, then the platform variant of rdep should link against its impl.
-				// https://cs.android.com/android/_/android/platform/build/soong/+/main:cc/cc.go;l=3617;bpv=1;bpt=0;drc=c6a93d853b37ec90786e745b8d282145e6d3b589
-				if depApexAvailable := dep.(*Module).ApexAvailable(); len(depApexAvailable) == 1 && depApexAvailable[0] == android.AvailableToPlatform {
-					sameApiDomain = true
-				}
-			} else {
-				sameApiDomain = android.InList(apiDomain, dep.(*Module).ApexAvailable())
-			}
-			ssi := stubSelectionInfo{
-				impl:          l,
-				axis:          axis,
-				config:        config,
-				apiDomain:     apiDomain,
-				dynamicDeps:   dynamicDeps,
-				sameApiDomain: sameApiDomain,
-			}
-			useStubOrImplInApexWithName(ssi)
-		}
-	}
-
-	// If the library has an sdk variant, create additional selects to build this variant against the ndk
-	// The config setting for this variant will be //build/bazel/rules/apex:unbundled_app
-	if c, ok := ctx.Module().(*Module); ok && c.Properties.Sdk_version != nil {
-		for _, l := range dynamicLibs.Includes {
-			dep, _ := ctx.ModuleFromName(l.OriginalModuleName)
-			label := l // use the implementation by default
-			if depC, ok := dep.(*Module); ok && hasNdkStubs(ctx, depC) {
-				// If the dependency has ndk stubs, build against the ndk stubs
-				// https://cs.android.com/android/_/android/platform/build/soong/+/main:cc/cc.go;l=2642-2643;drc=e12d252e22dd8afa654325790d3298a0d67bd9d6;bpv=1;bpt=0
-				ver := proptools.String(c.Properties.Sdk_version)
-				// TODO - b/298085502: Add bp2build support for sdk_version: "minimum"
-				ndkLibModule, _ := ctx.ModuleFromName(dep.Name() + ndkLibrarySuffix)
-				label = bazel.Label{
-					Label: "//" + ctx.OtherModuleDir(ndkLibModule) + ":" + ndkLibModule.Name() + "_stub_libs-" + ver,
-				}
-			}
-			// add the ndk lib label to this axis
-			existingValue := dynamicDeps.SelectValue(bazel.OsAndInApexAxis, "unbundled_app")
-			existingValue.Append(bazel.MakeLabelList([]bazel.Label{label}))
-			dynamicDeps.SetSelectValue(bazel.OsAndInApexAxis, "unbundled_app", bazel.FirstUniqueBazelLabelList(existingValue))
-		}
-
-		// Add ndk_sysroot to deps.
-		// ndk_sysroot has a dependency edge on all ndk_headers, and will provide the .h files of _every_ ndk library
-		existingValue := deps.SelectValue(bazel.OsAndInApexAxis, "unbundled_app")
-		existingValue.Append(bazel.MakeLabelList([]bazel.Label{ndkSysrootLabel}))
-		deps.SetSelectValue(bazel.OsAndInApexAxis, "unbundled_app", bazel.FirstUniqueBazelLabelList(existingValue))
-	}
-}
-
-var (
-	ndkSysrootLabel = bazel.Label{
-		Label: "//build/bazel/rules/cc:ndk_sysroot",
-	}
-)
-
-func (la *linkerAttributes) convertStripProps(ctx android.BazelConversionPathContext, module *Module) {
-	bp2BuildPropParseHelper(ctx, module, &StripProperties{}, func(axis bazel.ConfigurationAxis, config string, props interface{}) {
-		if stripProperties, ok := props.(*StripProperties); ok {
-			la.stripKeepSymbols.SetSelectValue(axis, config, stripProperties.Strip.Keep_symbols)
-			la.stripKeepSymbolsList.SetSelectValue(axis, config, stripProperties.Strip.Keep_symbols_list)
-			la.stripKeepSymbolsAndDebugFrame.SetSelectValue(axis, config, stripProperties.Strip.Keep_symbols_and_debug_frame)
-			la.stripAll.SetSelectValue(axis, config, stripProperties.Strip.All)
-			la.stripNone.SetSelectValue(axis, config, stripProperties.Strip.None)
-		}
-	})
-}
-
-func (la *linkerAttributes) convertProductVariables(ctx android.Bp2buildMutatorContext, productVariableProps android.ProductConfigProperties) {
-
-	type productVarDep struct {
-		// the name of the corresponding excludes field, if one exists
-		excludesField string
-		// reference to the bazel attribute that should be set for the given product variable config
-		attribute *bazel.LabelListAttribute
-
-		depResolutionFunc func(ctx android.Bp2buildMutatorContext, modules, excludes []string) bazel.LabelList
-	}
-
-	// an intermediate attribute that holds Header_libs info, and will be appended to
-	// implementationDeps at the end, to solve the confliction that both header_libs
-	// and static_libs use implementationDeps.
-	var headerDeps bazel.LabelListAttribute
-
-	productVarToDepFields := map[string]productVarDep{
-		// product variables do not support exclude_shared_libs
-		"Shared_libs":       {attribute: &la.implementationDynamicDeps, depResolutionFunc: bazelLabelForSharedDepsExcludes},
-		"Static_libs":       {"Exclude_static_libs", &la.implementationDeps, bazelLabelForStaticDepsExcludes},
-		"Whole_static_libs": {"Exclude_static_libs", &la.wholeArchiveDeps, bazelLabelForWholeDepsExcludes},
-		"Header_libs":       {attribute: &headerDeps, depResolutionFunc: bazelLabelForHeaderDepsExcludes},
-	}
-
-	for name, dep := range productVarToDepFields {
-		props, exists := productVariableProps[name]
-		excludeProps, excludesExists := productVariableProps[dep.excludesField]
-		// if neither an include nor excludes property exists, then skip it
-		if !exists && !excludesExists {
-			continue
-		}
-		// Collect all the configurations that an include or exclude property exists for.
-		// We want to iterate all configurations rather than either the include or exclude because, for a
-		// particular configuration, we may have either only an include or an exclude to handle.
-		productConfigProps := make(map[android.ProductConfigOrSoongConfigProperty]bool, len(props)+len(excludeProps))
-		for p := range props {
-			productConfigProps[p] = true
-		}
-		for p := range excludeProps {
-			productConfigProps[p] = true
-		}
-
-		for productConfigProp := range productConfigProps {
-			prop, includesExists := props[productConfigProp]
-			excludesProp, excludesExists := excludeProps[productConfigProp]
-			var includes, excludes []string
-			var ok bool
-			// if there was no includes/excludes property, casting fails and that's expected
-			if includes, ok = prop.([]string); includesExists && !ok {
-				ctx.ModuleErrorf("Could not convert product variable %s property", name)
-			}
-			if excludes, ok = excludesProp.([]string); excludesExists && !ok {
-				ctx.ModuleErrorf("Could not convert product variable %s property", dep.excludesField)
-			}
-
-			dep.attribute.EmitEmptyList = productConfigProp.AlwaysEmit()
-			dep.attribute.SetSelectValue(
-				productConfigProp.ConfigurationAxis(),
-				productConfigProp.SelectKey(),
-				dep.depResolutionFunc(ctx, android.FirstUniqueStrings(includes), excludes),
-			)
-		}
-	}
-	la.implementationDeps.Append(headerDeps)
-}
-
-func (la *linkerAttributes) finalize(ctx android.Bp2buildMutatorContext) {
-	// if system dynamic deps have the default value, any use of a system dynamic library used will
-	// result in duplicate library errors for bionic OSes. Here, we explicitly exclude those libraries
-	// from bionic OSes and the no config case as these libraries only build for bionic OSes.
-	if la.systemDynamicDeps.IsNil() && len(la.usedSystemDynamicDepAsDynamicDep) > 0 {
-		toRemove := bazelLabelForSharedDeps(ctx, android.SortedKeys(la.usedSystemDynamicDepAsDynamicDep))
-		la.dynamicDeps.Exclude(bazel.NoConfigAxis, "", toRemove)
-		la.dynamicDeps.Exclude(bazel.OsConfigurationAxis, "android", toRemove)
-		la.dynamicDeps.Exclude(bazel.OsConfigurationAxis, "linux_bionic", toRemove)
-		la.implementationDynamicDeps.Exclude(bazel.NoConfigAxis, "", toRemove)
-		la.implementationDynamicDeps.Exclude(bazel.OsConfigurationAxis, "android", toRemove)
-		la.implementationDynamicDeps.Exclude(bazel.OsConfigurationAxis, "linux_bionic", toRemove)
-
-		la.implementationDynamicDeps.Exclude(bazel.OsAndInApexAxis, bazel.ConditionsDefaultConfigKey, toRemove)
-		stubsToRemove := make([]bazel.Label, 0, len(la.usedSystemDynamicDepAsDynamicDep))
-		for _, lib := range toRemove.Includes {
-			stubLabelInApiSurfaces := bazel.Label{
-				Label: apiSurfaceModuleLibCurrentPackage + lib.OriginalModuleName,
-			}
-			stubsToRemove = append(stubsToRemove, stubLabelInApiSurfaces)
-		}
-		// system libraries (e.g. libc, libm, libdl) belong the com.android.runtime api domain
-		// dedupe the stubs of these libraries from the other api domains (platform, other_apexes...)
-		for _, aa := range ctx.Module().(*Module).ApexAvailable() {
-			la.implementationDynamicDeps.Exclude(bazel.OsAndInApexAxis, inApexConfigSetting(aa), bazel.MakeLabelList(stubsToRemove))
-		}
-		la.implementationDynamicDeps.Exclude(bazel.OsAndInApexAxis, bazel.AndroidPlatform, bazel.MakeLabelList(stubsToRemove))
-	}
-	if la.systemDynamicDeps.IsNil() && len(la.usedSystemDynamicDepAsStaticDep) > 0 {
-		toRemove := bazelLabelForStaticDeps(ctx, android.SortedKeys(la.usedSystemDynamicDepAsStaticDep))
-		la.deps.Exclude(bazel.NoConfigAxis, "", toRemove)
-		la.deps.Exclude(bazel.OsConfigurationAxis, "android", toRemove)
-		la.deps.Exclude(bazel.OsConfigurationAxis, "linux_bionic", toRemove)
-		la.implementationDeps.Exclude(bazel.NoConfigAxis, "", toRemove)
-		la.implementationDeps.Exclude(bazel.OsConfigurationAxis, "android", toRemove)
-		la.implementationDeps.Exclude(bazel.OsConfigurationAxis, "linux_bionic", toRemove)
-	}
-
-	la.deps.ResolveExcludes()
-	la.implementationDeps.ResolveExcludes()
-	la.dynamicDeps.ResolveExcludes()
-	la.implementationDynamicDeps.ResolveExcludes()
-	la.wholeArchiveDeps.ResolveExcludes()
-	la.systemDynamicDeps.ForceSpecifyEmptyList = true
-
-}
-
-// Relativize a list of root-relative paths with respect to the module's
-// directory.
-//
-// include_dirs Soong prop are root-relative (b/183742505), but
-// local_include_dirs, export_include_dirs and export_system_include_dirs are
-// module dir relative. This function makes a list of paths entirely module dir
-// relative.
-//
-// For the `include` attribute, Bazel wants the paths to be relative to the
-// module.
-func bp2BuildMakePathsRelativeToModule(ctx android.BazelConversionPathContext, paths []string) []string {
-	var relativePaths []string
-	for _, path := range paths {
-		// Semantics of filepath.Rel: join(ModuleDir, rel(ModuleDir, path)) == path
-		relativePath, err := filepath.Rel(ctx.ModuleDir(), path)
-		if err != nil {
-			panic(err)
-		}
-		relativePaths = append(relativePaths, relativePath)
-	}
-	return relativePaths
-}
-
-// BazelIncludes contains information about -I and -isystem paths from a module converted to Bazel
-// attributes.
-type BazelIncludes struct {
-	AbsoluteIncludes bazel.StringListAttribute
-	Includes         bazel.StringListAttribute
-	SystemIncludes   bazel.StringListAttribute
-}
-
-func bp2BuildParseExportedIncludes(ctx android.BazelConversionPathContext, module *Module, includes *BazelIncludes) BazelIncludes {
-	var exported BazelIncludes
-	if includes != nil {
-		exported = *includes
-	} else {
-		exported = BazelIncludes{}
-	}
-
-	// cc library Export_include_dirs and Export_system_include_dirs are marked
-	// "variant_prepend" in struct tag, set their prepend property to true to make
-	// sure bp2build generates correct result.
-	exported.Includes.Prepend = true
-	exported.SystemIncludes.Prepend = true
-
-	bp2BuildPropParseHelper(ctx, module, &FlagExporterProperties{}, func(axis bazel.ConfigurationAxis, config string, props interface{}) {
-		if flagExporterProperties, ok := props.(*FlagExporterProperties); ok {
-			if len(flagExporterProperties.Export_include_dirs) > 0 {
-				exported.Includes.SetSelectValue(axis, config, android.FirstUniqueStrings(append(exported.Includes.SelectValue(axis, config), flagExporterProperties.Export_include_dirs...)))
-			}
-			if len(flagExporterProperties.Export_system_include_dirs) > 0 {
-				exported.SystemIncludes.SetSelectValue(axis, config, android.FirstUniqueStrings(append(exported.SystemIncludes.SelectValue(axis, config), flagExporterProperties.Export_system_include_dirs...)))
-			}
-		}
-	})
-	exported.AbsoluteIncludes.DeduplicateAxesFromBase()
-	exported.Includes.DeduplicateAxesFromBase()
-	exported.SystemIncludes.DeduplicateAxesFromBase()
-
-	return exported
-}
-
-func BazelLabelNameForStaticModule(baseLabel string) string {
-	return baseLabel + "_bp2build_cc_library_static"
-}
-
-func bazelLabelForStaticModule(ctx android.BazelConversionPathContext, m blueprint.Module) string {
-	label := android.BazelModuleLabel(ctx, m)
-	if ccModule, ok := m.(*Module); ok && ccModule.typ() == fullLibrary {
-		return BazelLabelNameForStaticModule(label)
-	}
-	return label
-}
-
-func bazelLabelForSharedModule(ctx android.BazelConversionPathContext, m blueprint.Module) string {
-	// cc_library, at it's root name, propagates the shared library, which depends on the static
-	// library.
-	return android.BazelModuleLabel(ctx, m)
-}
-
-func bazelLabelForStaticWholeModuleDeps(ctx android.BazelConversionPathContext, m blueprint.Module) string {
-	label := bazelLabelForStaticModule(ctx, m)
-	if aModule, ok := m.(android.Module); ok {
-		if android.IsModulePrebuilt(aModule) {
-			label += "_alwayslink"
-		}
-	}
-	return label
-}
-
-func xsdConfigCppTarget(xsd android.XsdConfigBp2buildTargets) string {
-	return xsd.CppBp2buildTargetName()
-}
-
-func bazelLabelForWholeDeps(ctx android.Bp2buildMutatorContext, modules []string) bazel.LabelList {
-	return android.BazelLabelForModuleDepsWithFn(ctx, modules, bazelLabelForStaticWholeModuleDeps, true)
-}
-
-func bazelLabelForWholeDepsExcludes(ctx android.Bp2buildMutatorContext, modules, excludes []string) bazel.LabelList {
-	return android.BazelLabelForModuleDepsExcludesWithFn(ctx, modules, excludes, bazelLabelForStaticWholeModuleDeps)
-}
-
-func bazelLabelForStaticDepsExcludes(ctx android.Bp2buildMutatorContext, modules, excludes []string) bazel.LabelList {
-	return android.BazelLabelForModuleDepsExcludesWithFn(ctx, modules, excludes, bazelLabelForStaticModule)
-}
-
-func bazelLabelForStaticDeps(ctx android.Bp2buildMutatorContext, modules []string) bazel.LabelList {
-	return android.BazelLabelForModuleDepsWithFn(ctx, modules, bazelLabelForStaticModule, true)
-}
-
-func bazelLabelForSharedDeps(ctx android.Bp2buildMutatorContext, modules []string) bazel.LabelList {
-	return android.BazelLabelForModuleDepsWithFn(ctx, modules, bazelLabelForSharedModule, true)
-}
-
-func bazelLabelForHeaderDeps(ctx android.Bp2buildMutatorContext, modules []string) bazel.LabelList {
-	// This is not elegant, but bp2build's shared library targets only propagate
-	// their header information as part of the normal C++ provider.
-	return bazelLabelForSharedDeps(ctx, modules)
-}
-
-func bazelLabelForHeaderDepsExcludes(ctx android.Bp2buildMutatorContext, modules, excludes []string) bazel.LabelList {
-	// This is only used when product_variable header_libs is processed, to follow
-	// the pattern of depResolutionFunc
-	return android.BazelLabelForModuleDepsExcludesWithFn(ctx, modules, excludes, bazelLabelForSharedModule)
-}
-
-func bazelLabelForSharedDepsExcludes(ctx android.Bp2buildMutatorContext, modules, excludes []string) bazel.LabelList {
-	return android.BazelLabelForModuleDepsExcludesWithFn(ctx, modules, excludes, bazelLabelForSharedModule)
-}
-
-type binaryLinkerAttrs struct {
-	Linkshared *bool
-	Stem       bazel.StringAttribute
-	Suffix     bazel.StringAttribute
-}
-
-func bp2buildBinaryLinkerProps(ctx android.BazelConversionPathContext, m *Module) binaryLinkerAttrs {
-	attrs := binaryLinkerAttrs{}
-	bp2BuildPropParseHelper(ctx, m, &BinaryLinkerProperties{}, func(axis bazel.ConfigurationAxis, config string, props interface{}) {
-		linkerProps := props.(*BinaryLinkerProperties)
-		staticExecutable := linkerProps.Static_executable
-		if axis == bazel.NoConfigAxis {
-			if linkBinaryShared := !proptools.Bool(staticExecutable); !linkBinaryShared {
-				attrs.Linkshared = &linkBinaryShared
-			}
-		} else if staticExecutable != nil {
-			// TODO(b/202876379): Static_executable is arch-variant; however, linkshared is a
-			// nonconfigurable attribute. Only 4 AOSP modules use this feature, defer handling
-			ctx.ModuleErrorf("bp2build cannot migrate a module with arch/target-specific static_executable values")
-		}
-		if stem := linkerProps.Stem; stem != nil {
-			attrs.Stem.SetSelectValue(axis, config, stem)
-		}
-		if suffix := linkerProps.Suffix; suffix != nil {
-			attrs.Suffix.SetSelectValue(axis, config, suffix)
-		}
-	})
-
-	return attrs
-}
-
-type sanitizerValues struct {
-	features                 bazel.StringListAttribute
-	copts                    bazel.StringListAttribute
-	additionalCompilerInputs bazel.LabelListAttribute
-}
-
-func bp2buildSanitizerFeatures(ctx android.BazelConversionPathContext, m *Module) sanitizerValues {
-	sanitizerFeatures := bazel.StringListAttribute{}
-	sanitizerCopts := bazel.StringListAttribute{}
-	sanitizerCompilerInputs := bazel.LabelListAttribute{}
-	memtagFeatures := bazel.StringListAttribute{}
-	memtagFeature := ""
-	bp2BuildPropParseHelper(ctx, m, &SanitizeProperties{}, func(axis bazel.ConfigurationAxis, config string, props interface{}) {
-		var features []string
-		if sanitizerProps, ok := props.(*SanitizeProperties); ok {
-			if sanitizerProps.Sanitize.Integer_overflow != nil && *sanitizerProps.Sanitize.Integer_overflow {
-				features = append(features, "ubsan_integer_overflow")
-			}
-			for _, sanitizer := range sanitizerProps.Sanitize.Misc_undefined {
-				features = append(features, "ubsan_"+sanitizer)
-			}
-			blocklist := sanitizerProps.Sanitize.Blocklist
-			if blocklist != nil {
-				// TODO: b/294868620 - Change this not to use the special axis when completing the bug
-				coptValue := fmt.Sprintf("-fsanitize-ignorelist=$(location %s)", *blocklist)
-				sanitizerCopts.SetSelectValue(bazel.SanitizersEnabledAxis, bazel.SanitizersEnabled, []string{coptValue})
-				sanitizerCompilerInputs.SetSelectValue(bazel.SanitizersEnabledAxis, bazel.SanitizersEnabled, bazel.MakeLabelListFromTargetNames([]string{*blocklist}))
-			}
-			if sanitizerProps.Sanitize.Cfi != nil && !proptools.Bool(sanitizerProps.Sanitize.Cfi) {
-				features = append(features, "-android_cfi")
-			} else if proptools.Bool(sanitizerProps.Sanitize.Cfi) {
-				features = append(features, "android_cfi")
-				if proptools.Bool(sanitizerProps.Sanitize.Config.Cfi_assembly_support) {
-					features = append(features, "android_cfi_assembly_support")
-				}
-			}
-
-			if sanitizerProps.Sanitize.Memtag_heap != nil {
-				if (axis == bazel.NoConfigAxis && memtagFeature == "") ||
-					(axis == bazel.OsArchConfigurationAxis && config == bazel.OsArchAndroidArm64) {
-					memtagFeature = setMemtagValue(sanitizerProps, &memtagFeatures)
-				}
-			}
-			sanitizerFeatures.SetSelectValue(axis, config, features)
-		}
-	})
-	sanitizerFeatures.Append(memtagFeatures)
-
-	return sanitizerValues{
-		features:                 sanitizerFeatures,
-		copts:                    sanitizerCopts,
-		additionalCompilerInputs: sanitizerCompilerInputs,
-	}
-}
-
-func setMemtagValue(sanitizerProps *SanitizeProperties, memtagFeatures *bazel.StringListAttribute) string {
-	var features []string
-	if proptools.Bool(sanitizerProps.Sanitize.Memtag_heap) {
-		features = append(features, "memtag_heap")
-	} else {
-		features = append(features, "-memtag_heap")
-	}
-	// Logic comes from: https://cs.android.com/android/platform/superproject/main/+/32ea1afbd1148b0b78553f24fa61116c999eb968:build/soong/cc/sanitize.go;l=910
-	if sanitizerProps.Sanitize.Diag.Memtag_heap != nil {
-		if proptools.Bool(sanitizerProps.Sanitize.Diag.Memtag_heap) {
-			features = append(features, "diag_memtag_heap")
-		} else {
-			features = append(features, "-diag_memtag_heap")
-		}
-	}
-	memtagFeatures.SetSelectValue(bazel.OsArchConfigurationAxis, bazel.OsArchAndroidArm64, features)
-
-	return features[0]
-}
-
-func bp2buildLtoFeatures(ctx android.BazelConversionPathContext, m *Module) bazel.StringListAttribute {
-	lto_feature_name := "android_thin_lto"
-	ltoBoolFeatures := bazel.BoolAttribute{}
-	bp2BuildPropParseHelper(ctx, m, &LTOProperties{}, func(axis bazel.ConfigurationAxis, config string, props interface{}) {
-		if ltoProps, ok := props.(*LTOProperties); ok {
-			thinProp := ltoProps.Lto.Thin != nil && *ltoProps.Lto.Thin
-			thinPropSetToFalse := ltoProps.Lto.Thin != nil && !*ltoProps.Lto.Thin
-			neverProp := ltoProps.Lto.Never != nil && *ltoProps.Lto.Never
-			if thinProp {
-				ltoBoolFeatures.SetSelectValue(axis, config, BoolPtr(true))
-				return
-			}
-			if neverProp || thinPropSetToFalse {
-				if thinProp {
-					ctx.ModuleErrorf("lto.thin and lto.never are mutually exclusive but were specified together")
-				} else {
-					ltoBoolFeatures.SetSelectValue(axis, config, BoolPtr(false))
-				}
-				return
-			}
-		}
-		ltoBoolFeatures.SetSelectValue(axis, config, nil)
-	})
-
-	props := m.GetArchVariantProperties(ctx, &LTOProperties{})
-	ltoStringFeatures, err := ltoBoolFeatures.ToStringListAttribute(func(boolPtr *bool, axis bazel.ConfigurationAxis, config string) []string {
-		if boolPtr == nil {
-			return []string{}
-		}
-		if !*boolPtr {
-			return []string{"-" + lto_feature_name}
-		}
-		features := []string{lto_feature_name}
-		if ltoProps, ok := props[axis][config].(*LTOProperties); ok {
-			if ltoProps.Whole_program_vtables != nil && *ltoProps.Whole_program_vtables {
-				features = append(features, "android_thin_lto_whole_program_vtables")
-			}
-		}
-		return features
-	})
-	if err != nil {
-		ctx.ModuleErrorf("Error processing LTO attributes: %s", err)
-	}
-	return ltoStringFeatures
-}
-
-func convertHiddenVisibilityToFeatureBase(ctx android.BazelConversionPathContext, m *Module) bazel.StringListAttribute {
-	visibilityHiddenFeature := bazel.StringListAttribute{}
-	bp2BuildPropParseHelper(ctx, m, &BaseCompilerProperties{}, func(axis bazel.ConfigurationAxis, configString string, props interface{}) {
-		if baseCompilerProps, ok := props.(*BaseCompilerProperties); ok {
-			convertHiddenVisibilityToFeatureHelper(&visibilityHiddenFeature, axis, configString, baseCompilerProps.Cflags)
-		}
-	})
-	return visibilityHiddenFeature
-}
-
-func convertHiddenVisibilityToFeatureStaticOrShared(ctx android.BazelConversionPathContext, m *Module, isStatic bool) bazel.StringListAttribute {
-	visibilityHiddenFeature := bazel.StringListAttribute{}
-	if isStatic {
-		bp2BuildPropParseHelper(ctx, m, &StaticProperties{}, func(axis bazel.ConfigurationAxis, configString string, props interface{}) {
-			if staticProps, ok := props.(*StaticProperties); ok {
-				convertHiddenVisibilityToFeatureHelper(&visibilityHiddenFeature, axis, configString, staticProps.Static.Cflags)
-			}
-		})
-	} else {
-		bp2BuildPropParseHelper(ctx, m, &SharedProperties{}, func(axis bazel.ConfigurationAxis, configString string, props interface{}) {
-			if sharedProps, ok := props.(*SharedProperties); ok {
-				convertHiddenVisibilityToFeatureHelper(&visibilityHiddenFeature, axis, configString, sharedProps.Shared.Cflags)
-			}
-		})
-	}
-
-	return visibilityHiddenFeature
-}
-
-func convertHiddenVisibilityToFeatureHelper(feature *bazel.StringListAttribute, axis bazel.ConfigurationAxis, configString string, cflags []string) {
-	if inList(config.VisibilityHiddenFlag, cflags) {
-		feature.SetSelectValue(axis, configString, []string{"visibility_hidden"})
-	}
-}
diff --git a/cc/cc.go b/cc/cc.go
index f800dc0..12db797 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -25,15 +25,12 @@
 	"strings"
 
 	"android/soong/testing"
-	"android/soong/ui/metrics/bp2build_metrics_proto"
-
 	"github.com/google/blueprint"
 	"github.com/google/blueprint/proptools"
 
 	"android/soong/aconfig"
 	"android/soong/aidl_library"
 	"android/soong/android"
-	"android/soong/bazel/cquery"
 	"android/soong/cc/config"
 	"android/soong/fuzz"
 	"android/soong/genrule"
@@ -592,7 +589,6 @@
 	GeneratorFlags(ctx ModuleContext, flags Flags, deps PathDeps) Flags
 	GeneratorSources(ctx ModuleContext) GeneratedSource
 	GeneratorBuildActions(ctx ModuleContext, flags Flags, deps PathDeps)
-	GeneratorBp2build(ctx android.Bp2buildMutatorContext, module *Module) bool
 }
 
 // compiler is the interface for a compiler helper object. Different module decorators may implement
@@ -831,19 +827,6 @@
 	return ok && ccDepTag == testPerSrcDepTag
 }
 
-// bazelHandler is the interface for a helper object related to deferring to Bazel for
-// processing a cc module (during Bazel mixed builds). Individual module types should define
-// their own bazel handler if they support being handled by Bazel.
-type BazelHandler interface {
-	// QueueBazelCall invokes request-queueing functions on the BazelContext
-	//so that these requests are handled when Bazel's cquery is invoked.
-	QueueBazelCall(ctx android.BaseModuleContext, label string)
-
-	// ProcessBazelQueryResponse uses information retrieved from Bazel to set properties
-	// on the current module with given label.
-	ProcessBazelQueryResponse(ctx android.ModuleContext, label string)
-}
-
 // Module contains the properties and members used by all C/C++ module types, and implements
 // the blueprint.Module interface.  It delegates to compiler, linker, and installer interfaces
 // to construct the output file.  Behavior can be customized with a Customizer, or "decorator",
@@ -861,15 +844,12 @@
 type Module struct {
 	fuzz.FuzzModule
 
-	android.BazelModuleBase
-
 	VendorProperties VendorProperties
 	Properties       BaseProperties
 
 	// initialize before calling Init
 	hod        android.HostOrDeviceSupported
 	multilib   android.Multilib
-	bazelable  bool
 	testModule bool
 
 	// Allowable SdkMemberTypes of this module type.
@@ -880,11 +860,10 @@
 	// type-specific logic. These members may reference different objects or the same object.
 	// Functions of these decorators will be invoked to initialize and register type-specific
 	// build statements.
-	generators   []Generator
-	compiler     compiler
-	linker       linker
-	installer    installer
-	bazelHandler BazelHandler
+	generators []Generator
+	compiler   compiler
+	linker     linker
+	installer  installer
 
 	features  []feature
 	stl       *stl
@@ -1288,9 +1267,6 @@
 	}
 
 	android.InitAndroidArchModule(c, c.hod, c.multilib)
-	if c.bazelable {
-		android.InitBazelModule(c)
-	}
 	android.InitApexModule(c)
 	android.InitDefaultableModule(c)
 
@@ -1546,8 +1522,6 @@
 }
 
 func InstallToBootstrap(name string, config android.Config) bool {
-	// NOTE: also update //build/bazel/rules/apex/cc.bzl#_installed_to_bootstrap
-	// if this list is updated.
 	if name == "libclang_rt.hwasan" || name == "libc_hwasan" {
 		return true
 	}
@@ -1943,170 +1917,6 @@
 	return subName
 }
 
-var _ android.MixedBuildBuildable = (*Module)(nil)
-
-func (c *Module) getBazelModuleLabel(ctx android.BaseModuleContext) string {
-	var bazelModuleLabel string
-	if c.typ() == fullLibrary && c.static() {
-		// cc_library is a special case in bp2build; two targets are generated -- one for each
-		// of the shared and static variants. The shared variant keeps the module name, but the
-		// static variant uses a different suffixed name.
-		bazelModuleLabel = bazelLabelForStaticModule(ctx, c)
-	} else {
-		bazelModuleLabel = c.GetBazelLabel(ctx, c)
-	}
-	labelNoPrebuilt := bazelModuleLabel
-	if c.IsPrebuilt() {
-		labelNoPrebuilt = android.RemoveOptionalPrebuiltPrefixFromBazelLabel(bazelModuleLabel)
-	}
-	return labelNoPrebuilt
-}
-
-func (c *Module) QueueBazelCall(ctx android.BaseModuleContext) {
-	c.bazelHandler.QueueBazelCall(ctx, c.getBazelModuleLabel(ctx))
-}
-
-// IsMixedBuildSupported returns true if the module should be analyzed by Bazel
-// in any of the --bazel-mode(s).
-func (c *Module) IsMixedBuildSupported(ctx android.BaseModuleContext) bool {
-	if !allEnabledSanitizersSupportedByBazel(ctx, c) {
-		//TODO(b/278772861) support sanitizers in Bazel rules
-		return false
-	}
-	if !imageVariantSupportedByBazel(c) {
-		return false
-	}
-	if c.IsSdkVariant() {
-		return false
-	}
-	return c.bazelHandler != nil
-}
-
-func imageVariantSupportedByBazel(c *Module) bool {
-	if c.IsLlndk() {
-		return false
-	}
-	if c.InVendor() {
-		return false
-	}
-	if c.InProduct() {
-		return false
-	}
-	if c.InRamdisk() {
-		return false
-	}
-	if c.InVendorRamdisk() {
-		return false
-	}
-	if c.InRecovery() {
-		return false
-	}
-	return true
-}
-
-func allEnabledSanitizersSupportedByBazel(ctx android.BaseModuleContext, c *Module) bool {
-	if c.sanitize == nil {
-		return true
-	}
-	sanitizeProps := &c.sanitize.Properties.SanitizeMutated
-
-	unsupportedSanitizers := []*bool{
-		sanitizeProps.Safestack,
-		sanitizeProps.Scudo,
-		BoolPtr(len(c.sanitize.Properties.Sanitize.Recover) > 0),
-	}
-	for _, san := range unsupportedSanitizers {
-		if Bool(san) {
-			return false
-		}
-	}
-
-	for _, san := range Sanitizers {
-		if san == intOverflow {
-			// TODO(b/261058727): enable mixed builds for all modules with UBSan
-			// Currently we can only support ubsan when minimum runtime is used.
-			ubsanEnabled := Bool(sanitizeProps.Integer_overflow) || len(sanitizeProps.Misc_undefined) > 0
-			if !ubsanEnabled || c.MinimalRuntimeNeeded() {
-				continue
-			}
-		} else if san == cfi {
-			apexInfo := ctx.Provider(android.ApexInfoProvider).(android.ApexInfo)
-			// Only allow cfi if this is an apex variant
-			if !apexInfo.IsForPlatform() {
-				continue
-			}
-		}
-		if c.sanitize.isSanitizerEnabled(san) {
-			return false
-		}
-	}
-
-	return true
-}
-
-func GetApexConfigKey(ctx android.BaseModuleContext) *android.ApexConfigKey {
-	apexInfo := ctx.Provider(android.ApexInfoProvider).(android.ApexInfo)
-	if !apexInfo.IsForPlatform() {
-		apexKey := android.ApexConfigKey{
-			WithinApex:     true,
-			ApexSdkVersion: findApexSdkVersion(ctx, apexInfo).String(),
-			ApiDomain:      findApiDomain(apexInfo),
-		}
-		return &apexKey
-	}
-
-	return nil
-}
-
-// Returns the api domain of a module for an apexInfo group
-// Input:
-// ai.InApexModules: [com.android.foo, test_com.android.foo, com.google.android.foo]
-// Return:
-// com.android.foo
-
-// If a module is included in multiple api domains (collated by min_sdk_version), it will return
-// the first match. The other matches have the same build actions since they share a min_sdk_version, so returning
-// the first match is fine.
-func findApiDomain(ai android.ApexInfo) string {
-	// Remove any test apexes
-	matches, _ := android.FilterList(ai.InApexModules, ai.TestApexes)
-	// Remove any google apexes. Rely on naming convention.
-	pred := func(s string) bool { return !strings.HasPrefix(s, "com.google") }
-	matches = android.FilterListPred(matches, pred)
-	if len(matches) > 0 {
-		// Return the first match
-		return android.SortedUniqueStrings(matches)[0]
-	} else {
-		// No apex in the tree has a dependency on this module
-		return ""
-	}
-}
-
-func (c *Module) ProcessBazelQueryResponse(ctx android.ModuleContext) {
-	bazelModuleLabel := c.getBazelModuleLabel(ctx)
-	c.bazelHandler.ProcessBazelQueryResponse(ctx, bazelModuleLabel)
-
-	c.Properties.SubName = GetSubnameProperty(ctx, c)
-	apexInfo := ctx.Provider(android.ApexInfoProvider).(android.ApexInfo)
-	if !apexInfo.IsForPlatform() {
-		c.hideApexVariantFromMake = true
-	}
-
-	c.makeLinkType = GetMakeLinkType(ctx, c)
-
-	mctx := &moduleContext{
-		ModuleContext: ctx,
-		moduleContextImpl: moduleContextImpl{
-			mod: c,
-		},
-	}
-	mctx.ctx = mctx
-
-	// TODO(b/244432500): Get the tradefed config from the bazel target instead
-	// of generating it with Soong.
-	c.maybeInstall(mctx, apexInfo)
-}
-
 func moduleContextFromAndroidModuleContext(actx android.ModuleContext, c *Module) ModuleContext {
 	ctx := &moduleContext{
 		ModuleContext: actx,
@@ -2345,9 +2155,8 @@
 	}
 }
 
-// maybeInstall is called at the end of both GenerateAndroidBuildActions and
-// ProcessBazelQueryResponse to run the install hooks for installable modules,
-// like binaries and tests.
+// maybeInstall is called at the end of both GenerateAndroidBuildActions to run the
+// install hooks for installable modules, like binaries and tests.
 func (c *Module) maybeInstall(ctx ModuleContext, apexInfo android.ApexInfo) {
 	if !proptools.BoolDefault(c.Installable(), true) {
 		// If the module has been specifically configure to not be installed then
@@ -2370,12 +2179,6 @@
 	}
 }
 
-func (c *Module) setAndroidMkVariablesFromCquery(info cquery.CcAndroidMkInfo) {
-	c.Properties.AndroidMkSharedLibs = info.LocalSharedLibs
-	c.Properties.AndroidMkStaticLibs = info.LocalStaticLibs
-	c.Properties.AndroidMkWholeStaticLibs = info.LocalWholeStaticLibs
-}
-
 func (c *Module) toolchain(ctx android.BaseModuleContext) config.Toolchain {
 	if c.cachedToolchain == nil {
 		c.cachedToolchain = config.FindToolchainWithContext(ctx)
@@ -4215,65 +4018,6 @@
 	return unknownType
 }
 
-// ConvertWithBp2build converts Module to Bazel for bp2build.
-func (c *Module) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	if len(c.generators) > 0 {
-		allConverted := true
-		for _, generator := range c.generators {
-			allConverted = allConverted && generator.GeneratorBp2build(ctx, c)
-		}
-		if allConverted {
-			return
-		}
-	}
-
-	prebuilt := c.IsPrebuilt()
-	switch c.typ() {
-	case binary:
-		if prebuilt {
-			prebuiltBinaryBp2Build(ctx, c)
-		} else {
-			binaryBp2build(ctx, c)
-		}
-	case testBin:
-		if !prebuilt {
-			testBinaryBp2build(ctx, c)
-		}
-	case object:
-		if prebuilt {
-			prebuiltObjectBp2Build(ctx, c)
-		} else {
-			objectBp2Build(ctx, c)
-		}
-	case fullLibrary:
-		if !prebuilt {
-			libraryBp2Build(ctx, c)
-		} else {
-			prebuiltLibraryBp2Build(ctx, c)
-		}
-	case headerLibrary:
-		libraryHeadersBp2Build(ctx, c)
-	case staticLibrary:
-		if prebuilt {
-			prebuiltLibraryStaticBp2Build(ctx, c, false)
-		} else {
-			sharedOrStaticLibraryBp2Build(ctx, c, true)
-		}
-	case sharedLibrary:
-		if prebuilt {
-			prebuiltLibrarySharedBp2Build(ctx, c)
-		} else {
-			sharedOrStaticLibraryBp2Build(ctx, c, false)
-		}
-	case ndkPrebuiltStl:
-		ndkPrebuiltStlBp2build(ctx, c)
-	case ndkLibrary:
-		ndkLibraryBp2build(ctx, c)
-	default:
-		ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_TYPE_UNSUPPORTED, "")
-	}
-}
-
 // Defaults
 type Defaults struct {
 	android.ModuleBase
diff --git a/cc/cc_test.go b/cc/cc_test.go
index 710b72b..a1842d7 100644
--- a/cc/cc_test.go
+++ b/cc/cc_test.go
@@ -26,7 +26,6 @@
 
 	"android/soong/aidl_library"
 	"android/soong/android"
-	"android/soong/bazel/cquery"
 )
 
 func init() {
@@ -46,27 +45,15 @@
 	}),
 )
 
-var ccLibInApex = "cc_lib_in_apex"
 var apexVariationName = "apex28"
 var apexVersion = "28"
 
 func registerTestMutators(ctx android.RegistrationContext) {
 	ctx.PostDepsMutators(func(ctx android.RegisterMutatorsContext) {
 		ctx.BottomUp("apex", testApexMutator).Parallel()
-		ctx.BottomUp("mixed_builds_prep", mixedBuildsPrepareMutator).Parallel()
 	})
 }
 
-func mixedBuildsPrepareMutator(ctx android.BottomUpMutatorContext) {
-	if m := ctx.Module(); m.Enabled() {
-		if mixedBuildMod, ok := m.(android.MixedBuildBuildable); ok {
-			if mixedBuildMod.IsMixedBuildSupported(ctx) && android.MixedBuildsEnabled(ctx) == android.MixedBuildEnabled {
-				mixedBuildMod.QueueBazelCall(ctx)
-			}
-		}
-	}
-}
-
 func testApexMutator(mctx android.BottomUpMutatorContext) {
 	modules := mctx.CreateVariations(apexVariationName)
 	apexInfo := android.ApexInfo{
@@ -2929,258 +2916,6 @@
 	checkStaticLibs(t, []string{"lib1", "libc++_static", "libc++demangle", "libclang_rt.builtins"}, module)
 }
 
-func TestLibDepAndroidMkExportInMixedBuilds(t *testing.T) {
-	bp := `
-		cc_library {
-			name: "static_dep",
-		}
-		cc_library {
-			name: "whole_static_dep",
-		}
-		cc_library {
-			name: "shared_dep",
-		}
-		cc_library {
-			name: "lib",
-			bazel_module: { label: "//:lib" },
-			static_libs: ["static_dep"],
-			whole_static_libs: ["whole_static_dep"],
-			shared_libs: ["shared_dep"],
-		}
-		cc_test {
-			name: "test",
-			bazel_module: { label: "//:test" },
-			static_libs: ["static_dep"],
-			whole_static_libs: ["whole_static_dep"],
-			shared_libs: ["shared_dep"],
-			gtest: false,
-			sanitize: {
-				// cc_test modules default to memtag_heap: true,
-				// but this adds extra dependencies that we don't care about
-				never: true,
-			}
-		}
-		cc_binary {
-			name: "binary",
-			bazel_module: { label: "//:binary" },
-			static_libs: ["static_dep"],
-			whole_static_libs: ["whole_static_dep"],
-			shared_libs: ["shared_dep"],
-		}
-		cc_library_headers {
-			name: "lib_headers",
-			bazel_module: { label: "//:lib_headers" },
-			static_libs: ["static_dep"],
-			whole_static_libs: ["whole_static_dep"],
-			shared_libs: ["shared_dep"],
-		}
-		cc_prebuilt_library {
-			name: "lib_prebuilt",
-			bazel_module: { label: "//:lib_prebuilt" },
-			static_libs: ["static_dep"],
-			whole_static_libs: ["whole_static_dep"],
-			shared_libs: ["shared_dep"],
-		}
-	`
-
-	testCases := []struct {
-		name          string
-		moduleName    string
-		variant       string
-		androidMkInfo cquery.CcAndroidMkInfo
-	}{
-		{
-			name:       "shared lib",
-			moduleName: "lib",
-			variant:    "android_arm64_armv8-a_shared",
-			androidMkInfo: cquery.CcAndroidMkInfo{
-				LocalStaticLibs:      []string{"static_dep"},
-				LocalWholeStaticLibs: []string{"whole_static_dep"},
-				LocalSharedLibs:      []string{"shared_dep"},
-			},
-		},
-		{
-			name:       "static lib",
-			moduleName: "lib",
-			variant:    "android_arm64_armv8-a_static",
-			androidMkInfo: cquery.CcAndroidMkInfo{
-				LocalStaticLibs:      []string{"static_dep"},
-				LocalWholeStaticLibs: []string{"whole_static_dep"},
-				LocalSharedLibs:      []string{"shared_dep"},
-			},
-		},
-		{
-			name:       "cc_test arm64",
-			moduleName: "test",
-			variant:    "android_arm64_armv8-a",
-			androidMkInfo: cquery.CcAndroidMkInfo{
-				LocalStaticLibs:      []string{"static_dep"},
-				LocalWholeStaticLibs: []string{"whole_static_dep"},
-				LocalSharedLibs:      []string{"shared_dep"},
-			},
-		},
-		{
-			name:       "cc_test arm",
-			moduleName: "test",
-			variant:    "android_arm_armv7-a-neon",
-			androidMkInfo: cquery.CcAndroidMkInfo{
-				LocalStaticLibs:      []string{"static_dep"},
-				LocalWholeStaticLibs: []string{"whole_static_dep"},
-				LocalSharedLibs:      []string{"shared_dep"},
-			},
-		},
-		{
-			name:       "cc_binary",
-			moduleName: "binary",
-			variant:    "android_arm64_armv8-a",
-			androidMkInfo: cquery.CcAndroidMkInfo{
-				LocalStaticLibs:      []string{"static_dep"},
-				LocalWholeStaticLibs: []string{"whole_static_dep"},
-				LocalSharedLibs:      []string{"shared_dep"},
-			},
-		},
-		{
-			name:       "cc_library_headers",
-			moduleName: "lib_headers",
-			variant:    "android_arm64_armv8-a",
-			androidMkInfo: cquery.CcAndroidMkInfo{
-				LocalStaticLibs:      []string{"static_dep"},
-				LocalWholeStaticLibs: []string{"whole_static_dep"},
-				LocalSharedLibs:      []string{"shared_dep"},
-			},
-		},
-		{
-			name:       "prebuilt lib static",
-			moduleName: "lib_prebuilt",
-			variant:    "android_arm64_armv8-a_static",
-			androidMkInfo: cquery.CcAndroidMkInfo{
-				LocalStaticLibs:      []string{"static_dep"},
-				LocalWholeStaticLibs: []string{"whole_static_dep"},
-				LocalSharedLibs:      []string{"shared_dep"},
-			},
-		},
-		{
-			name:       "prebuilt lib shared",
-			moduleName: "lib_prebuilt",
-			variant:    "android_arm64_armv8-a_shared",
-			androidMkInfo: cquery.CcAndroidMkInfo{
-				LocalStaticLibs:      []string{"static_dep"},
-				LocalWholeStaticLibs: []string{"whole_static_dep"},
-				LocalSharedLibs:      []string{"shared_dep"},
-			},
-		},
-	}
-
-	outputBaseDir := "out/bazel"
-	for _, tc := range testCases {
-		t.Run(tc.name, func(t *testing.T) {
-			result := android.GroupFixturePreparers(
-				prepareForCcTest,
-				android.FixtureModifyConfig(func(config android.Config) {
-					config.BazelContext = android.MockBazelContext{
-						OutputBaseDir: outputBaseDir,
-						LabelToCcInfo: map[string]cquery.CcInfo{
-							"//:lib": cquery.CcInfo{
-								CcAndroidMkInfo:      tc.androidMkInfo,
-								RootDynamicLibraries: []string{""},
-							},
-							"//:lib_bp2build_cc_library_static": cquery.CcInfo{
-								CcAndroidMkInfo:    tc.androidMkInfo,
-								RootStaticArchives: []string{""},
-							},
-							"//:lib_headers": cquery.CcInfo{
-								CcAndroidMkInfo: tc.androidMkInfo,
-								OutputFiles:     []string{""},
-							},
-							"//:lib_prebuilt": cquery.CcInfo{
-								CcAndroidMkInfo: tc.androidMkInfo,
-							},
-							"//:lib_prebuilt_bp2build_cc_library_static": cquery.CcInfo{
-								CcAndroidMkInfo: tc.androidMkInfo,
-							},
-						},
-						LabelToCcBinary: map[string]cquery.CcUnstrippedInfo{
-							"//:test__tf_internal": cquery.CcUnstrippedInfo{
-								CcAndroidMkInfo: tc.androidMkInfo,
-							},
-							"//:binary": cquery.CcUnstrippedInfo{
-								CcAndroidMkInfo: tc.androidMkInfo,
-							},
-						},
-					}
-				}),
-			).RunTestWithBp(t, bp)
-			ctx := result.TestContext
-
-			module := ctx.ModuleForTests(tc.moduleName, tc.variant).Module().(*Module)
-			entries := android.AndroidMkEntriesForTest(t, ctx, module)[0]
-			if !reflect.DeepEqual(module.Properties.AndroidMkStaticLibs, tc.androidMkInfo.LocalStaticLibs) {
-				t.Errorf("incorrect static_libs"+
-					"\nactual:   %v"+
-					"\nexpected: %v",
-					module.Properties.AndroidMkStaticLibs,
-					tc.androidMkInfo.LocalStaticLibs,
-				)
-			}
-			staticDepsDiffer, missingStaticDeps, additionalStaticDeps := android.ListSetDifference(
-				entries.EntryMap["LOCAL_STATIC_LIBRARIES"],
-				tc.androidMkInfo.LocalStaticLibs,
-			)
-			if staticDepsDiffer {
-				t.Errorf(
-					"expected LOCAL_STATIC_LIBRARIES to be %q but was %q; missing: %q; extra %q",
-					tc.androidMkInfo.LocalStaticLibs,
-					entries.EntryMap["LOCAL_STATIC_LIBRARIES"],
-					missingStaticDeps,
-					additionalStaticDeps,
-				)
-			}
-
-			if !reflect.DeepEqual(module.Properties.AndroidMkWholeStaticLibs, tc.androidMkInfo.LocalWholeStaticLibs) {
-				t.Errorf("expected module.Properties.AndroidMkWholeStaticLibs to be %q, but was %q",
-					tc.androidMkInfo.LocalWholeStaticLibs,
-					module.Properties.AndroidMkWholeStaticLibs,
-				)
-			}
-			wholeStaticDepsDiffer, missingWholeStaticDeps, additionalWholeStaticDeps := android.ListSetDifference(
-				entries.EntryMap["LOCAL_WHOLE_STATIC_LIBRARIES"],
-				tc.androidMkInfo.LocalWholeStaticLibs,
-			)
-			if wholeStaticDepsDiffer {
-				t.Errorf(
-					"expected LOCAL_WHOLE_STATIC_LIBRARIES to be %q but was %q; missing: %q; extra %q",
-					tc.androidMkInfo.LocalWholeStaticLibs,
-					entries.EntryMap["LOCAL_WHOLE_STATIC_LIBRARIES"],
-					missingWholeStaticDeps,
-					additionalWholeStaticDeps,
-				)
-			}
-
-			if !reflect.DeepEqual(module.Properties.AndroidMkSharedLibs, tc.androidMkInfo.LocalSharedLibs) {
-				t.Errorf("incorrect shared_libs"+
-					"\nactual:   %v"+
-					"\nexpected: %v",
-					module.Properties.AndroidMkSharedLibs,
-					tc.androidMkInfo.LocalSharedLibs,
-				)
-			}
-			sharedDepsDiffer, missingSharedDeps, additionalSharedDeps := android.ListSetDifference(
-				entries.EntryMap["LOCAL_SHARED_LIBRARIES"],
-				tc.androidMkInfo.LocalSharedLibs,
-			)
-			if sharedDepsDiffer {
-				t.Errorf(
-					"expected LOCAL_SHARED_LIBRARIES to be %q but was %q; missing %q; extra %q",
-					tc.androidMkInfo.LocalSharedLibs,
-					entries.EntryMap["LOCAL_SHARED_LIBRARIES"],
-					missingSharedDeps,
-					additionalSharedDeps,
-				)
-			}
-		})
-	}
-}
-
 var compilerFlagsTestCases = []struct {
 	in  string
 	out bool
@@ -3522,130 +3257,6 @@
 	}
 }
 
-func TestMixedBuildUsesStubs(t *testing.T) {
-	t.Parallel()
-	bp := `
-		cc_library_shared {
-			name: "libFoo",
-			bazel_module: { label: "//:libFoo" },
-			srcs: ["foo.c"],
-			stubs: {
-				symbol_file: "foo.map.txt",
-				versions: ["current"],
-			},
-			apex_available: ["bar", "a1"],
-		}
-
-		cc_library_shared {
-			name: "libBar",
-			srcs: ["bar.c"],
-			shared_libs: ["libFoo"],
-			apex_available: ["a1"],
-		}
-
-		cc_library_shared {
-			name: "libA1",
-			srcs: ["a1.c"],
-			shared_libs: ["libFoo"],
-			apex_available: ["a1"],
-		}
-
-		cc_library_shared {
-			name: "libBarA1",
-			srcs: ["bara1.c"],
-			shared_libs: ["libFoo"],
-			apex_available: ["bar", "a1"],
-		}
-
-		cc_library_shared {
-			name: "libAnyApex",
-			srcs: ["anyApex.c"],
-			shared_libs: ["libFoo"],
-			apex_available: ["//apex_available:anyapex"],
-		}
-
-		cc_library_shared {
-			name: "libBaz",
-			srcs: ["baz.c"],
-			shared_libs: ["libFoo"],
-			apex_available: ["baz"],
-		}
-
-		cc_library_shared {
-			name: "libQux",
-			srcs: ["qux.c"],
-			shared_libs: ["libFoo"],
-			apex_available: ["qux", "bar"],
-		}`
-
-	result := android.GroupFixturePreparers(
-		prepareForCcTest,
-		android.FixtureModifyConfig(func(config android.Config) {
-			config.BazelContext = android.MockBazelContext{
-				OutputBaseDir: "out/bazel",
-				LabelToCcInfo: map[string]cquery.CcInfo{
-					"//:libFoo": {
-						RootDynamicLibraries: []string{"libFoo.so"},
-					},
-					"//:libFoo_stub_libs-current": {
-						RootDynamicLibraries: []string{"libFoo_stub_libs-current.so"},
-					},
-				},
-			}
-		}),
-	).RunTestWithBp(t, bp)
-	ctx := result.TestContext
-
-	variants := ctx.ModuleVariantsForTests("libFoo")
-	expectedVariants := []string{
-		"android_arm64_armv8-a_shared",
-		"android_arm64_armv8-a_shared_current",
-		"android_arm_armv7-a-neon_shared",
-		"android_arm_armv7-a-neon_shared_current",
-	}
-	variantsMismatch := false
-	if len(variants) != len(expectedVariants) {
-		variantsMismatch = true
-	} else {
-		for _, v := range expectedVariants {
-			if !inList(v, variants) {
-				variantsMismatch = false
-			}
-		}
-	}
-	if variantsMismatch {
-		t.Errorf("variants of libFoo expected:\n")
-		for _, v := range expectedVariants {
-			t.Errorf("%q\n", v)
-		}
-		t.Errorf(", but got:\n")
-		for _, v := range variants {
-			t.Errorf("%q\n", v)
-		}
-	}
-
-	linkAgainstFoo := []string{"libBarA1"}
-	linkAgainstFooStubs := []string{"libBar", "libA1", "libBaz", "libQux", "libAnyApex"}
-
-	libFooPath := "out/bazel/execroot/__main__/libFoo.so"
-	for _, lib := range linkAgainstFoo {
-		libLinkRule := ctx.ModuleForTests(lib, "android_arm64_armv8-a_shared").Rule("ld")
-		libFlags := libLinkRule.Args["libFlags"]
-		if !strings.Contains(libFlags, libFooPath) {
-			t.Errorf("%q: %q is not found in %q", lib, libFooPath, libFlags)
-		}
-	}
-
-	libFooStubPath := "out/bazel/execroot/__main__/libFoo_stub_libs-current.so"
-	for _, lib := range linkAgainstFooStubs {
-		libLinkRule := ctx.ModuleForTests(lib, "android_arm64_armv8-a_shared").Rule("ld")
-		libFlags := libLinkRule.Args["libFlags"]
-		if !strings.Contains(libFlags, libFooStubPath) {
-			t.Errorf("%q: %q is not found in %q", lib, libFooStubPath, libFlags)
-		}
-	}
-}
-
 func TestVersioningMacro(t *testing.T) {
 	t.Parallel()
 	for _, tc := range []struct{ moduleName, expected string }{
@@ -4019,9 +3630,6 @@
 			shared: {
 				srcs: ["baz.c"],
 			},
-			bazel_module: {
-				bp2build_available: true,
-			},
 		}
 
 		cc_library_static {
@@ -5150,309 +4758,3 @@
 		})
 	}
 }
-
-func TestDclaLibraryInApex(t *testing.T) {
-	t.Parallel()
-	bp := `
-	cc_library_shared {
-		name: "cc_lib_in_apex",
-		srcs: ["foo.cc"],
-    apex_available: ["myapex"],
-		bazel_module: { label: "//foo/bar:bar" },
-	}`
-	label := "//foo/bar:bar"
-	arch64 := "arm64_armv8-a"
-	arch32 := "arm_armv7-a-neon"
-	apexCfgKey := android.ApexConfigKey{
-		WithinApex:     true,
-		ApexSdkVersion: "28",
-	}
-
-	result := android.GroupFixturePreparers(
-		prepareForCcTest,
-		android.FixtureRegisterWithContext(registerTestMutators),
-		android.FixtureModifyConfig(func(config android.Config) {
-			config.BazelContext = android.MockBazelContext{
-				OutputBaseDir: "outputbase",
-				LabelToCcInfo: map[string]cquery.CcInfo{
-					android.BuildMockBazelContextResultKey(label, arch32, android.Android, apexCfgKey): cquery.CcInfo{
-						RootDynamicLibraries: []string{"foo.so"},
-					},
-					android.BuildMockBazelContextResultKey(label, arch64, android.Android, apexCfgKey): cquery.CcInfo{
-						RootDynamicLibraries: []string{"foo.so"},
-					},
-				},
-				BazelRequests: make(map[string]bool),
-			}
-		}),
-	).RunTestWithBp(t, bp)
-	ctx := result.TestContext
-
-	// Test if the bazel request is queued correctly
-	key := android.BuildMockBazelContextRequestKey(label, cquery.GetCcInfo, arch32, android.Android, apexCfgKey)
-	if !ctx.Config().BazelContext.(android.MockBazelContext).BazelRequests[key] {
-		t.Errorf("Bazel request was not queued: %s", key)
-	}
-
-	sharedFoo := ctx.ModuleForTests(ccLibInApex, "android_arm_armv7-a-neon_shared_"+apexVariationName).Module()
-	producer := sharedFoo.(android.OutputFileProducer)
-	outputFiles, err := producer.OutputFiles("")
-	if err != nil {
-		t.Errorf("Unexpected error getting cc_object outputfiles %s", err)
-	}
-	expectedOutputFiles := []string{"outputbase/execroot/__main__/foo.so"}
-	android.AssertDeepEquals(t, "output files", expectedOutputFiles, outputFiles.Strings())
-}
-
-func TestDisableSanitizerVariantsInMixedBuilds(t *testing.T) {
-	t.Parallel()
-	bp := `
-		cc_library_static {
-			name: "foo_ubsan_minimal",
-			srcs: ["foo.cc"],
-			bazel_module: { label: "//foo_ubsan_minimal" },
-			sanitize: {
-				all_undefined: true,
-				integer_overflow: true,
-			},
-		}
-		cc_library_static {
-			name: "foo",
-			srcs: ["foo.cc"],
-			bazel_module: { label: "//foo" },
-			sanitize: {
-				address: true,
-				hwaddress: true,
-				fuzzer: true,
-				integer_overflow: true,
-				scs: true,
-			},
-		}
-		cc_library_static {
-			name: "foo_tsan",
-			srcs: ["foo.cc"],
-			bazel_module: { label: "//foo_tsan" },
-			sanitize: {
-				thread: true,
-			},
-		}
-		cc_library_static {
-			name: "foo_cfi",
-			srcs: ["foo.cc"],
-			bazel_module: { label: "//foo_cfi" },
-			sanitize: {
-				cfi: true,
-			},
-		}
-		cc_library_static {
-			name: "foo_memtag_stack",
-			srcs: ["foo.cc"],
-			bazel_module: { label: "//foo_memtag_stack" },
-			sanitize: {
-				memtag_stack: true,
-			},
-		}
-		cc_library_static {
-			name: "foo_memtag_heap",
-			srcs: ["foo.cc"],
-			bazel_module: { label: "//foo_memtag_heap" },
-			sanitize: {
-				memtag_heap: true,
-			},
-		}
-		cc_library_static {
-			name: "foo_safestack",
-			srcs: ["foo.cc"],
-			bazel_module: { label: "//foo_safestack" },
-			sanitize: {
-				safestack: true,
-			},
-		}
-		cc_library_static {
-			name: "foo_scudo",
-			srcs: ["foo.cc"],
-			bazel_module: { label: "//foo_scudo" },
-			sanitize: {
-				scudo: true,
-			},
-		}
-	`
-	testcases := []struct {
-		name                string
-		variant             string
-		expectedOutputPaths []string
-	}{
-		{
-			name:    "foo_ubsan_minimal",
-			variant: "android_arm64_armv8-a_static_apex28",
-			expectedOutputPaths: []string{
-				"outputbase/execroot/__main__/foo_ubsan_minimal.a",
-			},
-		},
-		{
-			name:    "foo",
-			variant: "android_arm64_armv8-a_static_apex28",
-			expectedOutputPaths: []string{
-				"outputbase/execroot/__main__/foo.a",
-			},
-		},
-		{
-			name:    "foo",
-			variant: "android_arm_armv7-a-neon_static_asan_apex28",
-			expectedOutputPaths: []string{
-				"out/soong/.intermediates/foo/android_arm_armv7-a-neon_static_asan_apex28/foo.a",
-			},
-		},
-		{
-			name:    "foo",
-			variant: "android_arm64_armv8-a_static_hwasan_apex28",
-			expectedOutputPaths: []string{
-				"out/soong/.intermediates/foo/android_arm64_armv8-a_static_hwasan_apex28/foo.a",
-			},
-		},
-		{
-			name:    "foo",
-			variant: "android_arm64_armv8-a_static_fuzzer_apex28",
-			expectedOutputPaths: []string{
-				"out/soong/.intermediates/foo/android_arm64_armv8-a_static_fuzzer_apex28/foo.a",
-			},
-		},
-		{
-			name:    "foo",
-			variant: "android_arm_armv7-a-neon_static_asan_fuzzer_apex28",
-			expectedOutputPaths: []string{
-				"out/soong/.intermediates/foo/android_arm_armv7-a-neon_static_asan_fuzzer_apex28/foo.a",
-			},
-		},
-		{
-			name:    "foo",
-			variant: "android_arm64_armv8-a_static_hwasan_fuzzer_apex28",
-			expectedOutputPaths: []string{
-				"out/soong/.intermediates/foo/android_arm64_armv8-a_static_hwasan_fuzzer_apex28/foo.a",
-			},
-		},
-		{
-			name:    "foo",
-			variant: "android_arm64_armv8-a_static_scs_apex28",
-			expectedOutputPaths: []string{
-				"out/soong/.intermediates/foo/android_arm64_armv8-a_static_scs_apex28/foo.a",
-			},
-		},
-		{
-			name:    "foo",
-			variant: "android_arm64_armv8-a_static_hwasan_scs_apex28",
-			expectedOutputPaths: []string{
-				"out/soong/.intermediates/foo/android_arm64_armv8-a_static_hwasan_scs_apex28/foo.a",
-			},
-		},
-		{
-			name:    "foo",
-			variant: "android_arm64_armv8-a_static_hwasan_scs_fuzzer_apex28",
-			expectedOutputPaths: []string{
-				"out/soong/.intermediates/foo/android_arm64_armv8-a_static_hwasan_scs_fuzzer_apex28/foo.a",
-			},
-		},
-		{
-			name:    "foo_tsan",
-			variant: "android_arm64_armv8-a_static_apex28",
-			expectedOutputPaths: []string{
-				"outputbase/execroot/__main__/foo_tsan.a",
-			},
-		},
-		{
-			name:    "foo_tsan",
-			variant: "android_arm64_armv8-a_static_tsan_apex28",
-			expectedOutputPaths: []string{
-				"out/soong/.intermediates/foo_tsan/android_arm64_armv8-a_static_tsan_apex28/foo_tsan.a",
-			},
-		},
-		{
-			name:    "foo_cfi",
-			variant: "android_arm64_armv8-a_static_apex28",
-			expectedOutputPaths: []string{
-				"outputbase/execroot/__main__/foo_cfi.a",
-			},
-		},
-		{
-			name:    "foo_cfi",
-			variant: "android_arm64_armv8-a_static_cfi_apex28",
-			expectedOutputPaths: []string{
-				"outputbase/execroot/__main__/foo_cfi.a",
-			},
-		},
-		{
-			name:    "foo_memtag_stack",
-			variant: "android_arm64_armv8-a_static_apex28",
-			expectedOutputPaths: []string{
-				"out/soong/.intermediates/foo_memtag_stack/android_arm64_armv8-a_static_apex28/foo_memtag_stack.a",
-			},
-		},
-		{
-			name:    "foo_memtag_heap",
-			variant: "android_arm64_armv8-a_static_apex28",
-			expectedOutputPaths: []string{
-				"out/soong/.intermediates/foo_memtag_heap/android_arm64_armv8-a_static_apex28/foo_memtag_heap.a",
-			},
-		},
-		{
-			name:    "foo_safestack",
-			variant: "android_arm64_armv8-a_static_apex28",
-			expectedOutputPaths: []string{
-				"out/soong/.intermediates/foo_safestack/android_arm64_armv8-a_static_apex28/foo_safestack.a",
-			},
-		},
-		{
-			name:    "foo_scudo",
-			variant: "android_arm64_armv8-a_static_apex28",
-			expectedOutputPaths: []string{
-				"out/soong/.intermediates/foo_scudo/android_arm64_armv8-a_static_apex28/foo_scudo.a",
-			},
-		},
-	}
-
-	ctx := android.GroupFixturePreparers(
-		prepareForCcTest,
-		prepareForAsanTest,
-		android.FixtureRegisterWithContext(registerTestMutators),
-		android.FixtureModifyConfig(func(config android.Config) {
-			config.BazelContext = android.MockBazelContext{
-				OutputBaseDir: "outputbase",
-				LabelToCcInfo: map[string]cquery.CcInfo{
-					"//foo_ubsan_minimal": {
-						RootStaticArchives: []string{"foo_ubsan_minimal.a"},
-					},
-					"//foo": {
-						RootStaticArchives: []string{"foo.a"},
-					},
-					"//foo_tsan": {
-						RootStaticArchives: []string{"foo_tsan.a"},
-					},
-					"//foo_cfi": {
-						RootStaticArchives: []string{"foo_cfi.a"},
-					},
-					"//foo_memtag_stack": {
-						RootStaticArchives: []string{"INVALID_ARCHIVE.a"},
-					},
-					"//foo_memtag_heap": {
-						RootStaticArchives: []string{"INVALID_ARCHIVE.a"},
-					},
-					"//foo_safestack": {
-						RootStaticArchives: []string{"INVALID_ARCHIVE.a"},
-					},
-					"//foo_scudo": {
-						RootStaticArchives: []string{"INVALID_ARCHIVE.a"},
-					},
-				},
-			}
-		}),
-	).RunTestWithBp(t, bp).TestContext
-
-	for _, tc := range testcases {
-		fooMod := ctx.ModuleForTests(tc.name, tc.variant).Module()
-		outputFiles, err := fooMod.(android.OutputFileProducer).OutputFiles("")
-		if err != nil {
-			t.Errorf("Unexpected error getting cc_object outputfiles %s", err)
-		}
-		android.AssertPathsRelativeToTopEquals(t, "output files", tc.expectedOutputPaths, outputFiles)
-	}
-}
diff --git a/cc/config/global.go b/cc/config/global.go
index 8b6df30..85ebd60 100644
--- a/cc/config/global.go
+++ b/cc/config/global.go
@@ -378,12 +378,6 @@
 	VisibilityDefaultFlag = "-fvisibility=default"
 )
 
-// BazelCcToolchainVars generates bzl file content containing variables for
-// Bazel's cc_toolchain configuration.
-func BazelCcToolchainVars(config android.Config) string {
-	return android.BazelToolchainVars(config, exportedVars)
-}
-
 func ExportStringList(name string, value []string) {
 	exportedVars.ExportStringList(name, value)
 }
diff --git a/cc/fdo_profile.go b/cc/fdo_profile.go
index cd3eb1e..02f68b5 100644
--- a/cc/fdo_profile.go
+++ b/cc/fdo_profile.go
@@ -16,10 +16,7 @@
 
 import (
 	"android/soong/android"
-	"android/soong/bazel"
-
 	"github.com/google/blueprint"
-	"github.com/google/blueprint/proptools"
 )
 
 func init() {
@@ -32,7 +29,6 @@
 
 type fdoProfile struct {
 	android.ModuleBase
-	android.BazelModuleBase
 
 	properties fdoProfileProperties
 }
@@ -41,50 +37,6 @@
 	Profile *string `android:"arch_variant"`
 }
 
-type bazelFdoProfileAttributes struct {
-	Profile bazel.StringAttribute
-}
-
-func (fp *fdoProfile) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	var profileAttr bazel.StringAttribute
-
-	archVariantProps := fp.GetArchVariantProperties(ctx, &fdoProfileProperties{})
-	for axis, configToProps := range archVariantProps {
-		for config, _props := range configToProps {
-			if archProps, ok := _props.(*fdoProfileProperties); ok {
-				if axis.String() == "arch" || axis.String() == "no_config" {
-					if archProps.Profile != nil {
-						profileAttr.SetSelectValue(axis, config, archProps.Profile)
-					}
-				}
-			}
-		}
-	}
-
-	// Ideally, cc_library_shared's fdo_profile attr can be a select statement so that we
-	// don't lift the restriction here. However, in cc_library_shared macro, fdo_profile
-	// is used as a string, we need to temporarily lift the host restriction until we can
-	// pass use fdo_profile attr with select statement
-	// https://cs.android.com/android/platform/superproject/+/master:build/bazel/rules/cc/cc_library_shared.bzl;l=127;drc=cc01bdfd39857eddbab04ef69ab6db22dcb1858a
-	// TODO(b/276287371): Drop the restriction override after fdo_profile path is handled properly
-	var noRestriction bazel.BoolAttribute
-	noRestriction.SetSelectValue(bazel.NoConfigAxis, "", proptools.BoolPtr(true))
-
-	ctx.CreateBazelTargetModuleWithRestrictions(
-		bazel.BazelTargetModuleProperties{
-			Bzl_load_location: "//build/bazel/rules/fdo:fdo_profile.bzl",
-			Rule_class:        "fdo_profile",
-		},
-		android.CommonAttributes{
-			Name: fp.Name(),
-		},
-		&bazelFdoProfileAttributes{
-			Profile: profileAttr,
-		},
-		noRestriction,
-	)
-}
-
 // FdoProfileInfo is provided by FdoProfileProvider
 type FdoProfileInfo struct {
 	Path android.Path
@@ -128,6 +80,5 @@
 	m := &fdoProfile{}
 	m.AddProperties(&m.properties)
 	android.InitAndroidMultiTargetsArchModule(m, android.DeviceSupported, android.MultilibBoth)
-	android.InitBazelModule(m)
 	return m
 }
diff --git a/cc/fuzz.go b/cc/fuzz.go
index ef2e68c..6b3a739 100644
--- a/cc/fuzz.go
+++ b/cc/fuzz.go
@@ -299,7 +299,7 @@
 }
 
 func NewFuzzer(hod android.HostOrDeviceSupported) *Module {
-	module, binary := newBinary(hod, false)
+	module, binary := newBinary(hod)
 	baseInstallerPath := "fuzz"
 
 	binary.baseInstaller = NewBaseInstaller(baseInstallerPath, baseInstallerPath, InstallInData)
diff --git a/cc/gen.go b/cc/gen.go
index 151f23d..2e72e30 100644
--- a/cc/gen.go
+++ b/cc/gen.go
@@ -19,9 +19,6 @@
 	"strings"
 
 	"android/soong/aidl_library"
-	"android/soong/bazel"
-	"android/soong/sysprop/bp2build"
-
 	"github.com/google/blueprint"
 
 	"android/soong/android"
@@ -181,41 +178,6 @@
 	})
 }
 
-type LexAttrs struct {
-	Srcs    bazel.LabelListAttribute
-	Lexopts bazel.StringListAttribute
-}
-
-type LexNames struct {
-	cSrcName bazel.LabelAttribute
-	srcName  bazel.LabelAttribute
-}
-
-func bp2BuildLex(ctx android.Bp2buildMutatorContext, moduleName string, ca compilerAttributes) LexNames {
-	names := LexNames{}
-	if !ca.lSrcs.IsEmpty() {
-		names.cSrcName = createLexTargetModule(ctx, moduleName+"_genlex_l", ca.lSrcs, ca.lexopts)
-	}
-	if !ca.llSrcs.IsEmpty() {
-		names.srcName = createLexTargetModule(ctx, moduleName+"_genlex_ll", ca.llSrcs, ca.lexopts)
-	}
-	return names
-}
-
-func createLexTargetModule(ctx android.Bp2buildMutatorContext, name string, srcs bazel.LabelListAttribute, opts bazel.StringListAttribute) bazel.LabelAttribute {
-	ctx.CreateBazelTargetModule(
-		bazel.BazelTargetModuleProperties{
-			Rule_class:        "genlex",
-			Bzl_load_location: "//build/bazel/rules/cc:flex.bzl",
-		},
-		android.CommonAttributes{Name: name},
-		&LexAttrs{
-			Srcs:    srcs,
-			Lexopts: opts,
-		})
-	return bazel.LabelAttribute{Value: &bazel.Label{Label: ":" + name}}
-}
-
 func genSysprop(ctx android.ModuleContext, syspropFile android.Path) (android.Path, android.Paths) {
 	headerFile := android.PathForModuleGen(ctx, "sysprop", "include", syspropFile.Rel()+".h")
 	publicHeaderFile := android.PathForModuleGen(ctx, "sysprop/public", "include", syspropFile.Rel()+".h")
@@ -240,35 +202,6 @@
 	return cppFile, headers.Paths()
 }
 
-func bp2buildCcSysprop(ctx android.Bp2buildMutatorContext, moduleName string, minSdkVersion *string, srcs bazel.LabelListAttribute) *bazel.LabelAttribute {
-	labels := bp2build.SyspropLibraryLabels{
-		SyspropLibraryLabel:  moduleName + "_sysprop_library",
-		CcStaticLibraryLabel: moduleName + "_cc_sysprop_library_static",
-	}
-	bp2build.Bp2buildBaseSyspropLibrary(ctx, labels.SyspropLibraryLabel, srcs)
-	bp2build.Bp2buildSyspropCc(ctx, labels, minSdkVersion)
-	return createLabelAttributeCorrespondingToSrcs(":"+labels.CcStaticLibraryLabel, srcs)
-}
-
-// Creates a LabelAttribute for a given label where the value is only set for
-// the same config values that have values in a given LabelListAttribute
-func createLabelAttributeCorrespondingToSrcs(baseLabelName string, srcs bazel.LabelListAttribute) *bazel.LabelAttribute {
-	baseLabel := bazel.Label{Label: baseLabelName}
-	label := bazel.LabelAttribute{}
-	if !srcs.Value.IsNil() && !srcs.Value.IsEmpty() {
-		label.Value = &baseLabel
-		return &label
-	}
-	for axis, configToSrcs := range srcs.ConfigurableValues {
-		for config, val := range configToSrcs {
-			if !val.IsNil() && !val.IsEmpty() {
-				label.SetSelectValue(axis, config, baseLabel)
-			}
-		}
-	}
-	return &label
-}
-
 // Used to communicate information from the genSources method back to the library code that uses
 // it.
 type generatedSourceInfo struct {
diff --git a/cc/generated_cc_library.go b/cc/generated_cc_library.go
index 8428e94..b1084e4 100644
--- a/cc/generated_cc_library.go
+++ b/cc/generated_cc_library.go
@@ -28,9 +28,6 @@
 		staticAndSharedLibrarySdkMemberType,
 	}
 
-	module.bazelable = true
-	module.bazelHandler = &ccLibraryBazelHandler{module: module}
-
 	module.generators = append(module.generators, callbacks)
 
 	return module.Init()
diff --git a/cc/genrule.go b/cc/genrule.go
index 63c728c..0c06ae6 100644
--- a/cc/genrule.go
+++ b/cc/genrule.go
@@ -62,7 +62,6 @@
 	android.InitAndroidArchModule(module, android.HostAndDeviceSupported, android.MultilibBoth)
 
 	android.InitApexModule(module)
-	android.InitBazelModule(module)
 
 	return module
 }
diff --git a/cc/library.go b/cc/library.go
index 719455c..2aa0b1b 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -24,28 +24,11 @@
 	"sync"
 
 	"android/soong/android"
-	"android/soong/bazel"
-	"android/soong/bazel/cquery"
-
 	"github.com/google/blueprint"
 	"github.com/google/blueprint/pathtools"
 	"github.com/google/blueprint/proptools"
 )
 
-var (
-	alwaysLinkLibraries = map[string]bool{
-		// Coverage libraries are _always_ added as a whole_static_dep. By converting as these as
-		// alwayslink = True, we can add these as to deps (e.g. as a regular static dep) in Bazel
-		// without any extra complications in cc_shared_library roots to prevent linking the same
-		// library repeatedly.
-		"libprofile-extras_ndk":               true,
-		"libprofile-extras":                   true,
-		"libprofile-clang-extras_ndk":         true,
-		"libprofile-clang-extras_cfi_support": true,
-		"libprofile-clang-extras":             true,
-	}
-)
-
 // LibraryProperties is a collection of properties shared by cc library rules/cc.
 type LibraryProperties struct {
 	// local file name to pass to the linker as -unexported_symbols_list
@@ -235,336 +218,6 @@
 	ctx.RegisterModuleType("cc_library_host_shared", LibraryHostSharedFactory)
 }
 
-// TODO(b/199902614): Can this be factored to share with the other Attributes?
-// For bp2build conversion.
-type bazelCcLibraryAttributes struct {
-	// Attributes pertaining to both static and shared variants.
-	Srcs    bazel.LabelListAttribute
-	Srcs_c  bazel.LabelListAttribute
-	Srcs_as bazel.LabelListAttribute
-
-	Copts      bazel.StringListAttribute
-	Cppflags   bazel.StringListAttribute
-	Conlyflags bazel.StringListAttribute
-	Asflags    bazel.StringListAttribute
-
-	Hdrs bazel.LabelListAttribute
-
-	Deps                              bazel.LabelListAttribute
-	Implementation_deps               bazel.LabelListAttribute
-	Dynamic_deps                      bazel.LabelListAttribute
-	Implementation_dynamic_deps       bazel.LabelListAttribute
-	Whole_archive_deps                bazel.LabelListAttribute
-	Implementation_whole_archive_deps bazel.LabelListAttribute
-	System_dynamic_deps               bazel.LabelListAttribute
-
-	Export_includes        bazel.StringListAttribute
-	Export_system_includes bazel.StringListAttribute
-	Local_includes         bazel.StringListAttribute
-	Absolute_includes      bazel.StringListAttribute
-	Linkopts               bazel.StringListAttribute
-	Rtti                   bazel.BoolAttribute
-
-	Stl     *string
-	Cpp_std *string
-	C_std   *string
-
-	// This is shared only.
-	Additional_linker_inputs bazel.LabelListAttribute
-
-	// Common properties shared between both shared and static variants.
-	Shared staticOrSharedAttributes
-	Static staticOrSharedAttributes
-
-	Strip stripAttributes
-
-	Features bazel.StringListAttribute
-}
-
-type aidlLibraryAttributes struct {
-	Srcs        bazel.LabelListAttribute
-	Include_dir *string
-	Tags        bazel.StringListAttribute
-}
-
-type ccAidlLibraryAttributes struct {
-	Deps                        bazel.LabelListAttribute
-	Implementation_deps         bazel.LabelListAttribute
-	Implementation_dynamic_deps bazel.LabelListAttribute
-	Tags                        bazel.StringListAttribute
-
-	SdkAttributes
-	includesAttributes
-}
-
-type stripAttributes struct {
-	Keep_symbols                 bazel.BoolAttribute
-	Keep_symbols_and_debug_frame bazel.BoolAttribute
-	Keep_symbols_list            bazel.StringListAttribute
-	All                          bazel.BoolAttribute
-	None                         bazel.BoolAttribute
-}
-
-func stripAttrsFromLinkerAttrs(la *linkerAttributes) stripAttributes {
-	return stripAttributes{
-		Keep_symbols:                 la.stripKeepSymbols,
-		Keep_symbols_and_debug_frame: la.stripKeepSymbolsAndDebugFrame,
-		Keep_symbols_list:            la.stripKeepSymbolsList,
-		All:                          la.stripAll,
-		None:                         la.stripNone,
-	}
-}
-
-func libraryBp2Build(ctx android.Bp2buildMutatorContext, m *Module) {
-	sharedAttrs := bp2BuildParseSharedProps(ctx, m)
-	staticAttrs := bp2BuildParseStaticProps(ctx, m)
-	baseAttributes := bp2BuildParseBaseProps(ctx, m)
-	compilerAttrs := baseAttributes.compilerAttributes
-	linkerAttrs := baseAttributes.linkerAttributes
-	exportedIncludes := bp2BuildParseExportedIncludes(ctx, m, &compilerAttrs.includes)
-
-	srcs := compilerAttrs.srcs
-
-	sharedAttrs.Dynamic_deps.Add(baseAttributes.protoDependency)
-	staticAttrs.Deps.Add(baseAttributes.protoDependency)
-
-	asFlags := compilerAttrs.asFlags
-	if compilerAttrs.asSrcs.IsEmpty() && sharedAttrs.Srcs_as.IsEmpty() && staticAttrs.Srcs_as.IsEmpty() {
-		// Skip asflags for BUILD file simplicity if there are no assembly sources.
-		asFlags = bazel.MakeStringListAttribute(nil)
-	}
-
-	sharedFeatures := baseAttributes.features.Clone().Append(sharedAttrs.Features)
-	sharedFeatures.DeduplicateAxesFromBase()
-	staticFeatures := baseAttributes.features.Clone().Append(staticAttrs.Features)
-	staticFeatures.DeduplicateAxesFromBase()
-
-	staticCommonAttrs := staticOrSharedAttributes{
-		Srcs:    *srcs.Clone().Append(staticAttrs.Srcs),
-		Srcs_c:  *compilerAttrs.cSrcs.Clone().Append(staticAttrs.Srcs_c),
-		Srcs_as: *compilerAttrs.asSrcs.Clone().Append(staticAttrs.Srcs_as),
-		Copts:   *compilerAttrs.copts.Clone().Append(staticAttrs.Copts),
-		Hdrs:    *compilerAttrs.hdrs.Clone().Append(staticAttrs.Hdrs),
-
-		Deps:                              *linkerAttrs.deps.Clone().Append(staticAttrs.Deps),
-		Implementation_deps:               *linkerAttrs.implementationDeps.Clone().Append(staticAttrs.Implementation_deps),
-		Dynamic_deps:                      *linkerAttrs.dynamicDeps.Clone().Append(staticAttrs.Dynamic_deps),
-		Implementation_dynamic_deps:       *linkerAttrs.implementationDynamicDeps.Clone().Append(staticAttrs.Implementation_dynamic_deps),
-		Implementation_whole_archive_deps: linkerAttrs.implementationWholeArchiveDeps,
-		Whole_archive_deps:                *linkerAttrs.wholeArchiveDeps.Clone().Append(staticAttrs.Whole_archive_deps),
-		System_dynamic_deps:               *linkerAttrs.systemDynamicDeps.Clone().Append(staticAttrs.System_dynamic_deps),
-		Runtime_deps:                      linkerAttrs.runtimeDeps,
-		SdkAttributes:                     Bp2BuildParseSdkAttributes(m),
-		Native_coverage:                   baseAttributes.Native_coverage,
-		Additional_compiler_inputs:        compilerAttrs.additionalCompilerInputs,
-	}
-
-	includeAttrs := includesAttributes{
-		Export_includes:          exportedIncludes.Includes,
-		Export_absolute_includes: exportedIncludes.AbsoluteIncludes,
-		Export_system_includes:   exportedIncludes.SystemIncludes,
-		Local_includes:           compilerAttrs.localIncludes,
-		Absolute_includes:        compilerAttrs.absoluteIncludes,
-	}
-
-	sharedCommonAttrs := staticOrSharedAttributes{
-		Srcs:    *srcs.Clone().Append(sharedAttrs.Srcs),
-		Srcs_c:  *compilerAttrs.cSrcs.Clone().Append(sharedAttrs.Srcs_c),
-		Srcs_as: *compilerAttrs.asSrcs.Clone().Append(sharedAttrs.Srcs_as),
-		Copts:   *compilerAttrs.copts.Clone().Append(sharedAttrs.Copts),
-		Hdrs:    *compilerAttrs.hdrs.Clone().Append(sharedAttrs.Hdrs),
-
-		Deps:                              *linkerAttrs.deps.Clone().Append(sharedAttrs.Deps),
-		Implementation_deps:               *linkerAttrs.implementationDeps.Clone().Append(sharedAttrs.Implementation_deps),
-		Dynamic_deps:                      *linkerAttrs.dynamicDeps.Clone().Append(sharedAttrs.Dynamic_deps),
-		Implementation_dynamic_deps:       *linkerAttrs.implementationDynamicDeps.Clone().Append(sharedAttrs.Implementation_dynamic_deps),
-		Whole_archive_deps:                *linkerAttrs.wholeArchiveDeps.Clone().Append(sharedAttrs.Whole_archive_deps),
-		Implementation_whole_archive_deps: linkerAttrs.implementationWholeArchiveDeps,
-		System_dynamic_deps:               *linkerAttrs.systemDynamicDeps.Clone().Append(sharedAttrs.System_dynamic_deps),
-		Runtime_deps:                      linkerAttrs.runtimeDeps,
-		SdkAttributes:                     Bp2BuildParseSdkAttributes(m),
-		Native_coverage:                   baseAttributes.Native_coverage,
-		Additional_compiler_inputs:        compilerAttrs.additionalCompilerInputs,
-	}
-
-	staticTargetAttrs := &bazelCcLibraryStaticAttributes{
-		staticOrSharedAttributes: staticCommonAttrs,
-		includesAttributes:       includeAttrs,
-
-		Cppflags:   compilerAttrs.cppFlags,
-		Conlyflags: compilerAttrs.conlyFlags,
-		Asflags:    asFlags,
-
-		Rtti:    compilerAttrs.rtti,
-		Stl:     compilerAttrs.stl,
-		Cpp_std: compilerAttrs.cppStd,
-		C_std:   compilerAttrs.cStd,
-
-		Features: *staticFeatures,
-	}
-
-	sharedTargetAttrs := &bazelCcLibrarySharedAttributes{
-		staticOrSharedAttributes: sharedCommonAttrs,
-		includesAttributes:       includeAttrs,
-
-		Cppflags:   compilerAttrs.cppFlags,
-		Conlyflags: compilerAttrs.conlyFlags,
-		Asflags:    asFlags,
-
-		Linkopts:        linkerAttrs.linkopts,
-		Rtti:            compilerAttrs.rtti,
-		Stl:             compilerAttrs.stl,
-		Cpp_std:         compilerAttrs.cppStd,
-		C_std:           compilerAttrs.cStd,
-		Use_version_lib: linkerAttrs.useVersionLib,
-
-		Additional_linker_inputs: linkerAttrs.additionalLinkerInputs,
-
-		Strip:                             stripAttrsFromLinkerAttrs(&linkerAttrs),
-		Features:                          *sharedFeatures,
-		bazelCcHeaderAbiCheckerAttributes: bp2buildParseAbiCheckerProps(ctx, m),
-
-		Fdo_profile: compilerAttrs.fdoProfile,
-	}
-
-	if compilerAttrs.stubsSymbolFile != nil && len(compilerAttrs.stubsVersions.Value) > 0 {
-		sharedTargetAttrs.Stubs_symbol_file = compilerAttrs.stubsSymbolFile
-	}
-
-	sharedTargetAttrs.Stem = compilerAttrs.stem
-	sharedTargetAttrs.Suffix = compilerAttrs.suffix
-
-	for axis, configToProps := range m.GetArchVariantProperties(ctx, &LibraryProperties{}) {
-		for cfg, props := range configToProps {
-			if props, ok := props.(*LibraryProperties); ok {
-				if props.Inject_bssl_hash != nil {
-					// This is an edge case applies only to libcrypto
-					if m.Name() == "libcrypto" || m.Name() == "libcrypto_for_testing" {
-						sharedTargetAttrs.Inject_bssl_hash.SetSelectValue(axis, cfg, props.Inject_bssl_hash)
-					} else {
-						ctx.PropertyErrorf("inject_bssl_hash", "only applies to libcrypto")
-					}
-				}
-			}
-		}
-	}
-
-	staticProps := bazel.BazelTargetModuleProperties{
-		Rule_class:        "cc_library_static",
-		Bzl_load_location: "//build/bazel/rules/cc:cc_library_static.bzl",
-	}
-	sharedProps := bazel.BazelTargetModuleProperties{
-		Rule_class:        "cc_library_shared",
-		Bzl_load_location: "//build/bazel/rules/cc:cc_library_shared.bzl",
-	}
-
-	if _, ok := alwaysLinkLibraries[m.Name()]; ok {
-		staticTargetAttrs.Alwayslink = proptools.BoolPtr(true)
-	}
-
-	var tagsForStaticVariant bazel.StringListAttribute
-	if compilerAttrs.stubsSymbolFile == nil && len(compilerAttrs.stubsVersions.Value) == 0 {
-		tagsForStaticVariant = android.ApexAvailableTagsWithoutTestApexes(ctx, m)
-	}
-	tagsForStaticVariant.Append(bazel.StringListAttribute{Value: staticAttrs.Apex_available})
-
-	tagsForSharedVariant := android.ApexAvailableTagsWithoutTestApexes(ctx, m)
-	tagsForSharedVariant.Append(bazel.StringListAttribute{Value: sharedAttrs.Apex_available})
-
-	ctx.CreateBazelTargetModuleWithRestrictions(staticProps,
-		android.CommonAttributes{
-			Name: m.Name() + "_bp2build_cc_library_static",
-			Tags: tagsForStaticVariant,
-			// TODO: b/303307456 - Remove this when data is properly supported in cc rules.
-			SkipData: proptools.BoolPtr(true),
-		},
-		staticTargetAttrs, staticAttrs.Enabled)
-	ctx.CreateBazelTargetModuleWithRestrictions(sharedProps,
-		android.CommonAttributes{
-			Name: m.Name(),
-			Tags: tagsForSharedVariant,
-			// TODO: b/303307456 - Remove this when data is properly supported in cc rules.
-			SkipData: proptools.BoolPtr(true),
-		},
-		sharedTargetAttrs, sharedAttrs.Enabled)
-
-	createStubsBazelTargetIfNeeded(ctx, m, compilerAttrs, exportedIncludes, baseAttributes)
-}
-
-func createStubsBazelTargetIfNeeded(ctx android.Bp2buildMutatorContext, m *Module, compilerAttrs compilerAttributes, exportedIncludes BazelIncludes, baseAttributes baseAttributes) {
-	if compilerAttrs.stubsSymbolFile != nil && len(compilerAttrs.stubsVersions.Value) > 0 {
-		stubSuitesProps := bazel.BazelTargetModuleProperties{
-			Rule_class:        "cc_stub_suite",
-			Bzl_load_location: "//build/bazel/rules/cc:cc_stub_library.bzl",
-		}
-		soname := m.Name() + ".so"
-		stubSuitesAttrs := &bazelCcStubSuiteAttributes{
-			Symbol_file:          compilerAttrs.stubsSymbolFile,
-			Versions:             compilerAttrs.stubsVersions,
-			Export_includes:      exportedIncludes.Includes,
-			Soname:               &soname,
-			Source_library_label: proptools.StringPtr(m.GetBazelLabel(ctx, m)),
-			Deps:                 baseAttributes.deps,
-			Api_surface:          proptools.StringPtr("module-libapi"),
-		}
-		if _, isNdk := ctx.ModuleFromName(m.Name() + ".ndk"); isNdk {
-			stubSuitesAttrs.Included_in_ndk = proptools.BoolPtr(true)
-		}
-
-		ctx.CreateBazelTargetModule(stubSuitesProps, android.CommonAttributes{
-			Name: m.Name() + "_stub_libs",
-			// TODO: b/303307456 - Remove this when data is properly supported in cc rules.
-			SkipData: proptools.BoolPtr(true),
-		},
-			stubSuitesAttrs)
-
-		// Add alias for the stub shared_library in @api_surfaces repository
-		currentModuleLibApiDir := ctx.Config().ApiSurfacesDir(android.ModuleLibApi, "current")
-		actualLabelInMainWorkspace := bazel.Label{
-			Label: fmt.Sprintf("@//%s:%s%s", ctx.ModuleDir(), m.Name(), stubsSuffix),
-		}
-		ctx.CreateBazelTargetAliasInDir(currentModuleLibApiDir, m.Name(), actualLabelInMainWorkspace)
-
-		// Add alias for headers exported by the stub library
-		headerLabelInMainWorkspace := bazel.Label{
-			// This label is generated from cc_stub_suite macro
-			Label: fmt.Sprintf("@//%s:%s_stub_libs_%s_headers", ctx.ModuleDir(), m.Name(), android.ModuleLibApi.String()),
-		}
-		headerAlias := m.Name() + "_headers"
-		ctx.CreateBazelTargetAliasInDir(currentModuleLibApiDir, headerAlias, headerLabelInMainWorkspace)
-	}
-}
-
-// wrapper struct to flatten the arch and os specific export_include_dirs
-// flattening is necessary since we want to export apis of all arches even when we build for x86 (e.g.)
-type bazelCcApiLibraryHeadersAttributes struct {
-	bazelCcLibraryHeadersAttributes
-
-	Arch *string
-}
-
-func (a *bazelCcApiLibraryHeadersAttributes) isEmpty() bool {
-	return a.Export_includes.IsEmpty() &&
-		a.Export_system_includes.IsEmpty() &&
-		a.Deps.IsEmpty()
-}
-
-type apiIncludes struct {
-	name  string // name of the Bazel target in the generated bp2build workspace
-	attrs bazelCcApiLibraryHeadersAttributes
-}
-
-func (includes *apiIncludes) isEmpty() bool {
-	return includes.attrs.isEmpty()
-}
-
-func (includes *apiIncludes) addDep(name string) {
-	l := bazel.Label{Label: ":" + name}
-	ll := bazel.MakeLabelList([]bazel.Label{l})
-	lla := bazel.MakeLabelListAttribute(ll)
-	includes.attrs.Deps.Append(lla)
-}
-
 // cc_library creates both static and/or shared libraries for a device and/or
 // host. By default, a cc_library has a single variant that targets the device.
 // Specifying `host_supported: true` also creates a library that targets the
@@ -577,8 +230,6 @@
 		staticLibrarySdkMemberType,
 		staticAndSharedLibrarySdkMemberType,
 	}
-	module.bazelable = true
-	module.bazelHandler = &ccLibraryBazelHandler{module: module}
 	return module.Init()
 }
 
@@ -587,8 +238,6 @@
 	module, library := NewLibrary(android.HostAndDeviceSupported)
 	library.BuildOnlyStatic()
 	module.sdkMemberTypes = []android.SdkMemberType{staticLibrarySdkMemberType}
-	module.bazelable = true
-	module.bazelHandler = &ccLibraryBazelHandler{module: module}
 	return module.Init()
 }
 
@@ -597,8 +246,6 @@
 	module, library := NewLibrary(android.HostAndDeviceSupported)
 	library.BuildOnlyShared()
 	module.sdkMemberTypes = []android.SdkMemberType{sharedLibrarySdkMemberType}
-	module.bazelable = true
-	module.bazelHandler = &ccLibraryBazelHandler{module: module}
 	return module.Init()
 }
 
@@ -608,8 +255,6 @@
 	module, library := NewLibrary(android.HostSupported)
 	library.BuildOnlyStatic()
 	module.sdkMemberTypes = []android.SdkMemberType{staticLibrarySdkMemberType}
-	module.bazelable = true
-	module.bazelHandler = &ccLibraryBazelHandler{module: module}
 	return module.Init()
 }
 
@@ -618,8 +263,6 @@
 	module, library := NewLibrary(android.HostSupported)
 	library.BuildOnlyShared()
 	module.sdkMemberTypes = []android.SdkMemberType{sharedLibrarySdkMemberType}
-	module.bazelable = true
-	module.bazelHandler = &ccLibraryBazelHandler{module: module}
 	return module.Init()
 }
 
@@ -782,145 +425,6 @@
 	apiListCoverageXmlPath android.ModuleOutPath
 }
 
-type ccLibraryBazelHandler struct {
-	module *Module
-}
-
-var _ BazelHandler = (*ccLibraryBazelHandler)(nil)
-
-// generateStaticBazelBuildActions constructs the StaticLibraryInfo Soong
-// provider from a Bazel shared library's CcInfo provider.
-func (handler *ccLibraryBazelHandler) generateStaticBazelBuildActions(ctx android.ModuleContext, label string, ccInfo cquery.CcInfo) {
-	rootStaticArchives := ccInfo.RootStaticArchives
-	if len(rootStaticArchives) != 1 {
-		ctx.ModuleErrorf("expected exactly one root archive file for '%s', but got %s", label, rootStaticArchives)
-		return
-	}
-	var outputFilePath android.Path = android.PathForBazelOut(ctx, rootStaticArchives[0])
-	if len(ccInfo.TidyFiles) > 0 {
-		handler.module.tidyFiles = android.PathsForBazelOut(ctx, ccInfo.TidyFiles)
-		outputFilePath = android.AttachValidationActions(ctx, outputFilePath, handler.module.tidyFiles)
-	}
-	handler.module.outputFile = android.OptionalPathForPath(outputFilePath)
-
-	objPaths := ccInfo.CcObjectFiles
-	objFiles := make(android.Paths, len(objPaths))
-	for i, objPath := range objPaths {
-		objFiles[i] = android.PathForBazelOut(ctx, objPath)
-	}
-	objects := Objects{
-		objFiles: objFiles,
-	}
-
-	ctx.SetProvider(StaticLibraryInfoProvider, StaticLibraryInfo{
-		StaticLibrary: outputFilePath,
-		ReuseObjects:  objects,
-		Objects:       objects,
-
-		// TODO(b/190524881): Include transitive static libraries in this provider to support
-		// static libraries with deps.
-		TransitiveStaticLibrariesForOrdering: android.NewDepSetBuilder[android.Path](android.TOPOLOGICAL).
-			Direct(outputFilePath).
-			Build(),
-	})
-
-	return
-}
-
-// generateSharedBazelBuildActions constructs the SharedLibraryInfo Soong
-// provider from a Bazel shared library's CcInfo provider.
-func (handler *ccLibraryBazelHandler) generateSharedBazelBuildActions(ctx android.ModuleContext, label string, ccInfo cquery.CcInfo) {
-	rootDynamicLibraries := ccInfo.RootDynamicLibraries
-
-	if len(rootDynamicLibraries) != 1 {
-		ctx.ModuleErrorf("expected exactly one root dynamic library file for '%s', but got %s", label, rootDynamicLibraries)
-		return
-	}
-	var outputFilePath android.Path = android.PathForBazelOut(ctx, rootDynamicLibraries[0])
-	if len(ccInfo.TidyFiles) > 0 {
-		handler.module.tidyFiles = android.PathsForBazelOut(ctx, ccInfo.TidyFiles)
-		outputFilePath = android.AttachValidationActions(ctx, outputFilePath, handler.module.tidyFiles)
-	}
-
-	handler.module.outputFile = android.OptionalPathForPath(outputFilePath)
-	handler.module.linker.(*libraryDecorator).unstrippedOutputFile = android.PathForBazelOut(ctx, ccInfo.UnstrippedOutput)
-
-	var tocFile android.OptionalPath
-	if len(ccInfo.TocFile) > 0 {
-		tocFile = android.OptionalPathForPath(android.PathForBazelOut(ctx, ccInfo.TocFile))
-	}
-	handler.module.linker.(*libraryDecorator).tocFile = tocFile
-
-	if len(ccInfo.AbiDiffFiles) > 0 {
-		handler.module.linker.(*libraryDecorator).sAbiDiff = android.PathsForBazelOut(ctx, ccInfo.AbiDiffFiles)
-	}
-
-	ctx.SetProvider(SharedLibraryInfoProvider, SharedLibraryInfo{
-		TableOfContents: tocFile,
-		SharedLibrary:   outputFilePath,
-		Target:          ctx.Target(),
-		// TODO(b/190524881): Include transitive static libraries in this provider to support
-		// static libraries with deps. The provider key for this is TransitiveStaticLibrariesForOrdering.
-	})
-}
-
-func (handler *ccLibraryBazelHandler) QueueBazelCall(ctx android.BaseModuleContext, label string) {
-	bazelCtx := ctx.Config().BazelContext
-	bazelCtx.QueueBazelRequest(label, cquery.GetCcInfo, android.GetConfigKeyApexVariant(ctx, GetApexConfigKey(ctx)))
-	if v := handler.module.library.stubsVersion(); v != "" {
-		stubsLabel := label + "_stub_libs-" + v
-		bazelCtx.QueueBazelRequest(stubsLabel, cquery.GetCcInfo, android.GetConfigKeyApexVariant(ctx, GetApexConfigKey(ctx)))
-	}
-}
-
-func (handler *ccLibraryBazelHandler) ProcessBazelQueryResponse(ctx android.ModuleContext, label string) {
-	if v := handler.module.library.stubsVersion(); v != "" {
-		// if we are a stubs variant, just use the Bazel stubs target
-		label = label + "_stub_libs-" + v
-	}
-	bazelCtx := ctx.Config().BazelContext
-	ccInfo, err := bazelCtx.GetCcInfo(label, android.GetConfigKeyApexVariant(ctx, GetApexConfigKey(ctx)))
-	if err != nil {
-		ctx.ModuleErrorf("Error getting Bazel CcInfo: %s", err)
-		return
-	}
-
-	if handler.module.static() {
-		handler.generateStaticBazelBuildActions(ctx, label, ccInfo)
-	} else if handler.module.Shared() {
-		handler.generateSharedBazelBuildActions(ctx, label, ccInfo)
-	} else {
-		ctx.ModuleErrorf("Unhandled bazel case for %s (neither shared nor static!)", ctx.ModuleName())
-	}
-
-	handler.module.linker.(*libraryDecorator).setFlagExporterInfoFromCcInfo(ctx, ccInfo)
-	handler.module.maybeUnhideFromMake()
-
-	if i, ok := handler.module.linker.(snapshotLibraryInterface); ok {
-		// Dependencies on this library will expect collectedSnapshotHeaders to
-		// be set, otherwise validation will fail. For now, set this to an empty
-		// list.
-		// TODO(b/190533363): More closely mirror the collectHeadersForSnapshot
-		// implementation.
-		i.(*libraryDecorator).collectedSnapshotHeaders = android.Paths{}
-	}
-
-	handler.module.setAndroidMkVariablesFromCquery(ccInfo.CcAndroidMkInfo)
-
-	cctx := moduleContextFromAndroidModuleContext(ctx, handler.module)
-	addStubDependencyProviders(cctx)
-}
-
-func (library *libraryDecorator) setFlagExporterInfoFromCcInfo(ctx android.ModuleContext, ccInfo cquery.CcInfo) {
-	flagExporterInfo := flagExporterInfoFromCcInfo(ctx, ccInfo)
-	// flag exporters consolidates properties like includes, flags, dependencies that should be
-	// exported from this module to other modules
-	ctx.SetProvider(FlagExporterInfoProvider, flagExporterInfo)
-	// Store flag info to be passed along to androidmk
-	// TODO(b/184387147): Androidmk should be done in Bazel, not Soong.
-	library.flagExporterInfo = &flagExporterInfo
-}
-
 func GlobHeadersForSnapshot(ctx android.ModuleContext, paths android.Paths) android.Paths {
 	ret := android.Paths{}
 
@@ -935,11 +439,6 @@
 			continue
 		}
 
-		// Filter out the generated headers from bazel.
-		if strings.HasPrefix(dir, android.PathForBazelOut(ctx, "bazel-out").String()) {
-			continue
-		}
-
 		// libeigen wrongly exports the root directory "external/eigen". But only two
 		// subdirectories "Eigen" and "unsupported" contain exported header files. Even worse
 		// some of them have no extension. So we need special treatment for libeigen in order
@@ -2621,7 +2120,7 @@
 // normalizeVersions modifies `versions` in place, so that each raw version
 // string becomes its normalized canonical form.
 // Validates that the versions in `versions` are specified in least to greatest order.
-func normalizeVersions(ctx android.BazelConversionPathContext, versions []string) {
+func normalizeVersions(ctx android.BaseModuleContext, versions []string) {
 	var previous android.ApiLevel
 	for i, v := range versions {
 		ver, err := android.ApiLevelFromUser(ctx, v)
@@ -2792,263 +2291,3 @@
 
 	return outputFile
 }
-
-func bp2buildParseAbiCheckerProps(ctx android.Bp2buildMutatorContext, module *Module) bazelCcHeaderAbiCheckerAttributes {
-	lib, ok := module.linker.(*libraryDecorator)
-	if !ok {
-		return bazelCcHeaderAbiCheckerAttributes{}
-	}
-
-	abiChecker := lib.getHeaderAbiCheckerProperties(ctx)
-
-	abiCheckerAttrs := bazelCcHeaderAbiCheckerAttributes{
-		Abi_checker_enabled:                 abiChecker.Enabled,
-		Abi_checker_exclude_symbol_versions: abiChecker.Exclude_symbol_versions,
-		Abi_checker_exclude_symbol_tags:     abiChecker.Exclude_symbol_tags,
-		Abi_checker_check_all_apis:          abiChecker.Check_all_apis,
-		Abi_checker_diff_flags:              abiChecker.Diff_flags,
-	}
-	if abiChecker.Symbol_file != nil {
-		symbolFile := android.BazelLabelForModuleSrcSingle(ctx, *abiChecker.Symbol_file)
-		abiCheckerAttrs.Abi_checker_symbol_file = &symbolFile
-	}
-
-	return abiCheckerAttrs
-}
-
-func sharedOrStaticLibraryBp2Build(ctx android.Bp2buildMutatorContext, module *Module, isStatic bool) {
-	baseAttributes := bp2BuildParseBaseProps(ctx, module)
-	compilerAttrs := baseAttributes.compilerAttributes
-	linkerAttrs := baseAttributes.linkerAttributes
-
-	exportedIncludes := bp2BuildParseExportedIncludes(ctx, module, &compilerAttrs.includes)
-	includeAttrs := includesAttributes{
-		Export_includes:          exportedIncludes.Includes,
-		Export_absolute_includes: exportedIncludes.AbsoluteIncludes,
-		Export_system_includes:   exportedIncludes.SystemIncludes,
-		Local_includes:           compilerAttrs.localIncludes,
-		Absolute_includes:        compilerAttrs.absoluteIncludes,
-	}
-
-	// Append shared/static{} stanza properties. These won't be specified on
-	// cc_library_* itself, but may be specified in cc_defaults that this module
-	// depends on.
-	libSharedOrStaticAttrs := bp2BuildParseLibProps(ctx, module, isStatic)
-
-	compilerAttrs.srcs.Append(libSharedOrStaticAttrs.Srcs)
-	compilerAttrs.cSrcs.Append(libSharedOrStaticAttrs.Srcs_c)
-	compilerAttrs.asSrcs.Append(libSharedOrStaticAttrs.Srcs_as)
-	compilerAttrs.copts.Append(libSharedOrStaticAttrs.Copts)
-
-	linkerAttrs.deps.Append(libSharedOrStaticAttrs.Deps)
-	linkerAttrs.implementationDeps.Append(libSharedOrStaticAttrs.Implementation_deps)
-	linkerAttrs.dynamicDeps.Append(libSharedOrStaticAttrs.Dynamic_deps)
-	linkerAttrs.implementationDynamicDeps.Append(libSharedOrStaticAttrs.Implementation_dynamic_deps)
-	linkerAttrs.systemDynamicDeps.Append(libSharedOrStaticAttrs.System_dynamic_deps)
-
-	asFlags := compilerAttrs.asFlags
-	if compilerAttrs.asSrcs.IsEmpty() {
-		// Skip asflags for BUILD file simplicity if there are no assembly sources.
-		asFlags = bazel.MakeStringListAttribute(nil)
-	}
-
-	features := baseAttributes.features.Clone().Append(libSharedOrStaticAttrs.Features)
-	features.DeduplicateAxesFromBase()
-
-	commonAttrs := staticOrSharedAttributes{
-		Srcs:    compilerAttrs.srcs,
-		Srcs_c:  compilerAttrs.cSrcs,
-		Srcs_as: compilerAttrs.asSrcs,
-		Copts:   compilerAttrs.copts,
-		Hdrs:    compilerAttrs.hdrs,
-
-		Deps:                              linkerAttrs.deps,
-		Implementation_deps:               linkerAttrs.implementationDeps,
-		Dynamic_deps:                      linkerAttrs.dynamicDeps,
-		Implementation_dynamic_deps:       linkerAttrs.implementationDynamicDeps,
-		Whole_archive_deps:                linkerAttrs.wholeArchiveDeps,
-		Implementation_whole_archive_deps: linkerAttrs.implementationWholeArchiveDeps,
-		System_dynamic_deps:               linkerAttrs.systemDynamicDeps,
-		SdkAttributes:                     Bp2BuildParseSdkAttributes(module),
-		Runtime_deps:                      linkerAttrs.runtimeDeps,
-		Native_coverage:                   baseAttributes.Native_coverage,
-		Additional_compiler_inputs:        compilerAttrs.additionalCompilerInputs,
-	}
-
-	module.convertTidyAttributes(ctx, &commonAttrs.tidyAttributes)
-
-	var attrs interface{}
-	if isStatic {
-		commonAttrs.Deps.Add(baseAttributes.protoDependency)
-		var alwayslink *bool
-		if _, ok := alwaysLinkLibraries[module.Name()]; ok && isStatic {
-			alwayslink = proptools.BoolPtr(true)
-		}
-		attrs = &bazelCcLibraryStaticAttributes{
-			staticOrSharedAttributes: commonAttrs,
-			Rtti:                     compilerAttrs.rtti,
-			Stl:                      compilerAttrs.stl,
-			Cpp_std:                  compilerAttrs.cppStd,
-			C_std:                    compilerAttrs.cStd,
-
-			includesAttributes: includeAttrs,
-
-			Cppflags:   compilerAttrs.cppFlags,
-			Conlyflags: compilerAttrs.conlyFlags,
-			Asflags:    asFlags,
-
-			Alwayslink: alwayslink,
-			Features:   *features,
-		}
-
-	} else {
-		commonAttrs.Dynamic_deps.Add(baseAttributes.protoDependency)
-
-		sharedLibAttrs := &bazelCcLibrarySharedAttributes{
-			staticOrSharedAttributes: commonAttrs,
-
-			Cppflags:   compilerAttrs.cppFlags,
-			Conlyflags: compilerAttrs.conlyFlags,
-			Asflags:    asFlags,
-
-			Linkopts:        linkerAttrs.linkopts,
-			Use_version_lib: linkerAttrs.useVersionLib,
-
-			Rtti:    compilerAttrs.rtti,
-			Stl:     compilerAttrs.stl,
-			Cpp_std: compilerAttrs.cppStd,
-			C_std:   compilerAttrs.cStd,
-
-			includesAttributes: includeAttrs,
-
-			Additional_linker_inputs: linkerAttrs.additionalLinkerInputs,
-
-			Strip: stripAttrsFromLinkerAttrs(&linkerAttrs),
-
-			Features: *features,
-
-			Stem:   compilerAttrs.stem,
-			Suffix: compilerAttrs.suffix,
-
-			bazelCcHeaderAbiCheckerAttributes: bp2buildParseAbiCheckerProps(ctx, module),
-
-			Fdo_profile: compilerAttrs.fdoProfile,
-		}
-		if compilerAttrs.stubsSymbolFile != nil && len(compilerAttrs.stubsVersions.Value) > 0 {
-			sharedLibAttrs.Stubs_symbol_file = compilerAttrs.stubsSymbolFile
-		}
-		attrs = sharedLibAttrs
-	}
-
-	var modType string
-	if isStatic {
-		modType = "cc_library_static"
-	} else {
-		modType = "cc_library_shared"
-		createStubsBazelTargetIfNeeded(ctx, module, compilerAttrs, exportedIncludes, baseAttributes)
-	}
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        modType,
-		Bzl_load_location: fmt.Sprintf("//build/bazel/rules/cc:%s.bzl", modType),
-	}
-
-	tags := android.ApexAvailableTagsWithoutTestApexes(ctx, module)
-
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{
-		Name: module.Name(),
-		Tags: tags,
-		// TODO: b/303307456 - Remove this when data is properly supported in cc rules.
-		SkipData: proptools.BoolPtr(true),
-	}, attrs)
-}
-
-type includesAttributes struct {
-	Export_includes          bazel.StringListAttribute
-	Export_absolute_includes bazel.StringListAttribute
-	Export_system_includes   bazel.StringListAttribute
-	Local_includes           bazel.StringListAttribute
-	Absolute_includes        bazel.StringListAttribute
-}
-
-// TODO(b/199902614): Can this be factored to share with the other Attributes?
-type bazelCcLibraryStaticAttributes struct {
-	staticOrSharedAttributes
-	includesAttributes
-
-	Use_version_lib bazel.BoolAttribute
-	Rtti            bazel.BoolAttribute
-	Stl             *string
-	Cpp_std         *string
-	C_std           *string
-
-	Hdrs bazel.LabelListAttribute
-
-	Cppflags   bazel.StringListAttribute
-	Conlyflags bazel.StringListAttribute
-	Asflags    bazel.StringListAttribute
-
-	Alwayslink *bool
-	Features   bazel.StringListAttribute
-}
-
-// TODO(b/199902614): Can this be factored to share with the other Attributes?
-type bazelCcLibrarySharedAttributes struct {
-	staticOrSharedAttributes
-	includesAttributes
-
-	Linkopts        bazel.StringListAttribute
-	Use_version_lib bazel.BoolAttribute
-
-	Rtti    bazel.BoolAttribute
-	Stl     *string
-	Cpp_std *string
-	C_std   *string
-
-	Hdrs bazel.LabelListAttribute
-
-	Strip                    stripAttributes
-	Additional_linker_inputs bazel.LabelListAttribute
-
-	Cppflags   bazel.StringListAttribute
-	Conlyflags bazel.StringListAttribute
-	Asflags    bazel.StringListAttribute
-
-	Features bazel.StringListAttribute
-
-	Stubs_symbol_file *string
-
-	Inject_bssl_hash bazel.BoolAttribute
-
-	Stem   bazel.StringAttribute
-	Suffix bazel.StringAttribute
-
-	bazelCcHeaderAbiCheckerAttributes
-
-	Fdo_profile bazel.LabelAttribute
-}
-
-type bazelCcStubSuiteAttributes struct {
-	Symbol_file          *string
-	Versions             bazel.StringListAttribute
-	Export_includes      bazel.StringListAttribute
-	Source_library_label *string
-	Soname               *string
-	Deps                 bazel.LabelListAttribute
-	Api_surface          *string
-
-	// Unless the library is in the NDK, module-libapi stubs should *not* include the public symbols
-	// Soong uses a global variable to determine if the library is in the NDK
-	// Since Bazel does not have global analysis, create an explicit property
-	// This property is only relevant if `api_surface = module-libapi`
-	// https://cs.android.com/android/_/android/platform/build/soong/+/main:cc/library.go;l=1214-1219;drc=7123cc5370a38983ee6325b5f5f6df19f4e4f10b;bpv=1;bpt=0
-	Included_in_ndk *bool
-}
-
-type bazelCcHeaderAbiCheckerAttributes struct {
-	Abi_checker_enabled                 *bool
-	Abi_checker_symbol_file             *bazel.Label
-	Abi_checker_exclude_symbol_versions []string
-	Abi_checker_exclude_symbol_tags     []string
-	Abi_checker_check_all_apis          *bool
-	Abi_checker_diff_flags              []string
-}
diff --git a/cc/library_headers.go b/cc/library_headers.go
index 2e5a195..98533b2 100644
--- a/cc/library_headers.go
+++ b/cc/library_headers.go
@@ -16,8 +16,6 @@
 
 import (
 	"android/soong/android"
-	"android/soong/bazel"
-	"android/soong/bazel/cquery"
 )
 
 func init() {
@@ -48,52 +46,6 @@
 	ctx.RegisterModuleType("cc_prebuilt_library_headers", prebuiltLibraryHeaderFactory)
 }
 
-type libraryHeaderBazelHandler struct {
-	module  *Module
-	library *libraryDecorator
-}
-
-var _ BazelHandler = (*libraryHeaderBazelHandler)(nil)
-
-func (handler *libraryHeaderBazelHandler) QueueBazelCall(ctx android.BaseModuleContext, label string) {
-	bazelCtx := ctx.Config().BazelContext
-	bazelCtx.QueueBazelRequest(label, cquery.GetCcInfo, android.GetConfigKeyApexVariant(ctx, GetApexConfigKey(ctx)))
-}
-
-func (h *libraryHeaderBazelHandler) ProcessBazelQueryResponse(ctx android.ModuleContext, label string) {
-	bazelCtx := ctx.Config().BazelContext
-	ccInfo, err := bazelCtx.GetCcInfo(label, android.GetConfigKeyApexVariant(ctx, GetApexConfigKey(ctx)))
-	if err != nil {
-		ctx.ModuleErrorf(err.Error())
-		return
-	}
-
-	outputPaths := ccInfo.OutputFiles
-	if len(outputPaths) != 1 {
-		ctx.ModuleErrorf("expected exactly one output file for %q, but got %q", label, outputPaths)
-		return
-	}
-
-	var outputPath android.Path = android.PathForBazelOut(ctx, outputPaths[0])
-	if len(ccInfo.TidyFiles) > 0 {
-		h.module.tidyFiles = android.PathsForBazelOut(ctx, ccInfo.TidyFiles)
-		outputPath = android.AttachValidationActions(ctx, outputPath, h.module.tidyFiles)
-	}
-	h.module.outputFile = android.OptionalPathForPath(outputPath)
-
-	// HeaderLibraryInfo is an empty struct to indicate to dependencies that this is a header library
-	ctx.SetProvider(HeaderLibraryInfoProvider, HeaderLibraryInfo{})
-
-	h.library.setFlagExporterInfoFromCcInfo(ctx, ccInfo)
-
-	// Dependencies on this library will expect collectedSnapshotHeaders to be set, otherwise
-	// validation will fail. For now, set this to an empty list.
-	// TODO(cparsons): More closely mirror the collectHeadersForSnapshot implementation.
-	h.library.collectedSnapshotHeaders = android.Paths{}
-
-	h.module.setAndroidMkVariablesFromCquery(ccInfo.CcAndroidMkInfo)
-}
-
 // cc_library_headers contains a set of c/c++ headers which are imported by
 // other soong cc modules using the header_libs property. For best practices,
 // use export_include_dirs property or LOCAL_EXPORT_C_INCLUDE_DIRS for
@@ -102,8 +54,6 @@
 	module, library := NewLibrary(android.HostAndDeviceSupported)
 	library.HeaderOnly()
 	module.sdkMemberTypes = []android.SdkMemberType{headersLibrarySdkMemberType}
-	module.bazelable = true
-	module.bazelHandler = &libraryHeaderBazelHandler{module: module, library: library}
 	return module.Init()
 }
 
@@ -111,50 +61,5 @@
 func prebuiltLibraryHeaderFactory() android.Module {
 	module, library := NewPrebuiltLibrary(android.HostAndDeviceSupported, "")
 	library.HeaderOnly()
-	module.bazelable = true
-	module.bazelHandler = &ccLibraryBazelHandler{module: module}
 	return module.Init()
 }
-
-type bazelCcLibraryHeadersAttributes struct {
-	Hdrs                     bazel.LabelListAttribute
-	Export_includes          bazel.StringListAttribute
-	Export_absolute_includes bazel.StringListAttribute
-	Export_system_includes   bazel.StringListAttribute
-	Deps                     bazel.LabelListAttribute
-	SdkAttributes
-}
-
-func libraryHeadersBp2Build(ctx android.Bp2buildMutatorContext, module *Module) {
-	baseAttributes := bp2BuildParseBaseProps(ctx, module)
-	exportedIncludes := bp2BuildParseExportedIncludes(ctx, module, &baseAttributes.includes)
-	linkerAttrs := baseAttributes.linkerAttributes
-	(&linkerAttrs.deps).Append(linkerAttrs.dynamicDeps)
-	(&linkerAttrs.deps).Append(linkerAttrs.wholeArchiveDeps)
-
-	attrs := &bazelCcLibraryHeadersAttributes{
-		Export_includes:          exportedIncludes.Includes,
-		Export_absolute_includes: exportedIncludes.AbsoluteIncludes,
-		Export_system_includes:   exportedIncludes.SystemIncludes,
-		Deps:                     linkerAttrs.deps,
-		Hdrs:                     baseAttributes.hdrs,
-		SdkAttributes:            Bp2BuildParseSdkAttributes(module),
-	}
-
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "cc_library_headers",
-		Bzl_load_location: "//build/bazel/rules/cc:cc_library_headers.bzl",
-	}
-
-	tags := android.ApexAvailableTagsWithoutTestApexes(ctx, module)
-
-	name := module.Name()
-	if module.IsPrebuilt() {
-		name = android.RemoveOptionalPrebuiltPrefix(name)
-	}
-
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{
-		Name: name,
-		Tags: tags,
-	}, attrs)
-}
diff --git a/cc/library_sdk_member.go b/cc/library_sdk_member.go
index e743bb6..52e78d7 100644
--- a/cc/library_sdk_member.go
+++ b/cc/library_sdk_member.go
@@ -251,16 +251,9 @@
 	return &nativeLibInfoProperties{memberType: mt}
 }
 
-func isBazelOutDirectory(p android.Path) bool {
-	_, bazel := p.(android.BazelOutPath)
-	return bazel
-}
-
 func isGeneratedHeaderDirectory(p android.Path) bool {
 	_, gen := p.(android.WritablePath)
-	// TODO(b/183213331): Here we assume that bazel-based headers are not generated; we need
-	// to support generated headers in mixed builds.
-	return gen && !isBazelOutDirectory(p)
+	return gen
 }
 
 type includeDirsProperty struct {
diff --git a/cc/library_test.go b/cc/library_test.go
index dbe2be8..2ed2d76 100644
--- a/cc/library_test.go
+++ b/cc/library_test.go
@@ -19,7 +19,6 @@
 	"testing"
 
 	"android/soong/android"
-	"android/soong/bazel/cquery"
 )
 
 func TestLibraryReuse(t *testing.T) {
@@ -246,137 +245,6 @@
 	testCcError(t, `"libfoo" .*: versions: "X" could not be parsed as an integer and is not a recognized codename`, bp)
 }
 
-func TestCcLibraryWithBazel(t *testing.T) {
-	t.Parallel()
-	bp := `
-cc_library {
-	name: "foo",
-	srcs: ["foo.cc"],
-	bazel_module: { label: "//foo/bar:bar" },
-}`
-	config := TestConfig(t.TempDir(), android.Android, nil, bp, nil)
-	config.BazelContext = android.MockBazelContext{
-		OutputBaseDir: "outputbase",
-		LabelToCcInfo: map[string]cquery.CcInfo{
-			"//foo/bar:bar": cquery.CcInfo{
-				CcObjectFiles:        []string{"foo.o"},
-				Includes:             []string{"include"},
-				SystemIncludes:       []string{"system_include"},
-				Headers:              []string{"foo.h"},
-				RootDynamicLibraries: []string{"foo.so"},
-				UnstrippedOutput:     "foo_unstripped.so",
-			},
-			"//foo/bar:bar_bp2build_cc_library_static": cquery.CcInfo{
-				CcObjectFiles:      []string{"foo.o"},
-				Includes:           []string{"include"},
-				SystemIncludes:     []string{"system_include"},
-				Headers:            []string{"foo.h"},
-				RootStaticArchives: []string{"foo.a"},
-			},
-		},
-	}
-	ctx := testCcWithConfig(t, config)
-
-	staticFoo := ctx.ModuleForTests("foo", "android_arm_armv7-a-neon_static").Module()
-	outputFiles, err := staticFoo.(android.OutputFileProducer).OutputFiles("")
-	if err != nil {
-		t.Errorf("Unexpected error getting cc_object outputfiles %s", err)
-	}
-
-	expectedOutputFiles := []string{"outputbase/execroot/__main__/foo.a"}
-	android.AssertDeepEquals(t, "output files", expectedOutputFiles, outputFiles.Strings())
-
-	flagExporter := ctx.ModuleProvider(staticFoo, FlagExporterInfoProvider).(FlagExporterInfo)
-	android.AssertPathsRelativeToTopEquals(t, "exported include dirs", []string{"outputbase/execroot/__main__/include"}, flagExporter.IncludeDirs)
-	android.AssertPathsRelativeToTopEquals(t, "exported system include dirs", []string{"outputbase/execroot/__main__/system_include"}, flagExporter.SystemIncludeDirs)
-	android.AssertPathsRelativeToTopEquals(t, "exported headers", []string{"outputbase/execroot/__main__/foo.h"}, flagExporter.GeneratedHeaders)
-	android.AssertPathsRelativeToTopEquals(t, "deps", []string{"outputbase/execroot/__main__/foo.h"}, flagExporter.Deps)
-
-	sharedFoo := ctx.ModuleForTests("foo", "android_arm_armv7-a-neon_shared").Module()
-	outputFiles, err = sharedFoo.(android.OutputFileProducer).OutputFiles("")
-	if err != nil {
-		t.Errorf("Unexpected error getting cc_library outputfiles %s", err)
-	}
-	expectedOutputFiles = []string{"outputbase/execroot/__main__/foo.so"}
-	android.AssertDeepEquals(t, "output files", expectedOutputFiles, outputFiles.Strings())
-
-	android.AssertStringEquals(t, "unstripped shared library", "outputbase/execroot/__main__/foo_unstripped.so", sharedFoo.(*Module).linker.unstrippedOutputFilePath().String())
-	flagExporter = ctx.ModuleProvider(sharedFoo, FlagExporterInfoProvider).(FlagExporterInfo)
-	android.AssertPathsRelativeToTopEquals(t, "exported include dirs", []string{"outputbase/execroot/__main__/include"}, flagExporter.IncludeDirs)
-	android.AssertPathsRelativeToTopEquals(t, "exported system include dirs", []string{"outputbase/execroot/__main__/system_include"}, flagExporter.SystemIncludeDirs)
-	android.AssertPathsRelativeToTopEquals(t, "exported headers", []string{"outputbase/execroot/__main__/foo.h"}, flagExporter.GeneratedHeaders)
-	android.AssertPathsRelativeToTopEquals(t, "deps", []string{"outputbase/execroot/__main__/foo.h"}, flagExporter.Deps)
-}
-
-func TestCcLibraryWithBazelValidations(t *testing.T) {
-	t.Parallel()
-	bp := `
-cc_library {
-	name: "foo",
-	srcs: ["foo.cc"],
-	bazel_module: { label: "//foo/bar:bar" },
-	tidy: true,
-}`
-	config := TestConfig(t.TempDir(), android.Android, nil, bp, nil)
-	config.BazelContext = android.MockBazelContext{
-		OutputBaseDir: "outputbase",
-		LabelToCcInfo: map[string]cquery.CcInfo{
-			"//foo/bar:bar": cquery.CcInfo{
-				CcObjectFiles:        []string{"foo.o"},
-				Includes:             []string{"include"},
-				SystemIncludes:       []string{"system_include"},
-				Headers:              []string{"foo.h"},
-				RootDynamicLibraries: []string{"foo.so"},
-				UnstrippedOutput:     "foo_unstripped.so",
-			},
-			"//foo/bar:bar_bp2build_cc_library_static": cquery.CcInfo{
-				CcObjectFiles:      []string{"foo.o"},
-				Includes:           []string{"include"},
-				SystemIncludes:     []string{"system_include"},
-				Headers:            []string{"foo.h"},
-				RootStaticArchives: []string{"foo.a"},
-				TidyFiles:          []string{"foo.c.tidy"},
-			},
-		},
-	}
-	ctx := android.GroupFixturePreparers(
-		prepareForCcTest,
-		android.FixtureMergeEnv(map[string]string{
-			"ALLOW_LOCAL_TIDY_TRUE": "1",
-		}),
-	).RunTestWithConfig(t, config).TestContext
-
-	staticFoo := ctx.ModuleForTests("foo", "android_arm_armv7-a-neon_static").Module()
-	outputFiles, err := staticFoo.(android.OutputFileProducer).OutputFiles("")
-	if err != nil {
-		t.Errorf("Unexpected error getting cc_object outputfiles %s", err)
-	}
-
-	expectedOutputFiles := []string{"out/soong/.intermediates/foo/android_arm_armv7-a-neon_static/validated/foo.a"}
-	android.AssertPathsRelativeToTopEquals(t, "output files", expectedOutputFiles, outputFiles)
-
-	flagExporter := ctx.ModuleProvider(staticFoo, FlagExporterInfoProvider).(FlagExporterInfo)
-	android.AssertPathsRelativeToTopEquals(t, "exported include dirs", []string{"outputbase/execroot/__main__/include"}, flagExporter.IncludeDirs)
-	android.AssertPathsRelativeToTopEquals(t, "exported system include dirs", []string{"outputbase/execroot/__main__/system_include"}, flagExporter.SystemIncludeDirs)
-	android.AssertPathsRelativeToTopEquals(t, "exported headers", []string{"outputbase/execroot/__main__/foo.h"}, flagExporter.GeneratedHeaders)
-	android.AssertPathsRelativeToTopEquals(t, "deps", []string{"outputbase/execroot/__main__/foo.h"}, flagExporter.Deps)
-
-	sharedFoo := ctx.ModuleForTests("foo", "android_arm_armv7-a-neon_shared").Module()
-	outputFiles, err = sharedFoo.(android.OutputFileProducer).OutputFiles("")
-	if err != nil {
-		t.Errorf("Unexpected error getting cc_library outputfiles %s", err)
-	}
-	expectedOutputFiles = []string{"outputbase/execroot/__main__/foo.so"}
-	android.AssertDeepEquals(t, "output files", expectedOutputFiles, outputFiles.Strings())
-
-	android.AssertStringEquals(t, "unstripped shared library", "outputbase/execroot/__main__/foo_unstripped.so", sharedFoo.(*Module).linker.unstrippedOutputFilePath().String())
-	flagExporter = ctx.ModuleProvider(sharedFoo, FlagExporterInfoProvider).(FlagExporterInfo)
-	android.AssertPathsRelativeToTopEquals(t, "exported include dirs", []string{"outputbase/execroot/__main__/include"}, flagExporter.IncludeDirs)
-	android.AssertPathsRelativeToTopEquals(t, "exported system include dirs", []string{"outputbase/execroot/__main__/system_include"}, flagExporter.SystemIncludeDirs)
-	android.AssertPathsRelativeToTopEquals(t, "exported headers", []string{"outputbase/execroot/__main__/foo.h"}, flagExporter.GeneratedHeaders)
-	android.AssertPathsRelativeToTopEquals(t, "deps", []string{"outputbase/execroot/__main__/foo.h"}, flagExporter.Deps)
-}
-
 func TestLibraryVersionScript(t *testing.T) {
 	t.Parallel()
 	result := PrepareForIntegrationTestWithCc.RunTestWithBp(t, `
@@ -413,107 +281,6 @@
 
 }
 
-func TestCcLibrarySharedWithBazelValidations(t *testing.T) {
-	t.Parallel()
-	bp := `
-cc_library_shared {
-	name: "foo",
-	srcs: ["foo.cc"],
-	bazel_module: { label: "//foo/bar:bar" },
-	tidy: true,
-}`
-	config := TestConfig(t.TempDir(), android.Android, nil, bp, nil)
-	config.BazelContext = android.MockBazelContext{
-		OutputBaseDir: "outputbase",
-		LabelToCcInfo: map[string]cquery.CcInfo{
-			"//foo/bar:bar": cquery.CcInfo{
-				CcObjectFiles:        []string{"foo.o"},
-				Includes:             []string{"include"},
-				SystemIncludes:       []string{"system_include"},
-				RootDynamicLibraries: []string{"foo.so"},
-				TocFile:              "foo.so.toc",
-				TidyFiles:            []string{"foo.c.tidy"},
-			},
-		},
-	}
-	ctx := android.GroupFixturePreparers(
-		prepareForCcTest,
-		android.FixtureMergeEnv(map[string]string{
-			"ALLOW_LOCAL_TIDY_TRUE": "1",
-		}),
-	).RunTestWithConfig(t, config).TestContext
-
-	sharedFoo := ctx.ModuleForTests("foo", "android_arm_armv7-a-neon_shared").Module()
-	producer := sharedFoo.(android.OutputFileProducer)
-	outputFiles, err := producer.OutputFiles("")
-	if err != nil {
-		t.Errorf("Unexpected error getting cc_object outputfiles %s", err)
-	}
-	expectedOutputFiles := []string{"out/soong/.intermediates/foo/android_arm_armv7-a-neon_shared/validated/foo.so"}
-	android.AssertPathsRelativeToTopEquals(t, "output files", expectedOutputFiles, outputFiles)
-
-	tocFilePath := sharedFoo.(*Module).Toc()
-	if !tocFilePath.Valid() {
-		t.Errorf("Invalid tocFilePath: %s", tocFilePath)
-	}
-	tocFile := tocFilePath.Path()
-	expectedToc := "outputbase/execroot/__main__/foo.so.toc"
-	android.AssertStringEquals(t, "toc file", expectedToc, tocFile.String())
-
-	entries := android.AndroidMkEntriesForTest(t, ctx, sharedFoo)[0]
-	expectedFlags := []string{"-Ioutputbase/execroot/__main__/include", "-isystem outputbase/execroot/__main__/system_include"}
-	gotFlags := entries.EntryMap["LOCAL_EXPORT_CFLAGS"]
-	android.AssertDeepEquals(t, "androidmk exported cflags", expectedFlags, gotFlags)
-	android.AssertStringEquals(t, "unexpected LOCAL_SOONG_MODULE_TYPE", "cc_library_shared", entries.EntryMap["LOCAL_SOONG_MODULE_TYPE"][0])
-}
-
-func TestCcLibrarySharedWithBazel(t *testing.T) {
-	t.Parallel()
-	bp := `
-cc_library_shared {
-	name: "foo",
-	srcs: ["foo.cc"],
-	bazel_module: { label: "//foo/bar:bar" },
-}`
-	config := TestConfig(t.TempDir(), android.Android, nil, bp, nil)
-	config.BazelContext = android.MockBazelContext{
-		OutputBaseDir: "outputbase",
-		LabelToCcInfo: map[string]cquery.CcInfo{
-			"//foo/bar:bar": cquery.CcInfo{
-				CcObjectFiles:        []string{"foo.o"},
-				Includes:             []string{"include"},
-				SystemIncludes:       []string{"system_include"},
-				RootDynamicLibraries: []string{"foo.so"},
-				TocFile:              "foo.so.toc",
-			},
-		},
-	}
-	ctx := testCcWithConfig(t, config)
-
-	sharedFoo := ctx.ModuleForTests("foo", "android_arm_armv7-a-neon_shared").Module()
-	producer := sharedFoo.(android.OutputFileProducer)
-	outputFiles, err := producer.OutputFiles("")
-	if err != nil {
-		t.Errorf("Unexpected error getting cc_object outputfiles %s", err)
-	}
-	expectedOutputFiles := []string{"outputbase/execroot/__main__/foo.so"}
-	android.AssertDeepEquals(t, "output files", expectedOutputFiles, outputFiles.Strings())
-
-	tocFilePath := sharedFoo.(*Module).Toc()
-	if !tocFilePath.Valid() {
-		t.Errorf("Invalid tocFilePath: %s", tocFilePath)
-	}
-	tocFile := tocFilePath.Path()
-	expectedToc := "outputbase/execroot/__main__/foo.so.toc"
-	android.AssertStringEquals(t, "toc file", expectedToc, tocFile.String())
-
-	entries := android.AndroidMkEntriesForTest(t, ctx, sharedFoo)[0]
-	expectedFlags := []string{"-Ioutputbase/execroot/__main__/include", "-isystem outputbase/execroot/__main__/system_include"}
-	gotFlags := entries.EntryMap["LOCAL_EXPORT_CFLAGS"]
-	android.AssertDeepEquals(t, "androidmk exported cflags", expectedFlags, gotFlags)
-	android.AssertStringEquals(t, "unexpected LOCAL_SOONG_MODULE_TYPE", "cc_library_shared", entries.EntryMap["LOCAL_SOONG_MODULE_TYPE"][0])
-}
-
 func TestWholeStaticLibPrebuilts(t *testing.T) {
 	t.Parallel()
 	result := PrepareForIntegrationTestWithCc.RunTestWithBp(t, `
diff --git a/cc/linkable.go b/cc/linkable.go
index 5b5b856..994517c 100644
--- a/cc/linkable.go
+++ b/cc/linkable.go
@@ -2,7 +2,6 @@
 
 import (
 	"android/soong/android"
-	"android/soong/bazel/cquery"
 	"android/soong/fuzz"
 	"android/soong/snapshot"
 
@@ -431,19 +430,3 @@
 }
 
 var FlagExporterInfoProvider = blueprint.NewProvider(FlagExporterInfo{})
-
-// flagExporterInfoFromCcInfo populates FlagExporterInfo provider with information from Bazel.
-func flagExporterInfoFromCcInfo(ctx android.ModuleContext, ccInfo cquery.CcInfo) FlagExporterInfo {
-
-	includes := android.PathsForBazelOut(ctx, ccInfo.Includes)
-	systemIncludes := android.PathsForBazelOut(ctx, ccInfo.SystemIncludes)
-	headers := android.PathsForBazelOut(ctx, ccInfo.Headers)
-
-	return FlagExporterInfo{
-		IncludeDirs:       android.FirstUniquePaths(includes),
-		SystemIncludeDirs: android.FirstUniquePaths(systemIncludes),
-		GeneratedHeaders:  headers,
-		// necessary to ensure generated headers are considered implicit deps of dependent actions
-		Deps: headers,
-	}
-}
diff --git a/cc/ndk_headers.go b/cc/ndk_headers.go
index 461aa96..0fbc8d0 100644
--- a/cc/ndk_headers.go
+++ b/cc/ndk_headers.go
@@ -18,11 +18,8 @@
 	"fmt"
 	"path/filepath"
 
-	"github.com/google/blueprint"
-	"github.com/google/blueprint/proptools"
-
 	"android/soong/android"
-	"android/soong/bazel"
+	"github.com/google/blueprint"
 )
 
 var (
@@ -81,7 +78,6 @@
 
 type headerModule struct {
 	android.ModuleBase
-	android.BazelModuleBase
 
 	properties headerProperties
 
@@ -148,30 +144,6 @@
 	}
 }
 
-type bazelNdkHeadersAttributes struct {
-	Strip_import_prefix *string
-	Import_prefix       *string
-	Hdrs                bazel.LabelListAttribute
-	Run_versioner       *bool
-}
-
-func (h *headerModule) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "ndk_headers",
-		Bzl_load_location: "//build/bazel/rules/cc:ndk_headers.bzl",
-	}
-	attrs := &bazelNdkHeadersAttributes{
-		Strip_import_prefix: h.properties.From,
-		Import_prefix:       h.properties.To,
-		Hdrs:                bazel.MakeLabelListAttribute(android.BazelLabelForModuleSrcExcludes(ctx, h.properties.Srcs, h.properties.Exclude_srcs)),
-	}
-	ctx.CreateBazelTargetModule(
-		props,
-		android.CommonAttributes{Name: h.Name()},
-		attrs,
-	)
-}
-
 // ndk_headers installs the sets of ndk headers defined in the srcs property
 // to the sysroot base + "usr/include" + to directory + directory component.
 // ndk_headers requires the license file to be specified. Example:
@@ -186,7 +158,6 @@
 	module := &headerModule{}
 	module.AddProperties(&module.properties)
 	android.InitAndroidModule(module)
-	android.InitBazelModule(module)
 	return module
 }
 
@@ -219,7 +190,6 @@
 // Note that this is really only built to handle bionic/libc/include.
 type versionedHeaderModule struct {
 	android.ModuleBase
-	android.BazelModuleBase
 
 	properties versionedHeaderProperties
 
@@ -258,25 +228,6 @@
 	processHeadersWithVersioner(ctx, fromSrcPath, toOutputPath, m.srcPaths, installPaths)
 }
 
-func (h *versionedHeaderModule) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "ndk_headers",
-		Bzl_load_location: "//build/bazel/rules/cc:ndk_headers.bzl",
-	}
-	globPattern := headerGlobPattern(proptools.String(h.properties.From))
-	attrs := &bazelNdkHeadersAttributes{
-		Strip_import_prefix: h.properties.From,
-		Import_prefix:       h.properties.To,
-		Run_versioner:       proptools.BoolPtr(true),
-		Hdrs:                bazel.MakeLabelListAttribute(android.BazelLabelForModuleSrc(ctx, []string{globPattern})),
-	}
-	ctx.CreateBazelTargetModule(
-		props,
-		android.CommonAttributes{Name: h.Name()},
-		attrs,
-	)
-}
-
 func processHeadersWithVersioner(ctx android.ModuleContext, srcDir, outDir android.Path,
 	srcPaths android.Paths, installPaths []android.WritablePath) android.Path {
 	// The versioner depends on a dependencies directory to simplify determining include paths
@@ -326,7 +277,6 @@
 	module.AddProperties(&module.properties)
 
 	android.InitAndroidModule(module)
-	android.InitBazelModule(module)
 
 	return module
 }
diff --git a/cc/ndk_library.go b/cc/ndk_library.go
index 348c3bc..98fb334 100644
--- a/cc/ndk_library.go
+++ b/cc/ndk_library.go
@@ -25,7 +25,6 @@
 	"github.com/google/blueprint/proptools"
 
 	"android/soong/android"
-	"android/soong/bazel"
 	"android/soong/cc/config"
 )
 
@@ -563,51 +562,5 @@
 func NdkLibraryFactory() android.Module {
 	module := newStubLibrary()
 	android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibBoth)
-	android.InitBazelModule(module)
 	return module
 }
-
-type bazelCcApiContributionAttributes struct {
-	Api          bazel.LabelAttribute
-	Api_surfaces bazel.StringListAttribute
-	Hdrs         bazel.LabelListAttribute
-	Library_name string
-}
-
-func ndkLibraryBp2build(ctx android.Bp2buildMutatorContext, c *Module) {
-	ndk, _ := c.linker.(*stubDecorator)
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "cc_stub_suite",
-		Bzl_load_location: "//build/bazel/rules/cc:cc_stub_library.bzl",
-	}
-	sourceLibraryName := strings.TrimSuffix(c.Name(), ".ndk")
-	fromApiLevel, err := android.ApiLevelFromUser(ctx, proptools.String(ndk.properties.First_version))
-	if err != nil {
-		ctx.PropertyErrorf("first_version", "error converting first_version %v", proptools.String(ndk.properties.First_version))
-	}
-	symbolFileLabel := android.BazelLabelForModuleSrcSingle(ctx, proptools.String(ndk.properties.Symbol_file))
-	attrs := &bazelCcStubSuiteAttributes{
-		// TODO - b/300504837 Add ndk headers
-		Symbol_file:     proptools.StringPtr(symbolFileLabel.Label),
-		Soname:          proptools.StringPtr(sourceLibraryName + ".so"),
-		Api_surface:     proptools.StringPtr(android.PublicApi.String()),
-		Included_in_ndk: proptools.BoolPtr(true),
-	}
-	if sourceLibrary, exists := ctx.ModuleFromName(sourceLibraryName); exists {
-		// the source library might not exist in minimal/unbuildable branches like kernel-build-tools.
-		// check for its existence
-		attrs.Source_library_label = proptools.StringPtr(c.GetBazelLabel(ctx, sourceLibrary))
-	}
-	if ctx.Config().RawPlatformSdkVersion() != nil {
-		// This is a hack to populate `versions` only on branches that set a platform_sdk_version
-		// This prevents errors on branches such as kernel-build-tools
-		// This hack is acceptable since we are not required to support NDK Bazel builds on those branches
-		attrs.Versions = bazel.MakeStringListAttribute(ndkLibraryVersions(ctx, fromApiLevel))
-	}
-
-	ctx.CreateBazelTargetModule(
-		props,
-		android.CommonAttributes{Name: c.Name() + "_stub_libs"},
-		attrs,
-	)
-}
diff --git a/cc/ndk_prebuilt.go b/cc/ndk_prebuilt.go
index c3e6510..842bdf6 100644
--- a/cc/ndk_prebuilt.go
+++ b/cc/ndk_prebuilt.go
@@ -15,11 +15,9 @@
 package cc
 
 import (
-	"path/filepath"
 	"strings"
 
 	"android/soong/android"
-	"android/soong/bazel"
 )
 
 func init() {
@@ -66,7 +64,6 @@
 	module.Properties.Sdk_version = StringPtr("minimum")
 	module.Properties.AlwaysSdk = true
 	module.stl.Properties.Stl = StringPtr("none")
-	module.bazelable = true
 	return module.Init()
 }
 
@@ -87,7 +84,6 @@
 	module.Properties.AlwaysSdk = true
 	module.Properties.Sdk_version = StringPtr("current")
 	module.stl.Properties.Stl = StringPtr("none")
-	module.bazelable = true
 	return module.Init()
 }
 
@@ -135,81 +131,3 @@
 
 	return lib
 }
-
-var (
-	archToAbiDirMap = map[string]string{
-		"android_arm":     "armeabi-v7a",
-		"android_arm64":   "arm64-v8a",
-		"android_riscv64": "riscv64",
-		"android_x86":     "x86",
-		"android_x86_64":  "x86_64",
-	}
-)
-
-// stlSrcBp2build returns a bazel label for the checked-in .so/.a file
-// It contains a select statement for each ABI
-func stlSrcBp2build(ctx android.Bp2buildMutatorContext, c *Module) bazel.LabelAttribute {
-	libName := strings.TrimPrefix(c.Name(), "ndk_")
-	libExt := ".so" // TODO - b/201079053: Support windows
-	if ctx.ModuleType() == "ndk_prebuilt_static_stl" {
-		libExt = ".a"
-	}
-	src := bazel.LabelAttribute{}
-	for arch, abiDir := range archToAbiDirMap {
-		srcPath := filepath.Join(libDir, abiDir, libName+libExt)
-		src.SetSelectValue(
-			bazel.OsArchConfigurationAxis,
-			arch,
-			android.BazelLabelForModuleSrcSingle(ctx, srcPath),
-		)
-	}
-	return src
-}
-
-// stlIncludesBp2build returns the includes exported by the STL
-func stlIncludesBp2build(c *Module) bazel.StringListAttribute {
-	linker, _ := c.linker.(*ndkPrebuiltStlLinker)
-	includeDirs := append(
-		[]string{},
-		linker.libraryDecorator.flagExporter.Properties.Export_include_dirs...,
-	)
-	includeDirs = append(
-		includeDirs,
-		linker.libraryDecorator.flagExporter.Properties.Export_system_include_dirs...,
-	)
-	return bazel.MakeStringListAttribute(android.FirstUniqueStrings(includeDirs))
-}
-
-func ndkPrebuiltStlBp2build(ctx android.Bp2buildMutatorContext, c *Module) {
-	if ctx.ModuleType() == "ndk_prebuilt_static_stl" {
-		ndkPrebuiltStaticStlBp2build(ctx, c)
-	} else {
-		ndkPrebuiltSharedStlBp2build(ctx, c)
-	}
-}
-
-func ndkPrebuiltStaticStlBp2build(ctx android.Bp2buildMutatorContext, c *Module) {
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "cc_prebuilt_library_static",
-		Bzl_load_location: "//build/bazel/rules/cc:cc_prebuilt_library_static.bzl",
-	}
-	attrs := &bazelPrebuiltLibraryStaticAttributes{
-		Static_library:         stlSrcBp2build(ctx, c),
-		Export_system_includes: stlIncludesBp2build(c), // The exports are always as system
-	}
-	// TODO: min_sdk_version
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: c.Name()}, attrs)
-}
-
-func ndkPrebuiltSharedStlBp2build(ctx android.Bp2buildMutatorContext, c *Module) {
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "cc_prebuilt_library_shared",
-		Bzl_load_location: "//build/bazel/rules/cc:cc_prebuilt_library_shared.bzl",
-	}
-	attrs := &bazelPrebuiltLibrarySharedAttributes{
-		Shared_library:         stlSrcBp2build(ctx, c),
-		Export_system_includes: stlIncludesBp2build(c), // The exports are always as system
-	}
-	// TODO: min_sdk_version
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: c.Name()}, attrs)
-}
diff --git a/cc/object.go b/cc/object.go
index d6eb369..b9c40d8 100644
--- a/cc/object.go
+++ b/cc/object.go
@@ -19,8 +19,6 @@
 	"strings"
 
 	"android/soong/android"
-	"android/soong/bazel"
-	"android/soong/bazel/cquery"
 )
 
 //
@@ -50,33 +48,6 @@
 	ndkSysrootPath android.Path
 }
 
-type objectBazelHandler struct {
-	module *Module
-}
-
-var _ BazelHandler = (*objectBazelHandler)(nil)
-
-func (handler *objectBazelHandler) QueueBazelCall(ctx android.BaseModuleContext, label string) {
-	bazelCtx := ctx.Config().BazelContext
-	bazelCtx.QueueBazelRequest(label, cquery.GetOutputFiles, android.GetConfigKeyApexVariant(ctx, GetApexConfigKey(ctx)))
-}
-
-func (handler *objectBazelHandler) ProcessBazelQueryResponse(ctx android.ModuleContext, label string) {
-	bazelCtx := ctx.Config().BazelContext
-	objPaths, err := bazelCtx.GetOutputFiles(label, android.GetConfigKeyApexVariant(ctx, GetApexConfigKey(ctx)))
-	if err != nil {
-		ctx.ModuleErrorf(err.Error())
-		return
-	}
-
-	if len(objPaths) != 1 {
-		ctx.ModuleErrorf("expected exactly one object file for '%s', but got %s", label, objPaths)
-		return
-	}
-
-	handler.module.outputFile = android.OptionalPathForPath(android.PathForBazelOut(ctx, objPaths[0]))
-}
-
 type ObjectLinkerProperties struct {
 	// list of static library modules that should only provide headers for this module.
 	Static_libs []string `android:"arch_variant,variant_prepend"`
@@ -125,115 +96,15 @@
 		baseLinker: NewBaseLinker(module.sanitize),
 	}
 	module.compiler = NewBaseCompiler()
-	module.bazelHandler = &objectBazelHandler{module: module}
 
 	// Clang's address-significance tables are incompatible with ld -r.
 	module.compiler.appendCflags([]string{"-fno-addrsig"})
 
 	module.sdkMemberTypes = []android.SdkMemberType{ccObjectSdkMemberType}
 
-	module.bazelable = true
 	return module.Init()
 }
 
-// For bp2build conversion.
-type bazelObjectAttributes struct {
-	Srcs                bazel.LabelListAttribute
-	Srcs_as             bazel.LabelListAttribute
-	Hdrs                bazel.LabelListAttribute
-	Objs                bazel.LabelListAttribute
-	Deps                bazel.LabelListAttribute
-	System_dynamic_deps bazel.LabelListAttribute
-	Copts               bazel.StringListAttribute
-	Asflags             bazel.StringListAttribute
-	Local_includes      bazel.StringListAttribute
-	Absolute_includes   bazel.StringListAttribute
-	Stl                 *string
-	Linker_script       bazel.LabelAttribute
-	Crt                 *bool
-	SdkAttributes
-}
-
-// objectBp2Build is the bp2build converter from cc_object modules to the
-// Bazel equivalent target, plus any necessary include deps for the cc_object.
-func objectBp2Build(ctx android.Bp2buildMutatorContext, m *Module) {
-	if m.compiler == nil {
-		// a cc_object must have access to the compiler decorator for its props.
-		ctx.ModuleErrorf("compiler must not be nil for a cc_object module")
-	}
-
-	// Set arch-specific configurable attributes
-	baseAttributes := bp2BuildParseBaseProps(ctx, m)
-	compilerAttrs := baseAttributes.compilerAttributes
-	var objs bazel.LabelListAttribute
-	var deps bazel.LabelListAttribute
-	systemDynamicDeps := bazel.LabelListAttribute{ForceSpecifyEmptyList: true}
-
-	var linkerScript bazel.LabelAttribute
-
-	for axis, configToProps := range m.GetArchVariantProperties(ctx, &ObjectLinkerProperties{}) {
-		for config, props := range configToProps {
-			if objectLinkerProps, ok := props.(*ObjectLinkerProperties); ok {
-				if objectLinkerProps.Linker_script != nil {
-					label := android.BazelLabelForModuleSrcSingle(ctx, *objectLinkerProps.Linker_script)
-					linkerScript.SetSelectValue(axis, config, label)
-				}
-				objs.SetSelectValue(axis, config, android.BazelLabelForModuleDeps(ctx, objectLinkerProps.Objs))
-				systemSharedLibs := objectLinkerProps.System_shared_libs
-				if len(systemSharedLibs) > 0 {
-					systemSharedLibs = android.FirstUniqueStrings(systemSharedLibs)
-				}
-				systemDynamicDeps.SetSelectValue(axis, config, bazelLabelForSharedDeps(ctx, systemSharedLibs))
-				deps.SetSelectValue(axis, config, android.BazelLabelForModuleDeps(ctx, objectLinkerProps.Static_libs))
-				deps.SetSelectValue(axis, config, android.BazelLabelForModuleDeps(ctx, objectLinkerProps.Shared_libs))
-				deps.SetSelectValue(axis, config, android.BazelLabelForModuleDeps(ctx, objectLinkerProps.Header_libs))
-				// static_libs, shared_libs, and header_libs have variant_prepend tag
-				deps.Prepend = true
-			}
-		}
-	}
-	objs.ResolveExcludes()
-
-	// Don't split cc_object srcs across languages. Doing so would add complexity,
-	// and this isn't typically done for cc_object.
-	srcs := compilerAttrs.srcs
-	srcs.Append(compilerAttrs.cSrcs)
-
-	asFlags := compilerAttrs.asFlags
-	if compilerAttrs.asSrcs.IsEmpty() {
-		// Skip asflags for BUILD file simplicity if there are no assembly sources.
-		asFlags = bazel.MakeStringListAttribute(nil)
-	}
-
-	attrs := &bazelObjectAttributes{
-		Srcs:                srcs,
-		Srcs_as:             compilerAttrs.asSrcs,
-		Objs:                objs,
-		Deps:                deps,
-		System_dynamic_deps: systemDynamicDeps,
-		Copts:               compilerAttrs.copts,
-		Asflags:             asFlags,
-		Local_includes:      compilerAttrs.localIncludes,
-		Absolute_includes:   compilerAttrs.absoluteIncludes,
-		Stl:                 compilerAttrs.stl,
-		Linker_script:       linkerScript,
-		Crt:                 m.linker.(*objectLinker).Properties.Crt,
-		SdkAttributes:       Bp2BuildParseSdkAttributes(m),
-	}
-
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "cc_object",
-		Bzl_load_location: "//build/bazel/rules/cc:cc_object.bzl",
-	}
-
-	tags := android.ApexAvailableTagsWithoutTestApexes(ctx, m)
-
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{
-		Name: m.Name(),
-		Tags: tags,
-	}, attrs)
-}
-
 func (object *objectLinker) appendLdflags(flags []string) {
 	panic(fmt.Errorf("appendLdflags on objectLinker not supported"))
 }
diff --git a/cc/object_test.go b/cc/object_test.go
index b1e2a0f..e6a3fdd 100644
--- a/cc/object_test.go
+++ b/cc/object_test.go
@@ -85,30 +85,6 @@
 	})
 }
 
-func TestCcObjectWithBazel(t *testing.T) {
-	bp := `
-cc_object {
-	name: "foo",
-	srcs: ["baz.o"],
-	bazel_module: { label: "//foo/bar:bar" },
-}`
-	config := TestConfig(t.TempDir(), android.Android, nil, bp, nil)
-	config.BazelContext = android.MockBazelContext{
-		OutputBaseDir: "outputbase",
-		LabelToOutputFiles: map[string][]string{
-			"//foo/bar:bar": []string{"bazel_out.o"}}}
-	ctx := testCcWithConfig(t, config)
-
-	module := ctx.ModuleForTests("foo", "android_arm_armv7-a-neon").Module()
-	outputFiles, err := module.(android.OutputFileProducer).OutputFiles("")
-	if err != nil {
-		t.Errorf("Unexpected error getting cc_object outputfiles %s", err)
-	}
-
-	expectedOutputFiles := []string{"outputbase/execroot/__main__/bazel_out.o"}
-	android.AssertDeepEquals(t, "output files", expectedOutputFiles, outputFiles.Strings())
-}
-
 func TestCcObjectOutputFile(t *testing.T) {
 	testcases := []struct {
 		name       string
diff --git a/cc/prebuilt.go b/cc/prebuilt.go
index b4819b0..f68fa24 100644
--- a/cc/prebuilt.go
+++ b/cc/prebuilt.go
@@ -18,8 +18,6 @@
 	"path/filepath"
 
 	"android/soong/android"
-	"android/soong/bazel"
-	"android/soong/bazel/cquery"
 )
 
 func init() {
@@ -57,13 +55,6 @@
 	// This is needed only if this library is linked by other modules in build time.
 	// Only makes sense for the Windows target.
 	Windows_import_lib *string `android:"path,arch_variant"`
-
-	// MixedBuildsDisabled is true if and only if building this prebuilt is explicitly disabled in mixed builds for either
-	// its static or shared version on the current build variant. This is to prevent Bazel targets for build variants with
-	// which either the static or shared version is incompatible from participating in mixed buiods. Please note that this
-	// is an override and does not fully determine whether Bazel or Soong will be used. For the full determination, see
-	// cc.ProcessBazelQueryResponse, cc.QueueBazelCall, and cc.MixedBuildsDisabled.
-	MixedBuildsDisabled bool `blueprint:"mutated"`
 }
 
 type prebuiltLinker struct {
@@ -261,7 +252,6 @@
 
 func (p *prebuiltLibraryLinker) disablePrebuilt() {
 	p.properties.Srcs = nil
-	p.properties.MixedBuildsDisabled = true
 }
 
 // Implements versionedInterface
@@ -272,8 +262,6 @@
 func NewPrebuiltLibrary(hod android.HostOrDeviceSupported, srcsProperty string) (*Module, *libraryDecorator) {
 	module, library := NewLibrary(hod)
 	module.compiler = nil
-	module.bazelable = true
-	module.bazelHandler = &prebuiltLibraryBazelHandler{module: module, library: library}
 
 	prebuilt := &prebuiltLibraryLinker{
 		libraryDecorator: library,
@@ -348,82 +336,6 @@
 	return module, library
 }
 
-type bazelPrebuiltLibraryStaticAttributes struct {
-	Static_library         bazel.LabelAttribute
-	Export_includes        bazel.StringListAttribute
-	Export_system_includes bazel.StringListAttribute
-	Alwayslink             bazel.BoolAttribute
-}
-
-// TODO(b/228623543): The below is not entirely true until the bug is fixed. For now, both targets are always generated
-// Implements bp2build for cc_prebuilt_library modules. This will generate:
-//   - Only a cc_prebuilt_library_static if the shared.enabled property is set to false across all variants.
-//   - Only a cc_prebuilt_library_shared if the static.enabled property is set to false across all variants
-//   - Both a cc_prebuilt_library_static and cc_prebuilt_library_shared if the aforementioned properties are not false across
-//     all variants
-//
-// In all cases, cc_prebuilt_library_static target names will be appended with "_bp2build_cc_library_static".
-func prebuiltLibraryBp2Build(ctx android.Bp2buildMutatorContext, module *Module) {
-	prebuiltLibraryStaticBp2Build(ctx, module, true)
-	prebuiltLibrarySharedBp2Build(ctx, module)
-}
-
-func prebuiltLibraryStaticBp2Build(ctx android.Bp2buildMutatorContext, module *Module, fullBuild bool) {
-	prebuiltAttrs := Bp2BuildParsePrebuiltLibraryProps(ctx, module, true)
-	exportedIncludes := bp2BuildParseExportedIncludes(ctx, module, nil)
-
-	attrs := &bazelPrebuiltLibraryStaticAttributes{
-		Static_library:         prebuiltAttrs.Src,
-		Export_includes:        exportedIncludes.Includes,
-		Export_system_includes: exportedIncludes.SystemIncludes,
-		// TODO: ¿Alwayslink?
-	}
-
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "cc_prebuilt_library_static",
-		Bzl_load_location: "//build/bazel/rules/cc:cc_prebuilt_library_static.bzl",
-	}
-
-	name := android.RemoveOptionalPrebuiltPrefix(module.Name())
-	if fullBuild {
-		name += "_bp2build_cc_library_static"
-	}
-
-	tags := android.ApexAvailableTagsWithoutTestApexes(ctx, module)
-	ctx.CreateBazelTargetModuleWithRestrictions(props, android.CommonAttributes{Name: name, Tags: tags}, attrs, prebuiltAttrs.Enabled)
-
-	_true := true
-	alwayslinkAttrs := *attrs
-	alwayslinkAttrs.Alwayslink.SetValue(&_true)
-	ctx.CreateBazelTargetModuleWithRestrictions(props, android.CommonAttributes{Name: name + "_alwayslink", Tags: tags}, &alwayslinkAttrs, prebuiltAttrs.Enabled)
-}
-
-type bazelPrebuiltLibrarySharedAttributes struct {
-	Shared_library         bazel.LabelAttribute
-	Export_includes        bazel.StringListAttribute
-	Export_system_includes bazel.StringListAttribute
-}
-
-func prebuiltLibrarySharedBp2Build(ctx android.Bp2buildMutatorContext, module *Module) {
-	prebuiltAttrs := Bp2BuildParsePrebuiltLibraryProps(ctx, module, false)
-	exportedIncludes := bp2BuildParseExportedIncludes(ctx, module, nil)
-
-	attrs := &bazelPrebuiltLibrarySharedAttributes{
-		Shared_library:         prebuiltAttrs.Src,
-		Export_includes:        exportedIncludes.Includes,
-		Export_system_includes: exportedIncludes.SystemIncludes,
-	}
-
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "cc_prebuilt_library_shared",
-		Bzl_load_location: "//build/bazel/rules/cc:cc_prebuilt_library_shared.bzl",
-	}
-
-	name := android.RemoveOptionalPrebuiltPrefix(module.Name())
-	tags := android.ApexAvailableTagsWithoutTestApexes(ctx, module)
-	ctx.CreateBazelTargetModuleWithRestrictions(props, android.CommonAttributes{Name: name, Tags: tags}, attrs, prebuiltAttrs.Enabled)
-}
-
 type prebuiltObjectProperties struct {
 	Srcs []string `android:"path,arch_variant"`
 }
@@ -435,135 +347,6 @@
 	properties prebuiltObjectProperties
 }
 
-type prebuiltLibraryBazelHandler struct {
-	module  *Module
-	library *libraryDecorator
-}
-
-var _ BazelHandler = (*prebuiltLibraryBazelHandler)(nil)
-
-func (h *prebuiltLibraryBazelHandler) QueueBazelCall(ctx android.BaseModuleContext, label string) {
-	if h.module.linker.(*prebuiltLibraryLinker).properties.MixedBuildsDisabled {
-		return
-	}
-	bazelCtx := ctx.Config().BazelContext
-	bazelCtx.QueueBazelRequest(label, cquery.GetCcInfo, android.GetConfigKey(ctx))
-}
-
-func (h *prebuiltLibraryBazelHandler) ProcessBazelQueryResponse(ctx android.ModuleContext, label string) {
-	if h.module.linker.(*prebuiltLibraryLinker).properties.MixedBuildsDisabled {
-		return
-	}
-	bazelCtx := ctx.Config().BazelContext
-	ccInfo, err := bazelCtx.GetCcInfo(label, android.GetConfigKey(ctx))
-	if err != nil {
-		ctx.ModuleErrorf(err.Error())
-		return
-	}
-
-	if h.module.static() {
-		if ok := h.processStaticBazelQueryResponse(ctx, label, ccInfo); !ok {
-			return
-		}
-	} else if h.module.Shared() {
-		if ok := h.processSharedBazelQueryResponse(ctx, label, ccInfo); !ok {
-			return
-		}
-	} else {
-		return
-	}
-
-	h.module.maybeUnhideFromMake()
-
-	h.module.setAndroidMkVariablesFromCquery(ccInfo.CcAndroidMkInfo)
-}
-
-func (h *prebuiltLibraryBazelHandler) processStaticBazelQueryResponse(ctx android.ModuleContext, label string, ccInfo cquery.CcInfo) bool {
-	staticLibs := ccInfo.CcStaticLibraryFiles
-	if len(staticLibs) > 1 {
-		ctx.ModuleErrorf("expected 1 static library from bazel target %q, got %s", label, staticLibs)
-		return false
-	}
-
-	// TODO(b/184543518): cc_prebuilt_library_static may have properties for re-exporting flags
-
-	// TODO(eakammer):Add stub-related flags if this library is a stub library.
-	// h.library.exportVersioningMacroIfNeeded(ctx)
-
-	// Dependencies on this library will expect collectedSnapshotHeaders to be set, otherwise
-	// validation will fail. For now, set this to an empty list.
-	// TODO(cparsons): More closely mirror the collectHeadersForSnapshot implementation.
-	h.library.collectedSnapshotHeaders = android.Paths{}
-
-	if len(staticLibs) == 0 {
-		h.module.outputFile = android.OptionalPath{}
-		return true
-	}
-
-	var outputPath android.Path = android.PathForBazelOut(ctx, staticLibs[0])
-	if len(ccInfo.TidyFiles) > 0 {
-		h.module.tidyFiles = android.PathsForBazelOut(ctx, ccInfo.TidyFiles)
-		outputPath = android.AttachValidationActions(ctx, outputPath, h.module.tidyFiles)
-	}
-
-	h.module.outputFile = android.OptionalPathForPath(outputPath)
-
-	depSet := android.NewDepSetBuilder[android.Path](android.TOPOLOGICAL).Direct(outputPath).Build()
-	ctx.SetProvider(StaticLibraryInfoProvider, StaticLibraryInfo{
-		StaticLibrary:                        outputPath,
-		TransitiveStaticLibrariesForOrdering: depSet,
-	})
-
-	return true
-}
-
-func (h *prebuiltLibraryBazelHandler) processSharedBazelQueryResponse(ctx android.ModuleContext, label string, ccInfo cquery.CcInfo) bool {
-	sharedLibs := ccInfo.CcSharedLibraryFiles
-	if len(sharedLibs) > 1 {
-		ctx.ModuleErrorf("expected 1 shared library from bazel target %s, got %q", label, sharedLibs)
-		return false
-	}
-
-	// TODO(b/184543518): cc_prebuilt_library_shared may have properties for re-exporting flags
-
-	// TODO(eakammer):Add stub-related flags if this library is a stub library.
-	// h.library.exportVersioningMacroIfNeeded(ctx)
-
-	if len(sharedLibs) == 0 {
-		h.module.outputFile = android.OptionalPath{}
-		return true
-	}
-
-	var outputPath android.Path = android.PathForBazelOut(ctx, sharedLibs[0])
-	if len(ccInfo.TidyFiles) > 0 {
-		h.module.tidyFiles = android.PathsForBazelOut(ctx, ccInfo.TidyFiles)
-		outputPath = android.AttachValidationActions(ctx, outputPath, h.module.tidyFiles)
-	}
-
-	h.module.outputFile = android.OptionalPathForPath(outputPath)
-
-	// FIXME(b/214600441): We don't yet strip prebuilt shared libraries
-	h.library.unstrippedOutputFile = outputPath
-
-	var toc android.Path
-	if len(ccInfo.TocFile) > 0 {
-		toc = android.PathForBazelOut(ctx, ccInfo.TocFile)
-	} else {
-		toc = outputPath // Just reuse `out` so ninja still gets an input but won't matter
-	}
-
-	info := SharedLibraryInfo{
-		SharedLibrary:   outputPath,
-		TableOfContents: android.OptionalPathForPath(toc),
-		Target:          ctx.Target(),
-	}
-	ctx.SetProvider(SharedLibraryInfoProvider, info)
-
-	h.library.setFlagExporterInfoFromCcInfo(ctx, ccInfo)
-	h.module.maybeUnhideFromMake()
-	return true
-}
-
 func (p *prebuiltObjectLinker) prebuilt() *android.Prebuilt {
 	return &p.Prebuilt
 }
@@ -593,8 +376,6 @@
 
 func NewPrebuiltObject(hod android.HostOrDeviceSupported) *Module {
 	module := newObject(hod)
-	module.bazelHandler = &prebuiltObjectBazelHandler{module: module}
-	module.bazelable = true
 	prebuilt := &prebuiltObjectLinker{
 		objectLinker: objectLinker{
 			baseLinker: NewBaseLinker(nil),
@@ -606,54 +387,6 @@
 	return module
 }
 
-type prebuiltObjectBazelHandler struct {
-	module *Module
-}
-
-var _ BazelHandler = (*prebuiltObjectBazelHandler)(nil)
-
-func (h *prebuiltObjectBazelHandler) QueueBazelCall(ctx android.BaseModuleContext, label string) {
-	bazelCtx := ctx.Config().BazelContext
-	bazelCtx.QueueBazelRequest(label, cquery.GetOutputFiles, android.GetConfigKey(ctx))
-}
-
-func (h *prebuiltObjectBazelHandler) ProcessBazelQueryResponse(ctx android.ModuleContext, label string) {
-	bazelCtx := ctx.Config().BazelContext
-	outputs, err := bazelCtx.GetOutputFiles(label, android.GetConfigKey(ctx))
-	if err != nil {
-		ctx.ModuleErrorf(err.Error())
-		return
-	}
-	if len(outputs) != 1 {
-		ctx.ModuleErrorf("Expected a single output for `%s`, but got:\n%v", label, outputs)
-		return
-	}
-	out := android.PathForBazelOut(ctx, outputs[0])
-	h.module.outputFile = android.OptionalPathForPath(out)
-	h.module.maybeUnhideFromMake()
-}
-
-type bazelPrebuiltObjectAttributes struct {
-	Src bazel.LabelAttribute
-}
-
-func prebuiltObjectBp2Build(ctx android.Bp2buildMutatorContext, module *Module) {
-	prebuiltAttrs := bp2BuildParsePrebuiltObjectProps(ctx, module)
-
-	attrs := &bazelPrebuiltObjectAttributes{
-		Src: prebuiltAttrs.Src,
-	}
-
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "cc_prebuilt_object",
-		Bzl_load_location: "//build/bazel/rules/cc:cc_prebuilt_object.bzl",
-	}
-
-	name := android.RemoveOptionalPrebuiltPrefix(module.Name())
-	tags := android.ApexAvailableTagsWithoutTestApexes(ctx, module)
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: name, Tags: tags}, attrs)
-}
-
 func PrebuiltObjectFactory() android.Module {
 	module := NewPrebuiltObject(android.HostAndDeviceSupported)
 	return module.Init()
@@ -747,15 +480,9 @@
 	return module.Init()
 }
 
-type prebuiltBinaryBazelHandler struct {
-	module    *Module
-	decorator *binaryDecorator
-}
-
 func NewPrebuiltBinary(hod android.HostOrDeviceSupported) (*Module, *binaryDecorator) {
-	module, binary := newBinary(hod, true)
+	module, binary := newBinary(hod)
 	module.compiler = nil
-	module.bazelHandler = &prebuiltBinaryBazelHandler{module, binary}
 
 	prebuilt := &prebuiltBinaryLinker{
 		binaryDecorator: binary,
@@ -769,54 +496,6 @@
 	return module, binary
 }
 
-var _ BazelHandler = (*prebuiltBinaryBazelHandler)(nil)
-
-func (h *prebuiltBinaryBazelHandler) QueueBazelCall(ctx android.BaseModuleContext, label string) {
-	bazelCtx := ctx.Config().BazelContext
-	bazelCtx.QueueBazelRequest(label, cquery.GetOutputFiles, android.GetConfigKeyApexVariant(ctx, GetApexConfigKey(ctx)))
-}
-
-func (h *prebuiltBinaryBazelHandler) ProcessBazelQueryResponse(ctx android.ModuleContext, label string) {
-	bazelCtx := ctx.Config().BazelContext
-	outputs, err := bazelCtx.GetOutputFiles(label, android.GetConfigKeyApexVariant(ctx, GetApexConfigKey(ctx)))
-	if err != nil {
-		ctx.ModuleErrorf(err.Error())
-		return
-	}
-	if len(outputs) != 1 {
-		ctx.ModuleErrorf("Expected a single output for `%s`, but got:\n%v", label, outputs)
-		return
-	}
-	out := android.PathForBazelOut(ctx, outputs[0])
-	h.module.outputFile = android.OptionalPathForPath(out)
-	h.module.maybeUnhideFromMake()
-}
-
-type bazelPrebuiltBinaryAttributes struct {
-	Src   bazel.LabelAttribute
-	Strip stripAttributes
-}
-
-func prebuiltBinaryBp2Build(ctx android.Bp2buildMutatorContext, module *Module) {
-	prebuiltAttrs := bp2BuildParsePrebuiltBinaryProps(ctx, module)
-
-	var la linkerAttributes
-	la.convertStripProps(ctx, module)
-	attrs := &bazelPrebuiltBinaryAttributes{
-		Src:   prebuiltAttrs.Src,
-		Strip: stripAttrsFromLinkerAttrs(&la),
-	}
-
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "cc_prebuilt_binary",
-		Bzl_load_location: "//build/bazel/rules/cc:cc_prebuilt_binary.bzl",
-	}
-
-	name := android.RemoveOptionalPrebuiltPrefix(module.Name())
-	tags := android.ApexAvailableTagsWithoutTestApexes(ctx, module)
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: name, Tags: tags}, attrs)
-}
-
 type Sanitized struct {
 	None struct {
 		Srcs []string `android:"path,arch_variant"`
diff --git a/cc/prebuilt_test.go b/cc/prebuilt_test.go
index 0c79e55..8b4174b 100644
--- a/cc/prebuilt_test.go
+++ b/cc/prebuilt_test.go
@@ -19,8 +19,6 @@
 	"testing"
 
 	"android/soong/android"
-	"android/soong/bazel/cquery"
-
 	"github.com/google/blueprint"
 )
 
@@ -386,289 +384,6 @@
 	assertString(t, static2.OutputFile().Path().Base(), "libf.hwasan.a")
 }
 
-func TestPrebuiltLibraryWithBazel(t *testing.T) {
-	const bp = `
-cc_prebuilt_library {
-	name: "foo",
-	shared: {
-		srcs: ["foo.so"],
-	},
-	static: {
-		srcs: ["foo.a"],
-	},
-	bazel_module: { label: "//foo/bar:bar" },
-}`
-	outBaseDir := "outputbase"
-	result := android.GroupFixturePreparers(
-		prepareForPrebuiltTest,
-		android.FixtureModifyConfig(func(config android.Config) {
-			config.BazelContext = android.MockBazelContext{
-				OutputBaseDir: outBaseDir,
-				LabelToCcInfo: map[string]cquery.CcInfo{
-					"//foo/bar:bar": cquery.CcInfo{
-						CcSharedLibraryFiles: []string{"foo.so"},
-					},
-					"//foo/bar:bar_bp2build_cc_library_static": cquery.CcInfo{
-						CcStaticLibraryFiles: []string{"foo.a"},
-					},
-				},
-			}
-		}),
-	).RunTestWithBp(t, bp)
-	sharedFoo := result.ModuleForTests("foo", "android_arm_armv7-a-neon_shared").Module()
-	pathPrefix := outBaseDir + "/execroot/__main__/"
-
-	sharedInfo := result.ModuleProvider(sharedFoo, SharedLibraryInfoProvider).(SharedLibraryInfo)
-	android.AssertPathRelativeToTopEquals(t,
-		"prebuilt library shared target path did not exist or did not match expected. If the base path is what does not match, it is likely that Soong built this module instead of Bazel.",
-		pathPrefix+"foo.so", sharedInfo.SharedLibrary)
-
-	outputFiles, err := sharedFoo.(android.OutputFileProducer).OutputFiles("")
-	if err != nil {
-		t.Errorf("Unexpected error getting cc_object outputfiles %s", err)
-	}
-	expectedOutputFiles := []string{pathPrefix + "foo.so"}
-	android.AssertDeepEquals(t,
-		"prebuilt library shared target output files did not match expected.",
-		expectedOutputFiles, outputFiles.Strings())
-
-	staticFoo := result.ModuleForTests("foo", "android_arm_armv7-a-neon_static").Module()
-	staticInfo := result.ModuleProvider(staticFoo, StaticLibraryInfoProvider).(StaticLibraryInfo)
-	android.AssertPathRelativeToTopEquals(t,
-		"prebuilt library static target path did not exist or did not match expected. If the base path is what does not match, it is likely that Soong built this module instead of Bazel.",
-		pathPrefix+"foo.a", staticInfo.StaticLibrary)
-
-	staticOutputFiles, err := staticFoo.(android.OutputFileProducer).OutputFiles("")
-	if err != nil {
-		t.Errorf("Unexpected error getting cc_object staticOutputFiles %s", err)
-	}
-	expectedStaticOutputFiles := []string{pathPrefix + "foo.a"}
-	android.AssertDeepEquals(t,
-		"prebuilt library static target output files did not match expected.",
-		expectedStaticOutputFiles, staticOutputFiles.Strings())
-}
-
-func TestPrebuiltLibraryWithBazelValidations(t *testing.T) {
-	const bp = `
-cc_prebuilt_library {
-	name: "foo",
-	shared: {
-		srcs: ["foo.so"],
-	},
-	static: {
-		srcs: ["foo.a"],
-	},
-	bazel_module: { label: "//foo/bar:bar" },
-	tidy: true,
-}`
-	outBaseDir := "outputbase"
-	result := android.GroupFixturePreparers(
-		prepareForPrebuiltTest,
-		android.FixtureMergeEnv(map[string]string{
-			"ALLOW_LOCAL_TIDY_TRUE": "1",
-		}),
-		android.FixtureModifyConfig(func(config android.Config) {
-			config.BazelContext = android.MockBazelContext{
-				OutputBaseDir: outBaseDir,
-				LabelToCcInfo: map[string]cquery.CcInfo{
-					"//foo/bar:bar": cquery.CcInfo{
-						CcSharedLibraryFiles: []string{"foo.so"},
-						TidyFiles:            []string{"foo.c.tidy"},
-					},
-					"//foo/bar:bar_bp2build_cc_library_static": cquery.CcInfo{
-						CcStaticLibraryFiles: []string{"foo.a"},
-						TidyFiles:            []string{"foo.c.tidy"},
-					},
-				},
-			}
-		}),
-	).RunTestWithBp(t, bp)
-	sharedFoo := result.ModuleForTests("foo", "android_arm_armv7-a-neon_shared").Module()
-
-	expectedOutputFile := "out/soong/.intermediates/foo/android_arm_armv7-a-neon_shared/validated/foo.so"
-	sharedInfo := result.ModuleProvider(sharedFoo, SharedLibraryInfoProvider).(SharedLibraryInfo)
-	android.AssertPathRelativeToTopEquals(t,
-		"prebuilt library shared target path did not exist or did not match expected. If the base path is what does not match, it is likely that Soong built this module instead of Bazel.",
-		expectedOutputFile, sharedInfo.SharedLibrary)
-
-	outputFiles, err := sharedFoo.(android.OutputFileProducer).OutputFiles("")
-	if err != nil {
-		t.Errorf("Unexpected error getting cc_object outputfiles %s", err)
-	}
-	expectedOutputFiles := []string{expectedOutputFile}
-	android.AssertPathsRelativeToTopEquals(t,
-		"prebuilt library shared target output files did not match expected.",
-		expectedOutputFiles, outputFiles)
-
-	staticFoo := result.ModuleForTests("foo", "android_arm_armv7-a-neon_static").Module()
-	staticInfo := result.ModuleProvider(staticFoo, StaticLibraryInfoProvider).(StaticLibraryInfo)
-	expectedStaticOutputFile := "out/soong/.intermediates/foo/android_arm_armv7-a-neon_static/validated/foo.a"
-	android.AssertPathRelativeToTopEquals(t,
-		"prebuilt library static target path did not exist or did not match expected. If the base path is what does not match, it is likely that Soong built this module instead of Bazel.",
-		expectedStaticOutputFile, staticInfo.StaticLibrary)
-
-	staticOutputFiles, err := staticFoo.(android.OutputFileProducer).OutputFiles("")
-	if err != nil {
-		t.Errorf("Unexpected error getting cc_object staticOutputFiles %s", err)
-	}
-	expectedStaticOutputFiles := []string{expectedStaticOutputFile}
-	android.AssertPathsRelativeToTopEquals(t,
-		"prebuilt library static target output files did not match expected.",
-		expectedStaticOutputFiles, staticOutputFiles)
-}
-
-func TestPrebuiltLibraryWithBazelStaticDisabled(t *testing.T) {
-	const bp = `
-cc_prebuilt_library {
-	name: "foo",
-	shared: {
-		srcs: ["foo.so"],
-	},
-	static: {
-		enabled: false
-	},
-	bazel_module: { label: "//foo/bar:bar" },
-}`
-	outBaseDir := "outputbase"
-	result := android.GroupFixturePreparers(
-		prepareForPrebuiltTest,
-		android.FixtureModifyConfig(func(config android.Config) {
-			config.BazelContext = android.MockBazelContext{
-				OutputBaseDir: outBaseDir,
-				LabelToCcInfo: map[string]cquery.CcInfo{
-					"//foo/bar:bar": cquery.CcInfo{
-						CcSharedLibraryFiles: []string{"foo.so"},
-					},
-				},
-			}
-		}),
-	).RunTestWithBp(t, bp)
-	sharedFoo := result.ModuleForTests("foo", "android_arm_armv7-a-neon_shared").Module()
-	pathPrefix := outBaseDir + "/execroot/__main__/"
-
-	sharedInfo := result.ModuleProvider(sharedFoo, SharedLibraryInfoProvider).(SharedLibraryInfo)
-	android.AssertPathRelativeToTopEquals(t,
-		"prebuilt library shared target path did not exist or did not match expected. If the base path is what does not match, it is likely that Soong built this module instead of Bazel.",
-		pathPrefix+"foo.so", sharedInfo.SharedLibrary)
-
-	outputFiles, err := sharedFoo.(android.OutputFileProducer).OutputFiles("")
-	if err != nil {
-		t.Errorf("Unexpected error getting cc_object outputfiles %s", err)
-	}
-	expectedOutputFiles := []string{pathPrefix + "foo.so"}
-	android.AssertDeepEquals(t,
-		"prebuilt library shared target output files did not match expected.",
-		expectedOutputFiles, outputFiles.Strings())
-}
-
-func TestPrebuiltLibraryStaticWithBazel(t *testing.T) {
-	const bp = `
-cc_prebuilt_library_static {
-	name: "foo",
-	srcs: ["foo.so"],
-	bazel_module: { label: "//foo/bar:bar" },
-}`
-	outBaseDir := "outputbase"
-	result := android.GroupFixturePreparers(
-		prepareForPrebuiltTest,
-		android.FixtureModifyConfig(func(config android.Config) {
-			config.BazelContext = android.MockBazelContext{
-				OutputBaseDir: outBaseDir,
-				LabelToCcInfo: map[string]cquery.CcInfo{
-					"//foo/bar:bar": cquery.CcInfo{
-						CcStaticLibraryFiles: []string{"foo.so"},
-					},
-				},
-			}
-		}),
-	).RunTestWithBp(t, bp)
-	staticFoo := result.ModuleForTests("foo", "android_arm_armv7-a-neon_static").Module()
-	pathPrefix := outBaseDir + "/execroot/__main__/"
-
-	info := result.ModuleProvider(staticFoo, StaticLibraryInfoProvider).(StaticLibraryInfo)
-	android.AssertPathRelativeToTopEquals(t,
-		"prebuilt library static path did not match expected. If the base path is what does not match, it is likely that Soong built this module instead of Bazel.",
-		pathPrefix+"foo.so", info.StaticLibrary)
-
-	outputFiles, err := staticFoo.(android.OutputFileProducer).OutputFiles("")
-	if err != nil {
-		t.Errorf("Unexpected error getting cc_object outputfiles %s", err)
-	}
-	expectedOutputFiles := []string{pathPrefix + "foo.so"}
-	android.AssertDeepEquals(t, "prebuilt library static output files did not match expected.", expectedOutputFiles, outputFiles.Strings())
-}
-
-func TestPrebuiltLibrarySharedWithBazelWithoutToc(t *testing.T) {
-	const bp = `
-cc_prebuilt_library_shared {
-	name: "foo",
-	srcs: ["foo.so"],
-	bazel_module: { label: "//foo/bar:bar" },
-}`
-	outBaseDir := "outputbase"
-	config := TestConfig(t.TempDir(), android.Android, nil, bp, nil)
-	config.BazelContext = android.MockBazelContext{
-		OutputBaseDir: outBaseDir,
-		LabelToCcInfo: map[string]cquery.CcInfo{
-			"//foo/bar:bar": cquery.CcInfo{
-				CcSharedLibraryFiles: []string{"foo.so"},
-			},
-		},
-	}
-	ctx := testCcWithConfig(t, config)
-	sharedFoo := ctx.ModuleForTests("foo", "android_arm_armv7-a-neon_shared").Module()
-	pathPrefix := outBaseDir + "/execroot/__main__/"
-
-	info := ctx.ModuleProvider(sharedFoo, SharedLibraryInfoProvider).(SharedLibraryInfo)
-	android.AssertPathRelativeToTopEquals(t, "prebuilt shared library",
-		pathPrefix+"foo.so", info.SharedLibrary)
-	android.AssertPathRelativeToTopEquals(t, "prebuilt's 'nullary' ToC",
-		pathPrefix+"foo.so", info.TableOfContents.Path())
-
-	outputFiles, err := sharedFoo.(android.OutputFileProducer).OutputFiles("")
-	if err != nil {
-		t.Errorf("Unexpected error getting cc_object outputfiles %s", err)
-	}
-	expectedOutputFiles := []string{pathPrefix + "foo.so"}
-	android.AssertDeepEquals(t, "output files", expectedOutputFiles, outputFiles.Strings())
-}
-
-func TestPrebuiltLibrarySharedWithBazelWithToc(t *testing.T) {
-	const bp = `
-cc_prebuilt_library_shared {
-	name: "foo",
-	srcs: ["foo.so"],
-	bazel_module: { label: "//foo/bar:bar" },
-}`
-	outBaseDir := "outputbase"
-	config := TestConfig(t.TempDir(), android.Android, nil, bp, nil)
-	config.BazelContext = android.MockBazelContext{
-		OutputBaseDir: outBaseDir,
-		LabelToCcInfo: map[string]cquery.CcInfo{
-			"//foo/bar:bar": cquery.CcInfo{
-				CcSharedLibraryFiles: []string{"foo.so"},
-				TocFile:              "toc",
-			},
-		},
-	}
-	ctx := testCcWithConfig(t, config)
-	sharedFoo := ctx.ModuleForTests("foo", "android_arm_armv7-a-neon_shared").Module()
-	pathPrefix := outBaseDir + "/execroot/__main__/"
-
-	info := ctx.ModuleProvider(sharedFoo, SharedLibraryInfoProvider).(SharedLibraryInfo)
-	android.AssertPathRelativeToTopEquals(t, "prebuilt shared library's ToC",
-		pathPrefix+"toc", info.TableOfContents.Path())
-	android.AssertPathRelativeToTopEquals(t, "prebuilt shared library",
-		pathPrefix+"foo.so", info.SharedLibrary)
-
-	outputFiles, err := sharedFoo.(android.OutputFileProducer).OutputFiles("")
-	if err != nil {
-		t.Errorf("Unexpected error getting cc_object outputfiles %s", err)
-	}
-	expectedOutputFiles := []string{pathPrefix + "foo.so"}
-	android.AssertDeepEquals(t, "output files", expectedOutputFiles, outputFiles.Strings())
-}
-
 func TestPrebuiltStubNoinstall(t *testing.T) {
 	testFunc := func(t *testing.T, expectLibfooOnSystemLib bool, fs android.MockFS) {
 		result := android.GroupFixturePreparers(
@@ -794,27 +509,3 @@
 }`
 	testCcError(t, `Android.bp:4:6: module "bintest" variant "android_arm64_armv8-a": srcs: multiple prebuilt source files`, bp)
 }
-
-func TestPrebuiltBinaryWithBazel(t *testing.T) {
-	const bp = `
-cc_prebuilt_binary {
-	name: "bintest",
-	srcs: ["bin"],
-	bazel_module: { label: "//bin/foo:foo" },
-}`
-	const outBaseDir = "outputbase"
-	const expectedOut = outBaseDir + "/execroot/__main__/bin"
-	config := TestConfig(t.TempDir(), android.Android, nil, bp, nil)
-	config.BazelContext = android.MockBazelContext{
-		OutputBaseDir:      outBaseDir,
-		LabelToOutputFiles: map[string][]string{"//bin/foo:foo": []string{"bin"}},
-	}
-	ctx := testCcWithConfig(t, config)
-	bin := ctx.ModuleForTests("bintest", "android_arm64_armv8-a").Module().(*Module)
-	out := bin.OutputFile()
-	if !out.Valid() {
-		t.Error("Invalid output file")
-		return
-	}
-	android.AssertStringEquals(t, "output file", expectedOut, out.String())
-}
diff --git a/cc/proto.go b/cc/proto.go
index 4e08a4c..4d72f26 100644
--- a/cc/proto.go
+++ b/cc/proto.go
@@ -19,7 +19,6 @@
 	"github.com/google/blueprint/proptools"
 
 	"android/soong/android"
-	"android/soong/bazel"
 )
 
 const (
@@ -163,109 +162,3 @@
 
 	return flags
 }
-
-type protoAttributes struct {
-	Deps bazel.LabelListAttribute
-
-	// A list of proto_library targets that that the proto_library in `deps` depends on
-	// This list is overestimation.
-	// Overestimation is necessary since Soong includes other protos via proto.include_dirs and not
-	// a specific .proto file module explicitly.
-	Transitive_deps bazel.LabelListAttribute
-
-	// A list of cc_library_* targets that the generated cpp code depends on
-	Cc_deps bazel.LabelListAttribute
-
-	Min_sdk_version *string
-}
-
-type bp2buildProtoDeps struct {
-	wholeStaticLib               *bazel.LabelAttribute
-	implementationWholeStaticLib *bazel.LabelAttribute
-	protoDep                     *bazel.LabelAttribute
-}
-
-func bp2buildProto(ctx android.Bp2buildMutatorContext, m *Module, protoSrcs bazel.LabelListAttribute, la linkerAttributes) bp2buildProtoDeps {
-	var ret bp2buildProtoDeps
-
-	protoInfo, ok := android.Bp2buildProtoProperties(ctx, &m.ModuleBase, protoSrcs)
-	if !ok || protoInfo.Proto_libs.IsEmpty() {
-		return ret
-	}
-
-	var depName string
-	typ := proptools.StringDefault(protoInfo.Type, protoTypeDefault)
-	var rule_class string
-	suffix := "_cc_proto"
-	switch typ {
-	case "lite":
-		suffix += "_lite"
-		rule_class = "cc_lite_proto_library"
-		depName = "libprotobuf-cpp-lite"
-	case "full":
-		rule_class = "cc_proto_library"
-		depName = "libprotobuf-cpp-full"
-	default:
-		ctx.PropertyErrorf("proto.type", "cannot handle conversion at this time: %q", typ)
-	}
-
-	dep := android.BazelLabelForModuleDepSingle(ctx, depName)
-	ret.protoDep = &bazel.LabelAttribute{Value: &dep}
-
-	var protoAttrs protoAttributes
-	protoAttrs.Deps.SetValue(protoInfo.Proto_libs)
-	protoAttrs.Transitive_deps.SetValue(protoInfo.Transitive_proto_libs)
-
-	// Add the implementation deps of the top-level cc_library_static
-	// This is necessary to compile the internal root of cc_proto_library.
-	// Without this, clang might not be able to find .h files that the generated cpp files depends on
-	protoAttrs.Cc_deps = *la.implementationDeps.Clone()
-	protoAttrs.Cc_deps.Append(la.implementationDynamicDeps)
-	protoAttrs.Cc_deps.Append(la.implementationWholeArchiveDeps)
-	protoAttrs.Cc_deps.Append(la.wholeArchiveDeps)
-	// Subtract myself to prevent possible circular dep
-	protoAttrs.Cc_deps = bazel.SubtractBazelLabelListAttribute(
-		protoAttrs.Cc_deps,
-		bazel.MakeLabelListAttribute(
-			bazel.MakeLabelList([]bazel.Label{
-				bazel.Label{Label: ":" + m.Name() + suffix},
-			}),
-		),
-	)
-	// Subtract the protobuf libraries since cc_proto_library implicitly adds them
-	protoAttrs.Cc_deps = bazel.SubtractBazelLabelListAttribute(
-		protoAttrs.Cc_deps,
-		bazel.MakeLabelListAttribute(
-			bazel.MakeLabelList([]bazel.Label{
-				bazel.Label{Label: "//external/protobuf:libprotobuf-cpp-full", OriginalModuleName: "libprotobuf-cpp-full"},
-				bazel.Label{Label: "//external/protobuf:libprotobuf-cpp-lite", OriginalModuleName: "libprotobuf-cpp-lite"},
-			}),
-		),
-	)
-
-	protoAttrs.Min_sdk_version = m.Properties.Min_sdk_version
-
-	name := m.Name() + suffix
-	tags := android.ApexAvailableTagsWithoutTestApexes(ctx, m)
-	ctx.CreateBazelTargetModule(
-		bazel.BazelTargetModuleProperties{
-			Rule_class:        rule_class,
-			Bzl_load_location: "//build/bazel/rules/cc:cc_proto.bzl",
-		},
-		android.CommonAttributes{Name: name, Tags: tags},
-		&protoAttrs)
-
-	var privateHdrs bool
-	if lib, ok := m.linker.(*libraryDecorator); ok {
-		privateHdrs = !proptools.Bool(lib.Properties.Proto.Export_proto_headers)
-	}
-
-	labelAttr := &bazel.LabelAttribute{Value: &bazel.Label{Label: ":" + name}}
-	if privateHdrs {
-		ret.implementationWholeStaticLib = labelAttr
-	} else {
-		ret.wholeStaticLib = labelAttr
-	}
-
-	return ret
-}
diff --git a/cc/rs.go b/cc/rs.go
index 93acdc7..b0d759b 100644
--- a/cc/rs.go
+++ b/cc/rs.go
@@ -20,7 +20,6 @@
 	"strings"
 
 	"android/soong/android"
-	"android/soong/bazel"
 	"github.com/google/blueprint"
 )
 
@@ -134,35 +133,3 @@
 
 	return flags
 }
-
-type rscriptAttributes struct {
-	// Renderscript source files
-	Srcs bazel.LabelListAttribute
-}
-
-func bp2buildRScript(ctx android.Bp2buildMutatorContext, m *Module, ca compilerAttributes) (bazel.LabelAttribute, bazel.StringListAttribute, bazel.StringListAttribute) {
-	var rscriptAttrs rscriptAttributes
-	var rsAbsIncludes bazel.StringListAttribute
-	var localIncludes bazel.StringListAttribute
-	var rsModuleName string
-	var convertedRsSrcsLabel bazel.LabelAttribute
-
-	if !ca.rscriptSrcs.IsEmpty() {
-		rscriptAttrs.Srcs = ca.rscriptSrcs
-		rsModuleName = m.Name() + "_renderscript"
-
-		localIncludes.Value = []string{"."}
-		rsAbsIncludes.Value = []string{"frameworks/rs", "frameworks/rs/cpp"}
-		convertedRsSrcsLabel = bazel.LabelAttribute{Value: &bazel.Label{Label: rsModuleName}}
-
-		ctx.CreateBazelTargetModule(
-			bazel.BazelTargetModuleProperties{
-				Rule_class:        "rscript_to_cpp",
-				Bzl_load_location: "//build/bazel/rules/cc:rscript_to_cpp.bzl",
-			},
-			android.CommonAttributes{Name: rsModuleName},
-			&rscriptAttrs)
-	}
-
-	return convertedRsSrcsLabel, rsAbsIncludes, localIncludes
-}
diff --git a/cc/sanitize.go b/cc/sanitize.go
index 6624d4b..31c0500 100644
--- a/cc/sanitize.go
+++ b/cc/sanitize.go
@@ -1911,7 +1911,3 @@
 func hwasanMakeVarsProvider(ctx android.MakeVarsContext) {
 	hwasanStaticLibs(ctx.Config()).exportToMake(ctx)
 }
-
-func BazelCcSanitizerToolchainVars(config android.Config) string {
-	return android.BazelToolchainVars(config, exportedVars)
-}
diff --git a/cc/stl.go b/cc/stl.go
index a31a585..63c23d7 100644
--- a/cc/stl.go
+++ b/cc/stl.go
@@ -134,8 +134,6 @@
 	return "libunwind"
 }
 
-// Should be kept up to date with
-// https://cs.android.com/android/platform/superproject/+/master:build/bazel/rules/cc/stl.bzl;l=46;drc=21771b671ae08565033768a6d3d151c54f887fa2
 func (stl *stl) deps(ctx BaseModuleContext, deps Deps) Deps {
 	switch stl.Properties.SelectedStl {
 	case "libstdc++":
@@ -187,8 +185,6 @@
 	return deps
 }
 
-// Should be kept up to date with
-// https://cs.android.com/android/platform/superproject/+/master:build/bazel/rules/cc/stl.bzl;l=94;drc=5bc8e39d2637927dc57dd0850210d43d348a1341
 func (stl *stl) flags(ctx ModuleContext, flags Flags) Flags {
 	switch stl.Properties.SelectedStl {
 	case "libc++", "libc++_static":
diff --git a/cc/strip.go b/cc/strip.go
index c60e135..b1f34bb 100644
--- a/cc/strip.go
+++ b/cc/strip.go
@@ -59,7 +59,6 @@
 	return !forceDisable && (forceEnable || defaultEnable)
 }
 
-// Keep this consistent with //build/bazel/rules/stripped_shared_library.bzl.
 func (stripper *Stripper) strip(actx android.ModuleContext, in android.Path, out android.ModuleOutPath,
 	flags StripFlags, isStaticLib bool) {
 	if actx.Darwin() {
diff --git a/cc/test.go b/cc/test.go
index 78e1646..d02145b 100644
--- a/cc/test.go
+++ b/cc/test.go
@@ -22,8 +22,6 @@
 	"github.com/google/blueprint/proptools"
 
 	"android/soong/android"
-	"android/soong/bazel"
-	"android/soong/bazel/cquery"
 	"android/soong/tradefed"
 )
 
@@ -139,8 +137,7 @@
 // specific functionality on a device. The executable binary gets an implicit
 // static_libs dependency on libgtests unless the gtest flag is set to false.
 func TestFactory() android.Module {
-	module := NewTest(android.HostAndDeviceSupported, true)
-	module.bazelHandler = &ccTestBazelHandler{module: module}
+	module := NewTest(android.HostAndDeviceSupported)
 	return module.Init()
 }
 
@@ -164,7 +161,7 @@
 
 // cc_test_host compiles a test host binary.
 func TestHostFactory() android.Module {
-	module := NewTest(android.HostSupported, true)
+	module := NewTest(android.HostSupported)
 	return module.Init()
 }
 
@@ -488,9 +485,8 @@
 	return configs
 }
 
-func NewTest(hod android.HostOrDeviceSupported, bazelable bool) *Module {
-	module, binary := newBinary(hod, bazelable)
-	module.bazelable = bazelable
+func NewTest(hod android.HostOrDeviceSupported) *Module {
+	module, binary := newBinary(hod)
 	module.multilib = android.MultilibBoth
 	module.testModule = true
 	binary.baseInstaller = NewTestInstaller()
@@ -552,7 +548,6 @@
 	}
 	module.linker = test
 	module.installer = test
-	module.bazelable = true
 	return module
 }
 
@@ -632,7 +627,7 @@
 }
 
 func NewBenchmark(hod android.HostOrDeviceSupported) *Module {
-	module, binary := newBinary(hod, false)
+	module, binary := newBinary(hod)
 	module.multilib = android.MultilibBoth
 	binary.baseInstaller = NewBaseInstaller("benchmarktest", "benchmarktest64", InstallInData)
 
@@ -643,180 +638,3 @@
 	module.installer = benchmark
 	return module
 }
-
-type ccTestBazelHandler struct {
-	module *Module
-}
-
-var _ BazelHandler = (*ccTestBazelHandler)(nil)
-
-// The top level target named $label is a test_suite target,
-// not the internal cc_test executable target.
-//
-// This is to ensure `b test //$label` runs the test_suite target directly,
-// which depends on tradefed_test targets, instead of the internal cc_test
-// target, which doesn't have tradefed integrations.
-//
-// However, for cquery, we want the internal cc_test executable target, which
-// has the suffix "__tf_internal".
-func mixedBuildsTestLabel(label string) string {
-	return label + "__tf_internal"
-}
-
-func (handler *ccTestBazelHandler) QueueBazelCall(ctx android.BaseModuleContext, label string) {
-	bazelCtx := ctx.Config().BazelContext
-	bazelCtx.QueueBazelRequest(mixedBuildsTestLabel(label), cquery.GetCcUnstrippedInfo, android.GetConfigKey(ctx))
-}
-
-func (handler *ccTestBazelHandler) ProcessBazelQueryResponse(ctx android.ModuleContext, label string) {
-	bazelCtx := ctx.Config().BazelContext
-	info, err := bazelCtx.GetCcUnstrippedInfo(mixedBuildsTestLabel(label), android.GetConfigKey(ctx))
-	if err != nil {
-		ctx.ModuleErrorf(err.Error())
-		return
-	}
-
-	var outputFilePath android.Path = android.PathForBazelOut(ctx, info.OutputFile)
-	if len(info.TidyFiles) > 0 {
-		handler.module.tidyFiles = android.PathsForBazelOut(ctx, info.TidyFiles)
-		outputFilePath = android.AttachValidationActions(ctx, outputFilePath, handler.module.tidyFiles)
-	}
-	handler.module.outputFile = android.OptionalPathForPath(outputFilePath)
-	handler.module.linker.(*testBinary).unstrippedOutputFile = android.PathForBazelOut(ctx, info.UnstrippedOutput)
-
-	handler.module.setAndroidMkVariablesFromCquery(info.CcAndroidMkInfo)
-}
-
-// binaryAttributes contains Bazel attributes corresponding to a cc test
-type testBinaryAttributes struct {
-	binaryAttributes
-
-	Gtest *bool
-
-	tidyAttributes
-	tradefed.TestConfigAttributes
-
-	Runs_on bazel.StringListAttribute
-}
-
-// testBinaryBp2build is the bp2build converter for cc_test modules. A cc_test's
-// dependency graph and compilation/linking steps are functionally similar to a
-// cc_binary, but has additional dependencies on test deps like gtest, and
-// produces additional runfiles like XML plans for Tradefed orchestration
-//
-// TODO(b/244432609): handle `isolated` property.
-// TODO(b/244432134): handle custom runpaths for tests that assume runfile layouts not
-// default to bazel. (see linkerInit function)
-func testBinaryBp2build(ctx android.Bp2buildMutatorContext, m *Module) {
-	var testBinaryAttrs testBinaryAttributes
-	testBinaryAttrs.binaryAttributes = binaryBp2buildAttrs(ctx, m)
-
-	var data bazel.LabelListAttribute
-	var tags bazel.StringListAttribute
-
-	testBinaryProps := m.GetArchVariantProperties(ctx, &TestBinaryProperties{})
-	for axis, configToProps := range testBinaryProps {
-		for config, props := range configToProps {
-			if p, ok := props.(*TestBinaryProperties); ok {
-				// Combine data, data_bins and data_libs into a single 'data' attribute.
-				var combinedData bazel.LabelList
-				combinedData.Append(android.BazelLabelForModuleSrc(ctx, p.Data))
-				combinedData.Append(android.BazelLabelForModuleDeps(ctx, p.Data_bins))
-				combinedData.Append(android.BazelLabelForModuleDeps(ctx, p.Data_libs))
-				data.SetSelectValue(axis, config, combinedData)
-				tags.SetSelectValue(axis, config, p.Test_options.Tags)
-			}
-		}
-	}
-
-	// The logic comes from https://cs.android.com/android/platform/superproject/main/+/0df8153267f96da877febc5332240fa06ceb8533:build/soong/cc/sanitize.go;l=488
-	var features bazel.StringListAttribute
-	curFeatures := testBinaryAttrs.binaryAttributes.Features.SelectValue(bazel.OsArchConfigurationAxis, bazel.OsArchAndroidArm64)
-	var newFeatures []string
-	if !android.InList("memtag_heap", curFeatures) && !android.InList("-memtag_heap", curFeatures) {
-		newFeatures = append(newFeatures, "memtag_heap")
-		if !android.InList("diag_memtag_heap", curFeatures) && !android.InList("-diag_memtag_heap", curFeatures) {
-			newFeatures = append(newFeatures, "diag_memtag_heap")
-		}
-	}
-
-	features.SetSelectValue(bazel.OsArchConfigurationAxis, bazel.OsArchAndroidArm64, newFeatures)
-	testBinaryAttrs.binaryAttributes.Features.Append(features)
-	testBinaryAttrs.binaryAttributes.Features.DeduplicateAxesFromBase()
-
-	m.convertTidyAttributes(ctx, &testBinaryAttrs.tidyAttributes)
-
-	testBinary := m.linker.(*testBinary)
-	gtest := testBinary.gtest()
-	gtestIsolated := testBinary.isolated(ctx)
-	// Use the underling bool pointer for Gtest in attrs
-	// This ensures that if this property is not set in Android.bp file, it will not be set in BUILD file either
-	// cc_test macro will default gtest to True
-	testBinaryAttrs.Gtest = testBinary.LinkerProperties.Gtest
-
-	addImplicitGtestDeps(ctx, &testBinaryAttrs, gtest, gtestIsolated)
-
-	var unitTest *bool
-
-	for _, testProps := range m.GetProperties() {
-		if p, ok := testProps.(*TestBinaryProperties); ok {
-			useVendor := false // TODO Bug: 262914724
-			testInstallBase := getTestInstallBase(useVendor)
-			testConfigAttributes := tradefed.GetTestConfigAttributes(
-				ctx,
-				p.Test_config,
-				p.Test_options.Extra_test_configs,
-				p.Auto_gen_config,
-				p.Test_options.Test_suite_tag,
-				p.Test_config_template,
-				getTradefedConfigOptions(ctx, p, gtestIsolated, true),
-				&testInstallBase,
-			)
-			testBinaryAttrs.TestConfigAttributes = testConfigAttributes
-			unitTest = p.Test_options.Unit_test
-		}
-	}
-
-	testBinaryAttrs.Runs_on = bazel.MakeStringListAttribute(android.RunsOn(
-		m.ModuleBase.HostSupported(),
-		m.ModuleBase.DeviceSupported(),
-		gtest || (unitTest != nil && *unitTest)))
-
-	// TODO (b/262914724): convert to tradefed_cc_test and tradefed_cc_test_host
-	ctx.CreateBazelTargetModule(
-		bazel.BazelTargetModuleProperties{
-			Rule_class:        "cc_test",
-			Bzl_load_location: "//build/bazel/rules/cc:cc_test.bzl",
-		},
-		android.CommonAttributes{
-			Name: m.Name(),
-			Data: data,
-			Tags: tags,
-		},
-		&testBinaryAttrs)
-}
-
-// cc_test that builds using gtest needs some additional deps
-// addImplicitGtestDeps makes these deps explicit in the generated BUILD files
-func addImplicitGtestDeps(ctx android.Bp2buildMutatorContext, attrs *testBinaryAttributes, gtest, gtestIsolated bool) {
-	addDepsAndDedupe := func(lla *bazel.LabelListAttribute, modules []string) {
-		moduleLabels := android.BazelLabelForModuleDeps(ctx, modules)
-		lla.Value.Append(moduleLabels)
-		// Dedupe
-		lla.Value = bazel.FirstUniqueBazelLabelList(lla.Value)
-	}
-	// this must be kept in sync with Soong's implementation in:
-	// https://cs.android.com/android/_/android/platform/build/soong/+/460fb2d6d546b5ab493a7e5479998c4933a80f73:cc/test.go;l=300-313;drc=ec7314336a2b35ea30ce5438b83949c28e3ac429;bpv=1;bpt=0
-	if gtest {
-		// TODO - b/244433197: Handle canUseSdk
-		if gtestIsolated {
-			addDepsAndDedupe(&attrs.Deps, []string{"libgtest_isolated_main"})
-			addDepsAndDedupe(&attrs.Dynamic_deps, []string{"liblog"})
-		} else {
-			addDepsAndDedupe(&attrs.Deps, []string{
-				"libgtest_main",
-				"libgtest",
-			})
-		}
-	}
-}
diff --git a/cc/tidy.go b/cc/tidy.go
index 7b123cb..76ac7d5 100644
--- a/cc/tidy.go
+++ b/cc/tidy.go
@@ -68,7 +68,6 @@
 // Then, that old style usage will be obsolete and an error.
 const NoWarningsAsErrorsInTidyFlags = true
 
-// keep this up to date with https://cs.android.com/android/platform/superproject/+/master:build/bazel/rules/cc/clang_tidy.bzl
 func (tidy *tidyFeature) flags(ctx ModuleContext, flags Flags) Flags {
 	CheckBadTidyFlags(ctx, "tidy_flags", tidy.Properties.Tidy_flags)
 	CheckBadTidyChecks(ctx, "tidy_checks", tidy.Properties.Tidy_checks)
diff --git a/etc/prebuilt_etc.go b/etc/prebuilt_etc.go
index b7d2971..66df101 100644
--- a/etc/prebuilt_etc.go
+++ b/etc/prebuilt_etc.go
@@ -31,16 +31,12 @@
 	"encoding/json"
 	"fmt"
 	"path/filepath"
-	"reflect"
 	"strings"
 
 	"github.com/google/blueprint/proptools"
 
 	"android/soong/android"
-	"android/soong/bazel"
-	"android/soong/bazel/cquery"
 	"android/soong/snapshot"
-	"android/soong/ui/metrics/bp2build_metrics_proto"
 )
 
 var pctx = android.NewPackageContext("android/soong/etc")
@@ -139,7 +135,6 @@
 type PrebuiltEtc struct {
 	android.ModuleBase
 	android.DefaultableModuleBase
-	android.BazelModuleBase
 
 	snapshot.VendorSnapshotModuleInterface
 	snapshot.RecoverySnapshotModuleInterface
@@ -462,7 +457,6 @@
 	// This module is device-only
 	android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibFirst)
 	android.InitDefaultableModule(module)
-	android.InitBazelModule(module)
 	return module
 }
 
@@ -492,7 +486,6 @@
 	// This module is host-only
 	android.InitAndroidArchModule(module, android.HostSupported, android.MultilibCommon)
 	android.InitDefaultableModule(module)
-	android.InitBazelModule(module)
 	return module
 }
 
@@ -503,7 +496,6 @@
 	InitPrebuiltEtcModule(module, "cacerts")
 	// This module is device-only
 	android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibFirst)
-	android.InitBazelModule(module)
 	return module
 }
 
@@ -526,7 +518,6 @@
 	// This module is host-only
 	android.InitAndroidArchModule(module, android.HostSupported, android.MultilibCommon)
 	android.InitDefaultableModule(module)
-	android.InitBazelModule(module)
 	return module
 }
 
@@ -538,7 +529,6 @@
 	// This module is device-only
 	android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibFirst)
 	android.InitDefaultableModule(module)
-	android.InitBazelModule(module)
 	return module
 }
 
@@ -730,154 +720,3 @@
 
 	return snapshot.SnapshotPaths{OutputFiles: snapshotOutputs, NoticeFiles: snapshotNotices}
 }
-
-// For Bazel / bp2build
-
-type bazelPrebuiltFileAttributes struct {
-	Src               bazel.LabelAttribute
-	Filename          bazel.LabelAttribute
-	Dir               string
-	Installable       bazel.BoolAttribute
-	Filename_from_src bazel.BoolAttribute
-}
-
-// Bp2buildHelper returns a bazelPrebuiltFileAttributes used for the conversion
-// of prebuilt_*  modules. bazelPrebuiltFileAttributes has the common attributes
-// used by both prebuilt_etc_xml and other prebuilt_* moodules
-func (module *PrebuiltEtc) Bp2buildHelper(ctx android.Bp2buildMutatorContext) (*bazelPrebuiltFileAttributes, bool) {
-	var src bazel.LabelAttribute
-	for axis, configToProps := range module.GetArchVariantProperties(ctx, &prebuiltEtcProperties{}) {
-		for config, p := range configToProps {
-			props, ok := p.(*prebuiltEtcProperties)
-			if !ok {
-				continue
-			}
-			if props.Src != nil {
-				srcStr := proptools.String(props.Src)
-				if srcStr == ctx.ModuleName() {
-					ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_PROPERTY_UNSUPPORTED, "src == name")
-					return &bazelPrebuiltFileAttributes{}, false
-				}
-				label := android.BazelLabelForModuleSrcSingle(ctx, srcStr)
-				src.SetSelectValue(axis, config, label)
-			}
-		}
-		productVarProperties, errs := android.ProductVariableProperties(ctx, ctx.Module())
-		for _, err := range errs {
-			ctx.ModuleErrorf("ProductVariableProperties error: %s", err)
-		}
-		for propName, productConfigProps := range productVarProperties {
-			for configProp, propVal := range productConfigProps {
-				if propName == "Src" {
-					props, ok := propVal.(*string)
-					if !ok {
-						ctx.PropertyErrorf(" Expected Property to have type string, but was %s\n", reflect.TypeOf(propVal).String())
-						continue
-					}
-					if props != nil {
-						label := android.BazelLabelForModuleSrcSingle(ctx, *props)
-						src.SetSelectValue(configProp.ConfigurationAxis(), configProp.SelectKey(), label)
-					}
-				}
-			}
-		}
-	}
-
-	var filename string
-	var filenameFromSrc bool
-	moduleProps := module.properties
-
-	if moduleProps.Filename != nil && *moduleProps.Filename != "" {
-		filename = *moduleProps.Filename
-	} else if moduleProps.Filename_from_src != nil && *moduleProps.Filename_from_src {
-		if moduleProps.Src != nil {
-			filename = android.BazelLabelForModuleSrcSingle(ctx, *moduleProps.Src).Label
-		}
-		filenameFromSrc = true
-	} else {
-		filename = ctx.ModuleName()
-	}
-
-	var dir = module.installDirBase
-	if module.SubDir() != "" {
-		dir = dir + "/" + module.SubDir()
-	}
-
-	var installable bazel.BoolAttribute
-	if install := module.properties.Installable; install != nil {
-		installable.Value = install
-	}
-
-	attrs := &bazelPrebuiltFileAttributes{
-		Src:         src,
-		Dir:         dir,
-		Installable: installable,
-	}
-
-	if filename != "" {
-		attrs.Filename = bazel.LabelAttribute{Value: &bazel.Label{Label: filename}}
-	} else if filenameFromSrc {
-		attrs.Filename_from_src = bazel.BoolAttribute{Value: moduleProps.Filename_from_src}
-	}
-
-	return attrs, true
-}
-
-// ConvertWithBp2build performs bp2build conversion of PrebuiltEtc
-// prebuilt_* modules (except prebuilt_etc_xml) are PrebuiltEtc,
-// which we treat as *PrebuiltFile*
-func (module *PrebuiltEtc) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	var dir = module.installDirBase
-	// prebuilt_file only supports "etc" or "usr/share" or "." as module installDirBase
-	if !(dir == "etc" || dir == "usr/share" || dir == ".") {
-		ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_TYPE_UNSUPPORTED, "dir")
-		return
-	}
-
-	attrs, convertible := module.Bp2buildHelper(ctx)
-	if !convertible {
-		return
-	}
-
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "prebuilt_file",
-		Bzl_load_location: "//build/bazel/rules:prebuilt_file.bzl",
-	}
-
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: module.Name()}, attrs)
-}
-
-var _ android.MixedBuildBuildable = (*PrebuiltEtc)(nil)
-
-func (pe *PrebuiltEtc) IsMixedBuildSupported(ctx android.BaseModuleContext) bool {
-	return true
-}
-
-func (pe *PrebuiltEtc) QueueBazelCall(ctx android.BaseModuleContext) {
-	ctx.Config().BazelContext.QueueBazelRequest(
-		pe.GetBazelLabel(ctx, pe),
-		cquery.GetPrebuiltFileInfo,
-		android.GetConfigKey(ctx),
-	)
-}
-
-func (pe *PrebuiltEtc) ProcessBazelQueryResponse(ctx android.ModuleContext) {
-	bazelCtx := ctx.Config().BazelContext
-	pfi, err := bazelCtx.GetPrebuiltFileInfo(pe.GetBazelLabel(ctx, pe), android.GetConfigKey(ctx))
-	if err != nil {
-		ctx.ModuleErrorf(err.Error())
-		return
-	}
-
-	// Set properties for androidmk
-	pe.installDirPath = android.PathForModuleInstall(ctx, pfi.Dir)
-
-	// Installation rules
-	ip := installProperties{
-		installable:    pfi.Installable,
-		filename:       pfi.Filename,
-		sourceFilePath: android.PathForSource(ctx, pfi.Src),
-		// symlinks: pe.properties.Symlinks, // TODO: b/207489266 - Fully support all properties in prebuilt_file
-	}
-	pe.addInstallRules(ctx, ip)
-}
diff --git a/etc/prebuilt_etc_test.go b/etc/prebuilt_etc_test.go
index 5c4e222..df11709 100644
--- a/etc/prebuilt_etc_test.go
+++ b/etc/prebuilt_etc_test.go
@@ -23,7 +23,6 @@
 	"github.com/google/blueprint/proptools"
 
 	"android/soong/android"
-	"android/soong/bazel/cquery"
 	"android/soong/snapshot"
 )
 
@@ -495,41 +494,3 @@
 		checkIfSnapshotNotTaken(t, result, "recovery", "prebuilt_recovery_indirect")
 	})
 }
-
-func TestPrebuiltEtcAndroidMkEntriesWithBazel(t *testing.T) {
-	t.Parallel()
-	bp := `
-prebuilt_etc {
-	name: "myetc",
-	src: "prebuilt_etc.rc", // filename in src tree
-	filename: "init.rc", // target filename on device
-	sub_dir: "subdir", // relative subdir for installation
-	bazel_module: { label: "//foo/bar:myetc" },
-}
-`
-	res := android.GroupFixturePreparers(
-		prepareForPrebuiltEtcTest,
-		android.FixtureModifyConfig(func(cfg android.Config) {
-			cfg.BazelContext = android.MockBazelContext{
-				LabelToPrebuiltFileInfo: map[string]cquery.PrebuiltFileInfo{
-					"//foo/bar:myetc": cquery.PrebuiltFileInfo{
-						Src:         "foo/bar/prebuilt_etc.rc",
-						Dir:         "etc/subdir",
-						Filename:    "init.rc",
-						Installable: true,
-					},
-				},
-			}
-		}),
-	).RunTestWithBp(t, bp)
-	ctx := res.ModuleForTests("myetc", "android_arm64_armv8-a")
-	mod := ctx.Module()
-	entries := android.AndroidMkEntriesForTest(t, res.TestContext, mod)[0]
-	// verify androidmk entries
-	android.AssertStringDoesContain(t, "LOCAL_MODULE_PATH should contain", entries.EntryMap["LOCAL_MODULE_PATH"][0], "etc/subdir")
-	android.AssertStringEquals(t, "LOCAL_INSTALLED_MODULE_STEM is incorrect", "init.rc", entries.EntryMap["LOCAL_INSTALLED_MODULE_STEM"][0])
-	// verify installation rules
-	install := ctx.Description("install")
-	android.AssertStringEquals(t, "Source location of prebuilt_etc installation", "out/soong/.intermediates/myetc/android_arm64_armv8-a/init.rc", install.Input.String())
-	android.AssertStringEquals(t, "Target location of prebuilt_etc installation", "out/soong/target/product/test_device/system/etc/subdir/init.rc", install.Output.String())
-}
diff --git a/genrule/Android.bp b/genrule/Android.bp
index b201cae..7331741 100644
--- a/genrule/Android.bp
+++ b/genrule/Android.bp
@@ -11,7 +11,6 @@
         "sbox_proto",
         "soong",
         "soong-android",
-        "soong-bazel",
         "soong-shared",
     ],
     srcs: [
diff --git a/genrule/genrule.go b/genrule/genrule.go
index 6b11019..97f14d7 100644
--- a/genrule/genrule.go
+++ b/genrule/genrule.go
@@ -21,18 +21,14 @@
 import (
 	"fmt"
 	"io"
-	"path/filepath"
 	"strconv"
 	"strings"
 
-	"android/soong/bazel/cquery"
-
 	"github.com/google/blueprint"
 	"github.com/google/blueprint/bootstrap"
 	"github.com/google/blueprint/proptools"
 
 	"android/soong/android"
-	"android/soong/bazel"
 )
 
 func init() {
@@ -159,7 +155,6 @@
 type Module struct {
 	android.ModuleBase
 	android.DefaultableModuleBase
-	android.BazelModuleBase
 	android.ApexModuleBase
 
 	// For other packages to make their own genrules with extra
@@ -191,8 +186,6 @@
 	subDir  string
 }
 
-var _ android.MixedBuildBuildable = (*Module)(nil)
-
 type taskFunc func(ctx android.ModuleContext, rawCommand string, srcFiles android.Paths) []generateTask
 
 type generateTask struct {
@@ -254,30 +247,6 @@
 	}
 }
 
-func (g *Module) ProcessBazelQueryResponse(ctx android.ModuleContext) {
-	g.generateCommonBuildActions(ctx)
-
-	label := g.GetBazelLabel(ctx, g)
-	bazelCtx := ctx.Config().BazelContext
-	filePaths, err := bazelCtx.GetOutputFiles(label, android.GetConfigKey(ctx))
-	if err != nil {
-		ctx.ModuleErrorf(err.Error())
-		return
-	}
-
-	var bazelOutputFiles android.Paths
-	exportIncludeDirs := map[string]bool{}
-	for _, bazelOutputFile := range filePaths {
-		bazelOutputFiles = append(bazelOutputFiles, android.PathForBazelOutRelative(ctx, ctx.ModuleDir(), bazelOutputFile))
-		exportIncludeDirs[filepath.Dir(bazelOutputFile)] = true
-	}
-	g.outputFiles = bazelOutputFiles
-	g.outputDeps = bazelOutputFiles
-	for includePath, _ := range exportIncludeDirs {
-		g.exportedIncludeDirs = append(g.exportedIncludeDirs, android.PathForBazelOut(ctx, includePath))
-	}
-}
-
 // generateCommonBuildActions contains build action generation logic
 // common to both the mixed build case and the legacy case of genrule processing.
 // To fully support genrule in mixed builds, the contents of this function should
@@ -645,15 +614,6 @@
 	}
 }
 
-func (g *Module) QueueBazelCall(ctx android.BaseModuleContext) {
-	bazelCtx := ctx.Config().BazelContext
-	bazelCtx.QueueBazelRequest(g.GetBazelLabel(ctx, g), cquery.GetOutputFiles, android.GetConfigKey(ctx))
-}
-
-func (g *Module) IsMixedBuildSupported(ctx android.BaseModuleContext) bool {
-	return true
-}
-
 // Collect information for opening IDE project files in java/jdeps.go.
 func (g *Module) IDEInfo(dpInfo *android.IdeInfo) {
 	dpInfo.Srcs = append(dpInfo.Srcs, g.Srcs().Strings()...)
@@ -843,7 +803,6 @@
 func GenSrcsFactory() android.Module {
 	m := NewGenSrcs()
 	android.InitAndroidModule(m)
-	android.InitBazelModule(m)
 	return m
 }
 
@@ -858,14 +817,6 @@
 	Data []string `android:"path"`
 }
 
-type bazelGensrcsAttributes struct {
-	Srcs             bazel.LabelListAttribute
-	Output_extension *string
-	Tools            bazel.LabelListAttribute
-	Cmd              bazel.StringAttribute
-	Data             bazel.LabelListAttribute
-}
-
 const defaultShardSize = 50
 
 func NewGenRule() *Module {
@@ -897,7 +848,6 @@
 	m := NewGenRule()
 	android.InitAndroidModule(m)
 	android.InitDefaultableModule(m)
-	android.InitBazelModule(m)
 	return m
 }
 
@@ -906,215 +856,6 @@
 	Out []string
 }
 
-type BazelGenruleAttributes struct {
-	Srcs  bazel.LabelListAttribute
-	Outs  []string
-	Tools bazel.LabelListAttribute
-	Cmd   bazel.StringAttribute
-}
-
-// ConvertWithBp2build converts a Soong module -> Bazel target.
-func (m *Module) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	// Bazel only has the "tools" attribute.
-	tools_prop := android.BazelLabelForModuleDeps(ctx, m.properties.Tools)
-	tool_files_prop := android.BazelLabelForModuleSrc(ctx, m.properties.Tool_files)
-	tools_prop.Append(tool_files_prop)
-
-	tools := bazel.MakeLabelListAttribute(tools_prop)
-	srcs := bazel.LabelListAttribute{}
-	srcs_labels := bazel.LabelList{}
-	// Only cc_genrule is arch specific
-	if ctx.ModuleType() == "cc_genrule" {
-		for axis, configToProps := range m.GetArchVariantProperties(ctx, &generatorProperties{}) {
-			for config, props := range configToProps {
-				if props, ok := props.(*generatorProperties); ok {
-					labels := android.BazelLabelForModuleSrcExcludes(ctx, props.Srcs, props.Exclude_srcs)
-					srcs_labels.Append(labels)
-					srcs.SetSelectValue(axis, config, labels)
-				}
-			}
-		}
-	} else {
-		srcs_labels = android.BazelLabelForModuleSrcExcludes(ctx, m.properties.Srcs, m.properties.Exclude_srcs)
-		srcs = bazel.MakeLabelListAttribute(srcs_labels)
-	}
-
-	var allReplacements bazel.LabelList
-	allReplacements.Append(tools.Value)
-	allReplacements.Append(bazel.FirstUniqueBazelLabelList(srcs_labels))
-
-	// The Output_extension prop is not in an immediately accessible field
-	// in the Module struct, so use GetProperties and cast it
-	// to the known struct prop.
-	var outputExtension *string
-	var data bazel.LabelListAttribute
-	if ctx.ModuleType() == "gensrcs" {
-		for _, propIntf := range m.GetProperties() {
-			if props, ok := propIntf.(*genSrcsProperties); ok {
-				outputExtension = props.Output_extension
-				dataFiles := android.BazelLabelForModuleSrc(ctx, props.Data)
-				allReplacements.Append(bazel.FirstUniqueBazelLabelList(dataFiles))
-				data = bazel.MakeLabelListAttribute(dataFiles)
-				break
-			}
-		}
-	}
-
-	replaceVariables := func(cmd string) string {
-		// Replace in and out variables with $< and $@
-		if ctx.ModuleType() == "gensrcs" {
-			cmd = strings.ReplaceAll(cmd, "$(in)", "$(SRC)")
-			cmd = strings.ReplaceAll(cmd, "$(out)", "$(OUT)")
-		} else {
-			cmd = strings.Replace(cmd, "$(in)", "$(SRCS)", -1)
-			cmd = strings.Replace(cmd, "$(out)", "$(OUTS)", -1)
-		}
-		cmd = strings.Replace(cmd, "$(genDir)", "$(RULEDIR)", -1)
-		if len(tools.Value.Includes) > 0 {
-			cmd = strings.Replace(cmd, "$(location)", fmt.Sprintf("$(location %s)", tools.Value.Includes[0].Label), -1)
-			cmd = strings.Replace(cmd, "$(locations)", fmt.Sprintf("$(locations %s)", tools.Value.Includes[0].Label), -1)
-		}
-		for _, l := range allReplacements.Includes {
-			bpLoc := fmt.Sprintf("$(location %s)", l.OriginalModuleName)
-			bpLocs := fmt.Sprintf("$(locations %s)", l.OriginalModuleName)
-			bazelLoc := fmt.Sprintf("$(location %s)", l.Label)
-			bazelLocs := fmt.Sprintf("$(locations %s)", l.Label)
-			cmd = strings.Replace(cmd, bpLoc, bazelLoc, -1)
-			cmd = strings.Replace(cmd, bpLocs, bazelLocs, -1)
-		}
-		return cmd
-	}
-
-	var cmdProp bazel.StringAttribute
-	cmdProp.SetValue(replaceVariables(proptools.String(m.properties.Cmd)))
-	allProductVariableProps, errs := android.ProductVariableProperties(ctx, m)
-	for _, err := range errs {
-		ctx.ModuleErrorf("ProductVariableProperties error: %s", err)
-	}
-	if productVariableProps, ok := allProductVariableProps["Cmd"]; ok {
-		for productVariable, value := range productVariableProps {
-			var cmd string
-			if strValue, ok := value.(*string); ok && strValue != nil {
-				cmd = *strValue
-			}
-			cmd = replaceVariables(cmd)
-			cmdProp.SetSelectValue(productVariable.ConfigurationAxis(), productVariable.SelectKey(), &cmd)
-		}
-	}
-
-	tags := android.ApexAvailableTagsWithoutTestApexes(ctx, m)
-
-	bazelName := m.Name()
-	if ctx.ModuleType() == "gensrcs" {
-		props := bazel.BazelTargetModuleProperties{
-			Rule_class:        "gensrcs",
-			Bzl_load_location: "//build/bazel/rules:gensrcs.bzl",
-		}
-		attrs := &bazelGensrcsAttributes{
-			Srcs:             srcs,
-			Output_extension: outputExtension,
-			Cmd:              cmdProp,
-			Tools:            tools,
-			Data:             data,
-		}
-		ctx.CreateBazelTargetModule(props, android.CommonAttributes{
-			Name: m.Name(),
-			Tags: tags,
-		}, attrs)
-	} else {
-		outs := m.RawOutputFiles(ctx)
-		for _, out := range outs {
-			if out == bazelName {
-				// This is a workaround to circumvent a Bazel warning where a genrule's
-				// out may not have the same name as the target itself. This makes no
-				// difference for reverse dependencies, because they may depend on the
-				// out file by name.
-				bazelName = bazelName + "-gen"
-				break
-			}
-		}
-		attrs := &BazelGenruleAttributes{
-			Srcs:  srcs,
-			Outs:  outs,
-			Cmd:   cmdProp,
-			Tools: tools,
-		}
-		props := bazel.BazelTargetModuleProperties{
-			Rule_class: "genrule",
-		}
-		ctx.CreateBazelTargetModule(props, android.CommonAttributes{
-			Name: bazelName,
-			Tags: tags,
-		}, attrs)
-	}
-
-	if m.needsCcLibraryHeadersBp2build() {
-		includeDirs := make([]string, len(m.properties.Export_include_dirs)*2)
-		for i, dir := range m.properties.Export_include_dirs {
-			includeDirs[i*2] = dir
-			includeDirs[i*2+1] = filepath.Clean(filepath.Join(ctx.ModuleDir(), dir))
-		}
-		attrs := &ccHeaderLibraryAttrs{
-			Hdrs:            []string{":" + bazelName},
-			Export_includes: includeDirs,
-		}
-		props := bazel.BazelTargetModuleProperties{
-			Rule_class:        "cc_library_headers",
-			Bzl_load_location: "//build/bazel/rules/cc:cc_library_headers.bzl",
-		}
-		ctx.CreateBazelTargetModule(props, android.CommonAttributes{
-			Name: m.Name() + genruleHeaderLibrarySuffix,
-			Tags: tags,
-		}, attrs)
-	}
-}
-
-const genruleHeaderLibrarySuffix = "__header_library"
-
-func (m *Module) needsCcLibraryHeadersBp2build() bool {
-	return len(m.properties.Export_include_dirs) > 0
-}
-
-// GenruleCcHeaderMapper is a bazel.LabelMapper function to map genrules to a cc_library_headers
-// target when they export multiple include directories.
-func GenruleCcHeaderLabelMapper(ctx bazel.OtherModuleContext, label bazel.Label) (string, bool) {
-	mod, exists := ctx.ModuleFromName(label.OriginalModuleName)
-	if !exists {
-		return label.Label, false
-	}
-	if m, ok := mod.(*Module); ok {
-		if m.needsCcLibraryHeadersBp2build() {
-			return label.Label + genruleHeaderLibrarySuffix, true
-		}
-	}
-	return label.Label, false
-}
-
-type ccHeaderLibraryAttrs struct {
-	Hdrs []string
-
-	Export_includes []string
-}
-
-// RawOutputFfiles returns the raw outputs specified in Android.bp
-// This does not contain the fully resolved path relative to the top of the tree
-func (g *Module) RawOutputFiles(ctx android.BazelConversionContext) []string {
-	if ctx.Config().BuildMode != android.Bp2build {
-		ctx.ModuleErrorf("RawOutputFiles is only supported in bp2build mode")
-	}
-	// The Out prop is not in an immediately accessible field
-	// in the Module struct, so use GetProperties and cast it
-	// to the known struct prop.
-	var outs []string
-	for _, propIntf := range g.GetProperties() {
-		if props, ok := propIntf.(*genRuleProperties); ok {
-			outs = props.Out
-			break
-		}
-	}
-	return outs
-}
-
 var Bool = proptools.Bool
 var String = proptools.String
 
diff --git a/genrule/genrule_test.go b/genrule/genrule_test.go
index 4cff4b8..d13e976 100644
--- a/genrule/genrule_test.go
+++ b/genrule/genrule_test.go
@@ -1039,31 +1039,6 @@
 	}
 }
 
-func TestGenruleWithBazel(t *testing.T) {
-	bp := `
-		genrule {
-				name: "foo",
-				out: ["one.txt", "two.txt"],
-				bazel_module: { label: "//foo/bar:bar" },
-		}
-	`
-
-	result := android.GroupFixturePreparers(
-		prepareForGenRuleTest, android.FixtureModifyConfig(func(config android.Config) {
-			config.BazelContext = android.MockBazelContext{
-				OutputBaseDir: "outputbase",
-				LabelToOutputFiles: map[string][]string{
-					"//foo/bar:bar": []string{"bazelone.txt", "bazeltwo.txt"}}}
-		})).RunTestWithBp(t, testGenruleBp()+bp)
-
-	gen := result.Module("foo", "").(*Module)
-
-	expectedOutputFiles := []string{"outputbase/execroot/__main__/bazelone.txt",
-		"outputbase/execroot/__main__/bazeltwo.txt"}
-	android.AssertDeepEquals(t, "output files", expectedOutputFiles, gen.outputFiles.Strings())
-	android.AssertDeepEquals(t, "output deps", expectedOutputFiles, gen.outputDeps.Strings())
-}
-
 func TestGenruleWithGlobPaths(t *testing.T) {
 	testcases := []struct {
 		name            string
diff --git a/java/Android.bp b/java/Android.bp
index d39a195..79cd3f9 100644
--- a/java/Android.bp
+++ b/java/Android.bp
@@ -11,7 +11,6 @@
         "soong",
         "soong-aconfig",
         "soong-android",
-        "soong-bazel",
         "soong-cc",
         "soong-dexpreopt",
         "soong-genrule",
diff --git a/java/aar.go b/java/aar.go
index 1ab4529..af99cd0 100644
--- a/java/aar.go
+++ b/java/aar.go
@@ -22,10 +22,7 @@
 	"strings"
 
 	"android/soong/android"
-	"android/soong/bazel"
 	"android/soong/dexpreopt"
-	"android/soong/ui/metrics/bp2build_metrics_proto"
-
 	"github.com/google/blueprint"
 	"github.com/google/blueprint/proptools"
 )
@@ -768,7 +765,6 @@
 type AndroidLibrary struct {
 	Library
 	aapt
-	android.BazelModuleBase
 
 	androidLibraryProperties androidLibraryProperties
 
@@ -905,7 +901,6 @@
 
 	android.InitApexModule(module)
 	InitJavaModule(module, android.DeviceSupported)
-	android.InitBazelModule(module)
 	return module
 }
 
@@ -944,7 +939,6 @@
 	android.ModuleBase
 	android.DefaultableModuleBase
 	android.ApexModuleBase
-	android.BazelModuleBase
 	prebuilt android.Prebuilt
 
 	// Functionality common to Module and Import.
@@ -1316,189 +1310,5 @@
 	android.InitPrebuiltModule(module, &module.properties.Aars)
 	android.InitApexModule(module)
 	InitJavaModuleMultiTargets(module, android.DeviceSupported)
-	android.InitBazelModule(module)
 	return module
 }
-
-type bazelAapt struct {
-	Manifest       bazel.Label
-	Resource_files bazel.LabelListAttribute
-	Resource_zips  bazel.LabelListAttribute
-	Assets_dir     bazel.StringAttribute
-	Assets         bazel.LabelListAttribute
-}
-
-type bazelAndroidLibrary struct {
-	*javaLibraryAttributes
-	*bazelAapt
-}
-
-type bazelAndroidLibraryImport struct {
-	Aar         bazel.Label
-	Deps        bazel.LabelListAttribute
-	Exports     bazel.LabelListAttribute
-	Sdk_version bazel.StringAttribute
-}
-
-func (a *aapt) convertAaptAttrsWithBp2Build(ctx android.Bp2buildMutatorContext) (*bazelAapt, bool) {
-	manifest := proptools.StringDefault(a.aaptProperties.Manifest, "AndroidManifest.xml")
-
-	resourceFiles := bazel.LabelList{
-		Includes: []bazel.Label{},
-	}
-	for _, dir := range android.PathsWithOptionalDefaultForModuleSrc(ctx, a.aaptProperties.Resource_dirs, "res") {
-		files := android.RootToModuleRelativePaths(ctx, androidResourceGlob(ctx, dir))
-		resourceFiles.Includes = append(resourceFiles.Includes, files...)
-	}
-
-	assetsDir := bazel.StringAttribute{}
-	var assets bazel.LabelList
-	for i, dir := range android.PathsWithOptionalDefaultForModuleSrc(ctx, a.aaptProperties.Asset_dirs, "assets") {
-		if i > 0 {
-			ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_PROPERTY_UNSUPPORTED, "multiple asset_dirs")
-			return &bazelAapt{}, false
-		}
-		// Assets_dirs are relative to the module dir when specified, but if the default in used in
-		// PathsWithOptionalDefaultForModuleSrc, then dir is relative to the top.
-		assetsRelDir, error := filepath.Rel(ctx.ModuleDir(), dir.Rel())
-		if error != nil {
-			assetsRelDir = dir.Rel()
-		}
-		assetsDir.Value = proptools.StringPtr(assetsRelDir)
-		assets = bazel.MakeLabelList(android.RootToModuleRelativePaths(ctx, androidResourceGlob(ctx, dir)))
-
-	}
-	var resourceZips bazel.LabelList
-	if len(a.aaptProperties.Resource_zips) > 0 {
-		if ctx.ModuleName() == "framework-res" {
-			resourceZips = android.BazelLabelForModuleSrc(ctx, a.aaptProperties.Resource_zips)
-		} else {
-			//TODO: b/301593550 - Implement support for this
-			ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_PROPERTY_UNSUPPORTED, "resource_zips")
-			return &bazelAapt{}, false
-		}
-	}
-	return &bazelAapt{
-		android.BazelLabelForModuleSrcSingle(ctx, manifest),
-		bazel.MakeLabelListAttribute(resourceFiles),
-		bazel.MakeLabelListAttribute(resourceZips),
-		assetsDir,
-		bazel.MakeLabelListAttribute(assets),
-	}, true
-}
-
-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.
-	for _, depName := range a.properties.Static_libs {
-		if dep, ok := ctx.ModuleFromName(depName); ok {
-			switch dep.(type) {
-			case *AARImport, *Import:
-				exportableStaticLibs = append(exportableStaticLibs, depName)
-			}
-		}
-	}
-	name := android.RemoveOptionalPrebuiltPrefix(a.Name())
-	deps := android.BazelLabelForModuleDeps(ctx, android.LastUniqueStrings(android.CopyOf(append(a.properties.Static_libs, a.properties.Libs...))))
-	exports := android.BazelLabelForModuleDeps(ctx, android.LastUniqueStrings(exportableStaticLibs))
-
-	ctx.CreateBazelTargetModule(
-		bazel.BazelTargetModuleProperties{
-			Rule_class:        "aar_import",
-			Bzl_load_location: "//build/bazel/rules/android:aar_import.bzl",
-		},
-		android.CommonAttributes{Name: name},
-		&bazelAndroidLibraryImport{
-			Aar:         aars.Includes[0],
-			Deps:        bazel.MakeLabelListAttribute(deps),
-			Exports:     bazel.MakeLabelListAttribute(exports),
-			Sdk_version: bazel.StringAttribute{Value: a.properties.Sdk_version},
-		},
-	)
-
-	neverlink := true
-	ctx.CreateBazelTargetModule(
-		AndroidLibraryBazelTargetModuleProperties(),
-		android.CommonAttributes{Name: name + "-neverlink"},
-		&bazelAndroidLibrary{
-			javaLibraryAttributes: &javaLibraryAttributes{
-				Neverlink: bazel.BoolAttribute{Value: &neverlink},
-				Exports:   bazel.MakeSingleLabelListAttribute(bazel.Label{Label: ":" + name}),
-				javaCommonAttributes: &javaCommonAttributes{
-					Sdk_version: bazel.StringAttribute{Value: a.properties.Sdk_version},
-				},
-			},
-		},
-	)
-
-}
-func AndroidLibraryBazelTargetModuleProperties() bazel.BazelTargetModuleProperties {
-	return bazel.BazelTargetModuleProperties{
-		Rule_class:        "android_library",
-		Bzl_load_location: "//build/bazel/rules/android:android_library.bzl",
-	}
-}
-
-func (a *AndroidLibrary) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	commonAttrs, bp2buildInfo, supported := a.convertLibraryAttrsBp2Build(ctx)
-	if !supported {
-		return
-	}
-
-	depLabels := bp2buildInfo.DepLabels
-
-	deps := depLabels.Deps
-	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() {
-		// android_library does not accept deps when there are no srcs because
-		// there is no compilation happening, but it accepts exports.
-		// The non-empty deps here are unnecessary as deps on the android_library
-		// since they aren't being propagated to any dependencies.
-		// So we can drop deps here.
-		deps = bazel.LabelListAttribute{}
-	}
-	name := a.Name()
-	props := AndroidLibraryBazelTargetModuleProperties()
-
-	aaptAttrs, supported := a.convertAaptAttrsWithBp2Build(ctx)
-	if !supported {
-		return
-	}
-	if hasJavaResources := aaptAttrs.ConvertJavaResources(ctx, commonAttrs); hasJavaResources {
-		return
-	}
-	ctx.CreateBazelTargetModule(
-		props,
-		android.CommonAttributes{Name: name},
-		&bazelAndroidLibrary{
-			&javaLibraryAttributes{
-				javaCommonAttributes: commonAttrs,
-				Deps:                 deps,
-				Exports:              depLabels.StaticDeps,
-			},
-			aaptAttrs,
-		},
-	)
-
-	neverlink := true
-	ctx.CreateBazelTargetModule(
-		props,
-		android.CommonAttributes{Name: name + "-neverlink"},
-		&bazelAndroidLibrary{
-			javaLibraryAttributes: &javaLibraryAttributes{
-				Neverlink: bazel.BoolAttribute{Value: &neverlink},
-				Exports:   bazel.MakeSingleLabelListAttribute(bazel.Label{Label: ":" + name}),
-				javaCommonAttributes: &javaCommonAttributes{
-					Sdk_version:  bazel.StringAttribute{Value: a.deviceProperties.Sdk_version},
-					Java_version: bazel.StringAttribute{Value: a.properties.Java_version},
-				},
-			},
-		},
-	)
-}
diff --git a/java/app.go b/java/app.go
index d8822af..ee82a32 100755
--- a/java/app.go
+++ b/java/app.go
@@ -29,12 +29,10 @@
 	"github.com/google/blueprint/proptools"
 
 	"android/soong/android"
-	"android/soong/bazel"
 	"android/soong/cc"
 	"android/soong/dexpreopt"
 	"android/soong/genrule"
 	"android/soong/tradefed"
-	"android/soong/ui/metrics/bp2build_metrics_proto"
 )
 
 func init() {
@@ -178,7 +176,6 @@
 }
 
 type AndroidApp struct {
-	android.BazelModuleBase
 	Library
 	aapt
 	android.OverridableModuleBase
@@ -1166,7 +1163,6 @@
 	android.InitDefaultableModule(module)
 	android.InitOverridableModule(module, &module.overridableAppProperties.Overrides)
 	android.InitApexModule(module)
-	android.InitBazelModule(module)
 
 	android.AddLoadHook(module, func(ctx android.LoadHookContext) {
 		a := ctx.Module().(*AndroidApp)
@@ -1251,8 +1247,6 @@
 	testConfig       android.Path
 	extraTestConfigs android.Paths
 	data             android.Paths
-
-	android.BazelModuleBase
 }
 
 func (a *AndroidTest) InstallInTestcases() bool {
@@ -1379,7 +1373,6 @@
 	android.InitDefaultableModule(module)
 	android.InitOverridableModule(module, &module.overridableAppProperties.Overrides)
 
-	android.InitBazelModule(module)
 	return module
 }
 
@@ -1403,8 +1396,6 @@
 	AndroidApp
 
 	appTestHelperAppProperties appTestHelperAppProperties
-
-	android.BazelModuleBase
 }
 
 func (a *AndroidTestHelperApp) InstallInTestcases() bool {
@@ -1436,13 +1427,11 @@
 	android.InitAndroidMultiTargetsArchModule(module, android.DeviceSupported, android.MultilibCommon)
 	android.InitDefaultableModule(module)
 	android.InitApexModule(module)
-	android.InitBazelModule(module)
 	return module
 }
 
 type AndroidAppCertificate struct {
 	android.ModuleBase
-	android.BazelModuleBase
 
 	properties  AndroidAppCertificateProperties
 	Certificate Certificate
@@ -1459,7 +1448,6 @@
 	module := &AndroidAppCertificate{}
 	module.AddProperties(&module.properties)
 	android.InitAndroidModule(module)
-	android.InitBazelModule(module)
 	return module
 }
 
@@ -1736,255 +1724,3 @@
 func (u *usesLibrary) verifyUsesLibrariesAPK(ctx android.ModuleContext, apk android.Path) {
 	u.verifyUsesLibraries(ctx, apk, nil) // for APKs manifest_check does not write output file
 }
-
-// For Bazel / bp2build
-
-type bazelAndroidAppCertificateAttributes struct {
-	Certificate string
-}
-
-func (m *AndroidAppCertificate) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	androidAppCertificateBp2Build(ctx, m)
-}
-
-func androidAppCertificateBp2Build(ctx android.Bp2buildMutatorContext, module *AndroidAppCertificate) {
-	var certificate string
-	if module.properties.Certificate != nil {
-		certificate = *module.properties.Certificate
-	}
-
-	attrs := &bazelAndroidAppCertificateAttributes{
-		Certificate: certificate,
-	}
-
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "android_app_certificate",
-		Bzl_load_location: "//build/bazel/rules/android:android_app_certificate.bzl",
-	}
-
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: module.Name()}, attrs)
-}
-
-type manifestValueAttribute struct {
-	MinSdkVersion    *string
-	TargetSdkVersion *string
-}
-
-type bazelAndroidAppAttributes struct {
-	*javaCommonAttributes
-	*bazelAapt
-	Deps             bazel.LabelListAttribute
-	Custom_package   *string
-	Certificate      bazel.LabelAttribute
-	Certificate_name bazel.StringAttribute
-	Manifest_values  *manifestValueAttribute
-	Optimize         *bool
-	Proguard_specs   bazel.LabelListAttribute
-	Updatable        *bool
-}
-
-func (b bazelAapt) ConvertJavaResources(ctx android.Bp2buildMutatorContext, javaAttrs *javaCommonAttributes) bool {
-	// TODO (b/300470246) bp2build support for java_resources & java_resource_dirs in android rules
-	hasJavaResources := !javaAttrs.javaResourcesAttributes.Resources.IsEmpty()
-	if hasJavaResources {
-		ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_UNSUPPORTED, "(b/300470246) java resources in android_* module")
-	}
-	return hasJavaResources
-}
-
-func convertWithBp2build(ctx android.Bp2buildMutatorContext, a *AndroidApp) (bool, android.CommonAttributes, *bazelAndroidAppAttributes) {
-	aapt, supported := a.convertAaptAttrsWithBp2Build(ctx)
-	if !supported {
-		return false, android.CommonAttributes{}, &bazelAndroidAppAttributes{}
-	}
-	if a.appProperties.Jni_uses_platform_apis != nil {
-		ctx.MarkBp2buildUnconvertible(
-			bp2build_metrics_proto.UnconvertedReasonType_UNSUPPORTED,
-			"TODO - b/299360988: Add bp2build support for jni_uses_platform_apis",
-		)
-		return false, android.CommonAttributes{}, &bazelAndroidAppAttributes{}
-	}
-	if a.appProperties.Jni_uses_sdk_apis != nil {
-		ctx.MarkBp2buildUnconvertible(
-			bp2build_metrics_proto.UnconvertedReasonType_UNSUPPORTED,
-			"TODO - b/299360988: Add bp2build support for jni_uses_sdk_apis",
-		)
-		return false, android.CommonAttributes{}, &bazelAndroidAppAttributes{}
-	}
-
-	certificate, certificateName := android.BazelStringOrLabelFromProp(ctx, a.overridableAppProperties.Certificate)
-
-	manifestValues := &manifestValueAttribute{
-		MinSdkVersion:    a.deviceProperties.Min_sdk_version,
-		TargetSdkVersion: a.deviceProperties.Target_sdk_version,
-	}
-
-	appAttrs := &bazelAndroidAppAttributes{
-		// TODO(b/209576404): handle package name override by product variable PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES
-		Custom_package:   a.overridableAppProperties.Package_name,
-		Certificate:      certificate,
-		Certificate_name: certificateName,
-		Manifest_values:  manifestValues,
-		Updatable:        a.appProperties.Updatable,
-	}
-
-	// As framework-res has no sources, no deps in the Bazel sense, and java compilation, dexing and optimization is skipped by
-	// Soong specifically for it, return early here before any of the conversion work for the above is attempted.
-	if ctx.ModuleName() == "framework-res" {
-		appAttrs.bazelAapt = aapt
-		return true, android.CommonAttributes{Name: a.Name(), SkipData: proptools.BoolPtr(true)}, appAttrs
-	}
-
-	// Optimization is..
-	// - enabled by default for android_app, android_test_helper_app
-	// - disabled by default for android_test
-	//
-	// TODO(b/192032291): Disable android_test_helper_app optimization by
-	// default after auditing downstream usage.
-	if a.dexProperties.Optimize.EnabledByDefault != a.dexer.effectiveOptimizeEnabled() {
-		// Property is explicitly defined by default from default, so emit the Bazel attribute.
-		appAttrs.Optimize = proptools.BoolPtr(a.dexer.effectiveOptimizeEnabled())
-	}
-
-	if a.dexer.effectiveOptimizeEnabled() {
-		handCraftedFlags := ""
-		if Bool(a.dexProperties.Optimize.Ignore_warnings) {
-			handCraftedFlags += "-ignorewarning "
-		}
-		if !Bool(a.dexProperties.Optimize.Shrink) {
-			handCraftedFlags += "-dontshrink "
-		}
-		if !Bool(a.dexProperties.Optimize.Optimize) {
-			handCraftedFlags += "-dontoptimize "
-		}
-		if !Bool(a.dexProperties.Optimize.Obfuscate) {
-			handCraftedFlags += "-dontobfuscate "
-		}
-		appAttrs.Proguard_specs = bazel.MakeLabelListAttribute(android.BazelLabelForModuleSrc(ctx, a.dexProperties.Optimize.Proguard_flags_files))
-		if handCraftedFlags != "" {
-			generatedFlagFileRuleName := a.Name() + "_proguard_flags"
-			ctx.CreateBazelTargetModule(bazel.BazelTargetModuleProperties{
-				Rule_class: "genrule",
-			}, android.CommonAttributes{
-				Name:     generatedFlagFileRuleName,
-				SkipData: proptools.BoolPtr(true),
-			}, &genrule.BazelGenruleAttributes{
-				Outs: []string{a.Name() + "_proguard.flags"},
-				Cmd: bazel.StringAttribute{
-					Value: proptools.StringPtr("echo " + handCraftedFlags + "> $(OUTS)"),
-				},
-			})
-			appAttrs.Proguard_specs.Add(bazel.MakeLabelAttribute(":" + generatedFlagFileRuleName))
-		}
-	}
-
-	commonAttrs, bp2BuildInfo, supported := a.convertLibraryAttrsBp2Build(ctx)
-	if !supported {
-		return false, android.CommonAttributes{}, &bazelAndroidAppAttributes{}
-	}
-	if hasJavaResources := aapt.ConvertJavaResources(ctx, commonAttrs); hasJavaResources {
-		return false, android.CommonAttributes{}, &bazelAndroidAppAttributes{}
-	}
-
-	depLabels := bp2BuildInfo.DepLabels
-
-	deps := depLabels.Deps
-	deps.Append(depLabels.StaticDeps)
-
-	var jniDeps bazel.LabelListAttribute
-	archVariantProps := a.GetArchVariantProperties(ctx, &appProperties{})
-	for axis, configToProps := range archVariantProps {
-		for config, _props := range configToProps {
-			if archProps, ok := _props.(*appProperties); ok {
-				archJniLibs := android.BazelLabelForModuleDeps(
-					ctx,
-					android.LastUniqueStrings(android.CopyOf(archProps.Jni_libs)))
-				jniDeps.SetSelectValue(axis, config, archJniLibs)
-			}
-		}
-	}
-	deps.Append(jniDeps)
-
-	if !bp2BuildInfo.hasKotlin {
-		appAttrs.javaCommonAttributes = commonAttrs
-		appAttrs.bazelAapt = aapt
-		appAttrs.Deps = deps
-	} else {
-		ktName := a.Name() + "_kt"
-		ctx.CreateBazelTargetModule(
-			AndroidLibraryBazelTargetModuleProperties(),
-			android.CommonAttributes{Name: ktName},
-			&bazelAndroidLibrary{
-				javaLibraryAttributes: &javaLibraryAttributes{
-					javaCommonAttributes: commonAttrs,
-					Deps:                 deps,
-				},
-				bazelAapt: aapt,
-			},
-		)
-
-		appAttrs.bazelAapt = &bazelAapt{Manifest: aapt.Manifest}
-		appAttrs.Deps = bazel.MakeSingleLabelListAttribute(bazel.Label{Label: ":" + ktName})
-		appAttrs.javaCommonAttributes = &javaCommonAttributes{
-			Sdk_version: commonAttrs.Sdk_version,
-		}
-	}
-
-	return true, android.CommonAttributes{Name: a.Name(), SkipData: proptools.BoolPtr(true)}, appAttrs
-}
-
-// ConvertWithBp2build is used to convert android_app to Bazel.
-func (a *AndroidApp) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	if ok, commonAttrs, appAttrs := convertWithBp2build(ctx, a); ok {
-		var props bazel.BazelTargetModuleProperties
-		if ctx.ModuleName() == "framework-res" {
-			props = bazel.BazelTargetModuleProperties{
-				Rule_class:        "framework_resources",
-				Bzl_load_location: "//build/bazel/rules/android:framework_resources.bzl",
-			}
-		} else {
-			props = bazel.BazelTargetModuleProperties{
-				Rule_class:        "android_binary",
-				Bzl_load_location: "//build/bazel/rules/android:android_binary.bzl",
-			}
-		}
-		ctx.CreateBazelTargetModule(props, commonAttrs, appAttrs)
-	}
-
-}
-
-// ConvertWithBp2build is used to convert android_test to Bazel.
-func (at *AndroidTest) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	if ok, commonAttrs, appAttrs := convertWithBp2build(ctx, &at.AndroidApp); ok {
-		props := bazel.BazelTargetModuleProperties{
-			Rule_class:        "android_test",
-			Bzl_load_location: "//build/bazel/rules/android:android_test.bzl",
-		}
-
-		ctx.CreateBazelTargetModule(props, commonAttrs, appAttrs)
-	}
-
-}
-
-func (atha *AndroidTestHelperApp) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	if ok, commonAttrs, appAttrs := convertWithBp2build(ctx, &atha.AndroidApp); ok {
-		// an android_test_helper_app is an android_binary with testonly = True
-		commonAttrs.Testonly = proptools.BoolPtr(true)
-
-		// android_test_helper_app sets default values differently to android_app,
-		// https://cs.android.com/android/platform/superproject/main/+/main:build/soong/java/app.go;l=1273-1279;drc=e12c083198403ec694af6c625aed11327eb2bf7f
-		//
-		// installable: true (settable prop)
-		// use_embedded_native_libs: true (settable prop)
-		// lint.test: true (settable prop)
-		// AlwaysPackageNativeLibs: true (blueprint mutated prop)
-		// dexpreopt isTest: true (not prop)
-
-		props := bazel.BazelTargetModuleProperties{
-			Rule_class:        "android_binary",
-			Bzl_load_location: "//build/bazel/rules/android:android_binary.bzl",
-		}
-
-		ctx.CreateBazelTargetModule(props, commonAttrs, appAttrs)
-	}
-}
diff --git a/java/base.go b/java/base.go
index c4b4026..cdb58a2 100644
--- a/java/base.go
+++ b/java/base.go
@@ -20,8 +20,6 @@
 	"strconv"
 	"strings"
 
-	"android/soong/ui/metrics/bp2build_metrics_proto"
-
 	"github.com/google/blueprint"
 	"github.com/google/blueprint/pathtools"
 	"github.com/google/blueprint/proptools"
@@ -408,7 +406,6 @@
 	android.ModuleBase
 	android.DefaultableModuleBase
 	android.ApexModuleBase
-	android.BazelModuleBase
 
 	// Functionality common to Module and Import.
 	embeddableInModuleAndImport
@@ -1038,37 +1035,6 @@
 			// just adding a symlink under the root doesn't help.)
 			patchPaths := []string{".", ctx.Config().SoongOutDir()}
 
-			// b/150878007
-			//
-			// Workaround to support *Bazel-executed* JDK9 javac in Bazel's
-			// execution root for --patch-module. If this javac command line is
-			// invoked within Bazel's execution root working directory, the top
-			// level directories (e.g. libcore/, tools/, frameworks/) are all
-			// symlinks. JDK9 javac does not traverse into symlinks, which causes
-			// --patch-module to fail source file lookups when invoked in the
-			// execution root.
-			//
-			// Short of patching javac or enumerating *all* directories as possible
-			// input dirs, manually add the top level dir of the source files to be
-			// compiled.
-			topLevelDirs := map[string]bool{}
-			for _, srcFilePath := range srcFiles {
-				srcFileParts := strings.Split(srcFilePath.String(), "/")
-				// Ignore source files that are already in the top level directory
-				// as well as generated files in the out directory. The out
-				// directory may be an absolute path, which means srcFileParts[0] is the
-				// empty string, so check that as well. Note that "out" in Bazel's execution
-				// root is *not* a symlink, which doesn't cause problems for --patch-modules
-				// anyway, so it's fine to not apply this workaround for generated
-				// source files.
-				if len(srcFileParts) > 1 &&
-					srcFileParts[0] != "" &&
-					srcFileParts[0] != "out" {
-					topLevelDirs[srcFileParts[0]] = true
-				}
-			}
-			patchPaths = append(patchPaths, android.SortedKeys(topLevelDirs)...)
-
 			classPath := flags.classpath.FormJavaClassPath("")
 			if classPath != "" {
 				patchPaths = append(patchPaths, classPath)
@@ -2379,22 +2345,3 @@
 }
 
 var _ ModuleWithStem = (*Module)(nil)
-
-func (j *Module) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	switch ctx.ModuleType() {
-	case "java_library", "java_library_host", "java_library_static", "tradefed_java_library_host":
-		if lib, ok := ctx.Module().(*Library); ok {
-			javaLibraryBp2Build(ctx, lib)
-		}
-	case "java_binary_host":
-		if binary, ok := ctx.Module().(*Binary); ok {
-			javaBinaryHostBp2Build(ctx, binary)
-		}
-	case "java_test_host":
-		if testHost, ok := ctx.Module().(*TestHost); ok {
-			javaTestHostBp2Build(ctx, testHost)
-		}
-	default:
-		ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_TYPE_UNSUPPORTED, "")
-	}
-}
diff --git a/java/config/config.go b/java/config/config.go
index 0098130..d80ed41 100644
--- a/java/config/config.go
+++ b/java/config/config.go
@@ -221,10 +221,6 @@
 	hostJNIToolVariableWithSdkToolsPrebuilt("SignapkJniLibrary", "libconscrypt_openjdk_jni")
 }
 
-func BazelJavaToolchainVars(config android.Config) string {
-	return android.BazelToolchainVars(config, exportedVars)
-}
-
 func hostBinToolVariableWithSdkToolsPrebuilt(name, tool string) {
 	pctx.VariableFunc(name, func(ctx android.PackageVarContext) string {
 		if ctx.Config().AlwaysUsePrebuiltSdks() {
diff --git a/java/device_host_converter.go b/java/device_host_converter.go
index c5ba245..ee8a15a 100644
--- a/java/device_host_converter.go
+++ b/java/device_host_converter.go
@@ -19,16 +19,12 @@
 	"io"
 
 	"android/soong/android"
-	"android/soong/bazel"
 	"android/soong/dexpreopt"
-
-	"github.com/google/blueprint/proptools"
 )
 
 type DeviceHostConverter struct {
 	android.ModuleBase
 	android.DefaultableModuleBase
-	android.BazelModuleBase
 
 	properties DeviceHostConverterProperties
 
@@ -80,7 +76,6 @@
 	module.AddProperties(&module.properties)
 
 	InitJavaModule(module, android.DeviceSupported)
-	android.InitBazelModule(module)
 	return module
 }
 
@@ -193,32 +188,3 @@
 		},
 	}
 }
-
-type bazelDeviceHostConverterAttributes struct {
-	Exports bazel.LabelListAttribute
-}
-
-func (d *DeviceHostConverter) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	ctx.CreateBazelTargetModule(
-		bazel.BazelTargetModuleProperties{
-			Rule_class:        "java_host_for_device",
-			Bzl_load_location: "//build/bazel/rules/java:host_for_device.bzl",
-		},
-		android.CommonAttributes{Name: d.Name()},
-		&bazelDeviceHostConverterAttributes{
-			Exports: bazel.MakeLabelListAttribute(android.BazelLabelForModuleDeps(ctx, d.properties.Libs)),
-		},
-	)
-	neverLinkAttrs := &javaLibraryAttributes{
-		Exports:   bazel.MakeSingleLabelListAttribute(bazel.Label{Label: ":" + d.Name()}),
-		Neverlink: bazel.BoolAttribute{Value: proptools.BoolPtr(true)},
-		javaCommonAttributes: &javaCommonAttributes{
-			Sdk_version: bazel.StringAttribute{Value: proptools.StringPtr("none")},
-		},
-	}
-	ctx.CreateBazelTargetModule(
-		javaLibraryBazelTargetModuleProperties(),
-		android.CommonAttributes{Name: d.Name() + "-neverlink"},
-		neverLinkAttrs)
-
-}
diff --git a/java/droiddoc.go b/java/droiddoc.go
index f7d7de6..b0d5376 100644
--- a/java/droiddoc.go
+++ b/java/droiddoc.go
@@ -22,7 +22,6 @@
 	"github.com/google/blueprint/proptools"
 
 	"android/soong/android"
-	"android/soong/bazel"
 	"android/soong/java/config"
 )
 
@@ -852,7 +851,6 @@
 
 type ExportedDroiddocDir struct {
 	android.ModuleBase
-	android.BazelModuleBase
 
 	properties ExportedDroiddocDirProperties
 
@@ -865,7 +863,6 @@
 	module := &ExportedDroiddocDir{}
 	module.AddProperties(&module.properties)
 	android.InitAndroidModule(module)
-	android.InitBazelModule(module)
 	return module
 }
 
@@ -877,28 +874,6 @@
 	d.deps = android.PathsForModuleSrc(ctx, []string{filepath.Join(path, "**/*")})
 }
 
-// ConvertWithBp2build implements android.BazelModule.
-func (d *ExportedDroiddocDir) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	props := bazel.BazelTargetModuleProperties{
-		// Use the native py_library rule.
-		Rule_class:        "droiddoc_exported_dir",
-		Bzl_load_location: "//build/bazel/rules/droiddoc:droiddoc_exported_dir.bzl",
-	}
-
-	type BazelAttrs struct {
-		Dir  *string
-		Srcs bazel.LabelListAttribute
-	}
-
-	attrs := &BazelAttrs{
-		Dir:  proptools.StringPtr(*d.properties.Path),
-		Srcs: bazel.MakeLabelListAttribute(android.BazelLabelForModuleSrc(ctx, []string{filepath.Join(*d.properties.Path, "**/*")})),
-	}
-
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: d.Name()}, attrs)
-
-}
-
 // Defaults
 type DocDefaults struct {
 	android.ModuleBase
diff --git a/java/droidstubs.go b/java/droidstubs.go
index 6b8d21f..e7ccc1b 100644
--- a/java/droidstubs.go
+++ b/java/droidstubs.go
@@ -18,7 +18,6 @@
 	"fmt"
 	"path/filepath"
 	"regexp"
-	"sort"
 	"strings"
 
 	"github.com/google/blueprint/proptools"
@@ -894,28 +893,6 @@
 	}
 )
 
-// A helper function that returns the api surface of the corresponding java_api_contribution Bazel target
-// The api_surface is populated using the naming convention of the droidstubs module.
-func bazelApiSurfaceName(name string) string {
-	// Sort the keys so that longer strings appear first
-	// Otherwise substrings like system will match both system and system_server
-	sortedKeys := make([]string, 0)
-	for key := range droidstubsModuleNamingToSdkKind {
-		sortedKeys = append(sortedKeys, key)
-	}
-	sort.Slice(sortedKeys, func(i, j int) bool {
-		return len(sortedKeys[i]) > len(sortedKeys[j])
-	})
-	for _, sortedKey := range sortedKeys {
-		if strings.Contains(name, sortedKey) {
-			sdkKind := droidstubsModuleNamingToSdkKind[sortedKey]
-			return sdkKind.String() + "api"
-		}
-	}
-	// Default is publicapi
-	return android.SdkPublic.String() + "api"
-}
-
 func StubsDefaultsFactory() android.Module {
 	module := &DocDefaults{}
 
diff --git a/java/droidstubs_test.go b/java/droidstubs_test.go
index 7b89dde..b97ae29 100644
--- a/java/droidstubs_test.go
+++ b/java/droidstubs_test.go
@@ -307,48 +307,6 @@
 	android.AssertStringDoesContain(t, "sdk-extensions-info present", cmdline, "--sdk-extensions-info sdk/extensions/info.txt")
 }
 
-func TestApiSurfaceFromDroidStubsName(t *testing.T) {
-	testCases := []struct {
-		desc               string
-		name               string
-		expectedApiSurface string
-	}{
-		{
-			desc:               "Default is publicapi",
-			name:               "mydroidstubs",
-			expectedApiSurface: "publicapi",
-		},
-		{
-			desc:               "name contains system substring",
-			name:               "mydroidstubs.system.suffix",
-			expectedApiSurface: "systemapi",
-		},
-		{
-			desc:               "name contains system_server substring",
-			name:               "mydroidstubs.system_server.suffix",
-			expectedApiSurface: "system-serverapi",
-		},
-		{
-			desc:               "name contains module_lib substring",
-			name:               "mydroidstubs.module_lib.suffix",
-			expectedApiSurface: "module-libapi",
-		},
-		{
-			desc:               "name contains test substring",
-			name:               "mydroidstubs.test.suffix",
-			expectedApiSurface: "testapi",
-		},
-		{
-			desc:               "name contains intra.core substring",
-			name:               "mydroidstubs.intra.core.suffix",
-			expectedApiSurface: "intracoreapi",
-		},
-	}
-	for _, tc := range testCases {
-		android.AssertStringEquals(t, tc.desc, tc.expectedApiSurface, bazelApiSurfaceName(tc.name))
-	}
-}
-
 func TestDroidStubsApiContributionGeneration(t *testing.T) {
 	ctx, _ := testJavaWithFS(t, `
 		droidstubs {
diff --git a/java/gen.go b/java/gen.go
index 638da25..68a9b53 100644
--- a/java/gen.go
+++ b/java/gen.go
@@ -129,19 +129,7 @@
 			baseDir = filepath.Clean(baseDir)
 			baseDirSeen := android.InList(baseDir, baseDirs) || android.InList(baseDir, excludeDirsStrings)
 
-			// For go/bp2build mixed builds, a file may be listed under a
-			// directory in the Bazel output tree that is symlinked to a
-			// directory under the android source tree. We should only
-			// include one copy of this directory so that the AIDL tool
-			// doesn't find multiple definitions of the same AIDL class.
-			// This code comes into effect when filegroups are used in mixed builds.
-			bazelPathPrefix := android.PathForBazelOut(ctx, "").String()
-			bazelBaseDir, err := filepath.Rel(bazelPathPrefix, baseDir)
-			bazelBaseDirSeen := err == nil &&
-				android.InList(bazelBaseDir, baseDirs) ||
-				android.InList(bazelBaseDir, excludeDirsStrings)
-
-			if baseDir != "" && !baseDirSeen && !bazelBaseDirSeen {
+			if baseDir != "" && !baseDirSeen {
 				baseDirs = append(baseDirs, baseDir)
 			}
 		}
diff --git a/java/generated_java_library.go b/java/generated_java_library.go
index 930bfd2..40f780c 100644
--- a/java/generated_java_library.go
+++ b/java/generated_java_library.go
@@ -35,8 +35,6 @@
 	// Called from inside GenerateAndroidBuildActions. Add the build rules to
 	// make the srcjar, and return the path to it.
 	GenerateSourceJarBuildActions(module *GeneratedJavaLibraryModule, ctx android.ModuleContext) android.Path
-
-	Bp2build(ctx android.Bp2buildMutatorContext, module *GeneratedJavaLibraryModule)
 }
 
 // GeneratedJavaLibraryModuleFactory provides a utility for modules that are generated
@@ -57,7 +55,6 @@
 	module.addHostAndDeviceProperties()
 	module.initModuleAndImport(module)
 	android.InitApexModule(module)
-	android.InitBazelModule(module)
 	InitJavaModule(module, android.HostAndDeviceSupported)
 	if properties != nil {
 		module.AddProperties(properties)
@@ -110,7 +107,3 @@
 	module.Library.properties.Generated_srcjars = append(module.Library.properties.Generated_srcjars, srcJarPath)
 	module.Library.GenerateAndroidBuildActions(ctx)
 }
-
-func (module *GeneratedJavaLibraryModule) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	module.callbacks.Bp2build(ctx, module)
-}
diff --git a/java/generated_java_library_test.go b/java/generated_java_library_test.go
index ac9524e..be816cd 100644
--- a/java/generated_java_library_test.go
+++ b/java/generated_java_library_test.go
@@ -40,9 +40,6 @@
 	return android.PathForOutput(ctx, "blah.srcjar")
 }
 
-func (callbacks *JavaGenLibTestCallbacks) Bp2build(ctx android.Bp2buildMutatorContext, module *GeneratedJavaLibraryModule) {
-}
-
 func testGenLib(t *testing.T, errorHandler android.FixtureErrorHandler, bp string) *android.TestResult {
 	return android.GroupFixturePreparers(
 		PrepareForIntegrationTestWithJava,
diff --git a/java/genrule.go b/java/genrule.go
index 208e1f4..b84225f 100644
--- a/java/genrule.go
+++ b/java/genrule.go
@@ -65,7 +65,6 @@
 
 	android.InitAndroidArchModule(module, android.HostAndDeviceSupported, android.MultilibCommon)
 	android.InitDefaultableModule(module)
-	android.InitBazelModule(module)
 
 	return module
 }
@@ -79,7 +78,6 @@
 
 	android.InitAndroidArchModule(module, android.HostSupported, android.MultilibCommon)
 	android.InitDefaultableModule(module)
-	android.InitBazelModule(module)
 
 	return module
 }
diff --git a/java/java.go b/java/java.go
index d5d22b2..9be8bfd 100644
--- a/java/java.go
+++ b/java/java.go
@@ -24,12 +24,8 @@
 	"sort"
 	"strings"
 
-	"android/soong/bazel"
-	"android/soong/bazel/cquery"
 	"android/soong/remoteexec"
 	"android/soong/testing"
-	"android/soong/ui/metrics/bp2build_metrics_proto"
-
 	"github.com/google/blueprint"
 	"github.com/google/blueprint/proptools"
 
@@ -909,7 +905,6 @@
 	module.initModuleAndImport(module)
 
 	android.InitApexModule(module)
-	android.InitBazelModule(module)
 	InitJavaModule(module, android.HostAndDeviceSupported)
 	return module
 }
@@ -931,7 +926,6 @@
 	module.Module.properties.Installable = proptools.BoolPtr(true)
 
 	android.InitApexModule(module)
-	android.InitBazelModule(module)
 	InitJavaModule(module, android.HostSupported)
 	return module
 }
@@ -1441,8 +1435,6 @@
 		nil,
 		nil)
 
-	android.InitBazelModule(module)
-
 	InitJavaModuleMultiTargets(module, android.HostSupported)
 
 	return module
@@ -1583,7 +1575,6 @@
 
 	android.InitAndroidArchModule(module, android.HostAndDeviceSupported, android.MultilibCommonFirst)
 	android.InitDefaultableModule(module)
-	android.InitBazelModule(module)
 
 	return module
 }
@@ -1602,7 +1593,6 @@
 
 	android.InitAndroidArchModule(module, android.HostSupported, android.MultilibCommonFirst)
 	android.InitDefaultableModule(module)
-	android.InitBazelModule(module)
 	return module
 }
 
@@ -2097,7 +2087,6 @@
 	android.ModuleBase
 	android.DefaultableModuleBase
 	android.ApexModuleBase
-	android.BazelModuleBase
 	prebuilt android.Prebuilt
 
 	// Functionality common to Module and Import.
@@ -2196,7 +2185,6 @@
 }
 
 func (j *Import) commonBuildActions(ctx android.ModuleContext) {
-	//TODO(b/231322772) these should come from Bazel once available
 	j.sdkVersion = j.SdkVersion(ctx)
 	j.minSdkVersion = j.MinSdkVersion(ctx)
 
@@ -2498,7 +2486,6 @@
 
 	android.InitPrebuiltModule(module, &module.properties.Jars)
 	android.InitApexModule(module)
-	android.InitBazelModule(module)
 	InitJavaModule(module, android.HostAndDeviceSupported)
 	return module
 }
@@ -2515,7 +2502,6 @@
 
 	android.InitPrebuiltModule(module, &module.properties.Jars)
 	android.InitApexModule(module)
-	android.InitBazelModule(module)
 	InitJavaModule(module, android.HostSupported)
 	return module
 }
@@ -2812,695 +2798,6 @@
 	}
 }
 
-type javaResourcesAttributes struct {
-	Resources             bazel.LabelListAttribute
-	Resource_strip_prefix *string
-	Additional_resources  bazel.LabelListAttribute `blueprint:"mutated"`
-}
-
-func (m *Library) getResourceFilegroupStripPrefix(ctx android.Bp2buildMutatorContext, resourceFilegroup string) (*string, bool) {
-	if otherM, ok := ctx.ModuleFromName(resourceFilegroup); ok {
-		if fg, isFilegroup := otherM.(android.FileGroupPath); isFilegroup {
-			return proptools.StringPtr(filepath.Join(ctx.OtherModuleDir(otherM), fg.GetPath(ctx))), true
-		}
-	}
-	return proptools.StringPtr(""), false
-}
-
-func (m *Library) convertJavaResourcesAttributes(ctx android.Bp2buildMutatorContext) *javaResourcesAttributes {
-	var resources bazel.LabelList
-	var resourceStripPrefix *string
-
-	additionalJavaResourcesMap := make(map[string]*javaResourcesAttributes)
-
-	if m.properties.Java_resources != nil {
-		for _, res := range m.properties.Java_resources {
-			if prefix, isFilegroup := m.getResourceFilegroupStripPrefix(ctx, res); isFilegroup {
-				otherM, _ := ctx.ModuleFromName(res)
-				resourcesTargetName := ctx.ModuleName() + "_filegroup_resources_" + otherM.Name()
-				additionalJavaResourcesMap[resourcesTargetName] = &javaResourcesAttributes{
-					Resources:             bazel.MakeLabelListAttribute(android.BazelLabelForModuleSrc(ctx, []string{res})),
-					Resource_strip_prefix: prefix,
-				}
-			} else {
-				resources.Append(android.BazelLabelForModuleSrc(ctx, []string{res}))
-			}
-		}
-
-		if !resources.IsEmpty() {
-			resourceStripPrefix = proptools.StringPtr(ctx.ModuleDir())
-		}
-	}
-
-	//TODO(b/179889880) handle case where glob includes files outside package
-	resDeps := ResourceDirsToFiles(
-		ctx,
-		m.properties.Java_resource_dirs,
-		m.properties.Exclude_java_resource_dirs,
-		m.properties.Exclude_java_resources,
-	)
-
-	for _, resDep := range resDeps {
-		dir, files := resDep.dir, resDep.files
-
-		// Bazel includes the relative path from the WORKSPACE root when placing the resource
-		// inside the JAR file, so we need to remove that prefix
-		prefix := proptools.StringPtr(dir.String())
-		resourcesTargetName := ctx.ModuleName() + "_resource_dir_" + dir.String()
-		additionalJavaResourcesMap[resourcesTargetName] = &javaResourcesAttributes{
-			Resources:             bazel.MakeLabelListAttribute(bazel.MakeLabelList(android.RootToModuleRelativePaths(ctx, files))),
-			Resource_strip_prefix: prefix,
-		}
-	}
-
-	var additionalResourceLabels bazel.LabelList
-	if len(additionalJavaResourcesMap) > 0 {
-		var additionalResources []string
-		for resName, _ := range additionalJavaResourcesMap {
-			additionalResources = append(additionalResources, resName)
-		}
-		sort.Strings(additionalResources)
-
-		for i, resName := range additionalResources {
-			resAttr := additionalJavaResourcesMap[resName]
-			if resourceStripPrefix == nil && i == 0 {
-				resourceStripPrefix = resAttr.Resource_strip_prefix
-				resources = resAttr.Resources.Value
-			} else if !resAttr.Resources.IsEmpty() {
-				ctx.CreateBazelTargetModule(
-					bazel.BazelTargetModuleProperties{
-						Rule_class:        "java_resources",
-						Bzl_load_location: "//build/bazel/rules/java:java_resources.bzl",
-					},
-					android.CommonAttributes{Name: resName},
-					resAttr,
-				)
-				additionalResourceLabels.Append(android.BazelLabelForModuleSrc(ctx, []string{resName}))
-			}
-		}
-
-	}
-
-	return &javaResourcesAttributes{
-		Resources:             bazel.MakeLabelListAttribute(resources),
-		Resource_strip_prefix: resourceStripPrefix,
-		Additional_resources:  bazel.MakeLabelListAttribute(additionalResourceLabels),
-	}
-}
-
-type javaCommonAttributes struct {
-	*javaResourcesAttributes
-	*kotlinAttributes
-	Srcs                    bazel.LabelListAttribute
-	Plugins                 bazel.LabelListAttribute
-	Javacopts               bazel.StringListAttribute
-	Sdk_version             bazel.StringAttribute
-	Java_version            bazel.StringAttribute
-	Errorprone_force_enable bazel.BoolAttribute
-	Javac_shard_size        *int64
-}
-
-type javaDependencyLabels struct {
-	// Dependencies which DO NOT contribute to the API visible to upstream dependencies.
-	Deps bazel.LabelListAttribute
-	// Dependencies which DO contribute to the API visible to upstream dependencies.
-	StaticDeps bazel.LabelListAttribute
-}
-
-type eventLogTagsAttributes struct {
-	Srcs bazel.LabelListAttribute
-}
-
-type aidlLibraryAttributes struct {
-	Srcs bazel.LabelListAttribute
-	Tags bazel.StringListAttribute
-}
-
-type javaAidlLibraryAttributes struct {
-	Deps bazel.LabelListAttribute
-	Tags bazel.StringListAttribute
-}
-
-// bp2BuildJavaInfo has information needed for the conversion of  java*_modules
-// that is needed bor Bp2Build conversion but that requires different handling
-// depending on the module type.
-type bp2BuildJavaInfo struct {
-	// separates dependencies into dynamic dependencies and static dependencies.
-	DepLabels *javaDependencyLabels
-	hasKotlin bool
-}
-
-func javaXsdTargetName(xsd android.XsdConfigBp2buildTargets) string {
-	return xsd.JavaBp2buildTargetName()
-}
-
-// convertLibraryAttrsBp2Build returns a javaCommonAttributes struct with
-// converted attributes shared across java_* modules and a bp2BuildJavaInfo struct
-// which has other non-attribute information needed for bp2build conversion
-// that needs different handling depending on the module types, and thus needs
-// to be returned to the calling function.
-func (m *Library) convertLibraryAttrsBp2Build(ctx android.Bp2buildMutatorContext) (*javaCommonAttributes, *bp2BuildJavaInfo, bool) {
-	var srcs bazel.LabelListAttribute
-	var deps bazel.LabelListAttribute
-	var staticDeps bazel.LabelListAttribute
-
-	if proptools.String(m.deviceProperties.Sdk_version) == "" && m.DeviceSupported() {
-		// TODO(b/297356704): handle platform apis in bp2build
-		ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_PROPERTY_UNSUPPORTED, "sdk_version unset")
-		return &javaCommonAttributes{}, &bp2BuildJavaInfo{}, false
-	} else if proptools.String(m.deviceProperties.Sdk_version) == "core_platform" {
-		// TODO(b/297356582): handle core_platform in bp2build
-		ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_PROPERTY_UNSUPPORTED, "sdk_version core_platform")
-		return &javaCommonAttributes{}, &bp2BuildJavaInfo{}, false
-	}
-
-	archVariantProps := m.GetArchVariantProperties(ctx, &CommonProperties{})
-	for axis, configToProps := range archVariantProps {
-		for config, p := range configToProps {
-			if archProps, ok := p.(*CommonProperties); ok {
-				archSrcs := android.BazelLabelForModuleSrcExcludes(ctx, archProps.Srcs, archProps.Exclude_srcs)
-				srcs.SetSelectValue(axis, config, archSrcs)
-				if archProps.Jarjar_rules != nil {
-					ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_PROPERTY_UNSUPPORTED, "jarjar_rules")
-					return &javaCommonAttributes{}, &bp2BuildJavaInfo{}, false
-				}
-			}
-		}
-	}
-	srcs.Append(
-		bazel.MakeLabelListAttribute(
-			android.BazelLabelForModuleSrcExcludes(ctx,
-				m.properties.Openjdk9.Srcs,
-				m.properties.Exclude_srcs)))
-	srcs.ResolveExcludes()
-
-	javaSrcPartition := "java"
-	protoSrcPartition := "proto"
-	xsdSrcPartition := "xsd"
-	logtagSrcPartition := "logtag"
-	aidlSrcPartition := "aidl"
-	kotlinPartition := "kotlin"
-	srcPartitions := bazel.PartitionLabelListAttribute(ctx, &srcs, bazel.LabelPartitions{
-		javaSrcPartition:   bazel.LabelPartition{Extensions: []string{".java"}, Keep_remainder: true},
-		logtagSrcPartition: bazel.LabelPartition{Extensions: []string{".logtags", ".logtag"}},
-		protoSrcPartition:  android.ProtoSrcLabelPartition,
-		aidlSrcPartition:   android.AidlSrcLabelPartition,
-		xsdSrcPartition:    bazel.LabelPartition{LabelMapper: android.XsdLabelMapper(javaXsdTargetName)},
-		kotlinPartition:    bazel.LabelPartition{Extensions: []string{".kt"}},
-	})
-
-	javaSrcs := srcPartitions[javaSrcPartition]
-	kotlinSrcs := srcPartitions[kotlinPartition]
-	javaSrcs.Append(kotlinSrcs)
-
-	staticDeps.Append(srcPartitions[xsdSrcPartition])
-
-	if !srcPartitions[logtagSrcPartition].IsEmpty() {
-		logtagsLibName := m.Name() + "_logtags"
-		ctx.CreateBazelTargetModule(
-			bazel.BazelTargetModuleProperties{
-				Rule_class:        "event_log_tags",
-				Bzl_load_location: "//build/bazel/rules/java:event_log_tags.bzl",
-			},
-			android.CommonAttributes{Name: logtagsLibName},
-			&eventLogTagsAttributes{
-				Srcs: srcPartitions[logtagSrcPartition],
-			},
-		)
-
-		logtagsSrcs := bazel.MakeLabelList([]bazel.Label{{Label: ":" + logtagsLibName}})
-		javaSrcs.Append(bazel.MakeLabelListAttribute(logtagsSrcs))
-	}
-
-	if !srcPartitions[aidlSrcPartition].IsEmpty() {
-		aidlLibs, aidlSrcs := srcPartitions[aidlSrcPartition].Partition(func(src bazel.Label) bool {
-			return android.IsConvertedToAidlLibrary(ctx, src.OriginalModuleName)
-		})
-
-		apexAvailableTags := android.ApexAvailableTagsWithoutTestApexes(ctx, ctx.Module())
-
-		if !aidlSrcs.IsEmpty() {
-			aidlLibName := m.Name() + "_aidl_library"
-			ctx.CreateBazelTargetModule(
-				bazel.BazelTargetModuleProperties{
-					Rule_class:        "aidl_library",
-					Bzl_load_location: "//build/bazel/rules/aidl:aidl_library.bzl",
-				},
-				android.CommonAttributes{Name: aidlLibName},
-				&aidlLibraryAttributes{
-					Srcs: aidlSrcs,
-					Tags: apexAvailableTags,
-				},
-			)
-			aidlLibs.Add(&bazel.LabelAttribute{Value: &bazel.Label{Label: ":" + aidlLibName}})
-		}
-
-		javaAidlLibName := m.Name() + "_java_aidl_library"
-		ctx.CreateBazelTargetModule(
-			bazel.BazelTargetModuleProperties{
-				Rule_class:        "java_aidl_library",
-				Bzl_load_location: "//build/bazel/rules/java:java_aidl_library.bzl",
-			},
-			android.CommonAttributes{Name: javaAidlLibName},
-			&javaAidlLibraryAttributes{
-				Deps: aidlLibs,
-				Tags: apexAvailableTags,
-			},
-		)
-
-		staticDeps.Append(bazel.MakeSingleLabelListAttribute(bazel.Label{Label: ":" + javaAidlLibName}))
-	}
-
-	var javacopts bazel.StringListAttribute //[]string
-	plugins := bazel.MakeLabelListAttribute(
-		android.BazelLabelForModuleDeps(ctx, m.properties.Plugins),
-	)
-	if m.properties.Javacflags != nil || m.properties.Openjdk9.Javacflags != nil {
-		javacopts = bazel.MakeStringListAttribute(
-			append(append([]string{}, m.properties.Javacflags...), m.properties.Openjdk9.Javacflags...))
-	}
-
-	epEnabled := m.properties.Errorprone.Enabled
-	epJavacflags := m.properties.Errorprone.Javacflags
-	var errorproneForceEnable bazel.BoolAttribute
-	if epEnabled == nil {
-		//TODO(b/227504307) add configuration that depends on RUN_ERROR_PRONE environment variable
-	} else if *epEnabled {
-		plugins.Append(bazel.MakeLabelListAttribute(android.BazelLabelForModuleDeps(ctx, m.properties.Errorprone.Extra_check_modules)))
-		javacopts.Append(bazel.MakeStringListAttribute(epJavacflags))
-		errorproneForceEnable.Value = epEnabled
-	} else {
-		javacopts.Append(bazel.MakeStringListAttribute([]string{"-XepDisableAllChecks"}))
-	}
-
-	resourcesAttrs := m.convertJavaResourcesAttributes(ctx)
-
-	commonAttrs := &javaCommonAttributes{
-		Srcs:                    javaSrcs,
-		javaResourcesAttributes: resourcesAttrs,
-		Plugins:                 plugins,
-		Javacopts:               javacopts,
-		Java_version:            bazel.StringAttribute{Value: m.properties.Java_version},
-		Sdk_version:             bazel.StringAttribute{Value: m.deviceProperties.Sdk_version},
-		Errorprone_force_enable: errorproneForceEnable,
-		Javac_shard_size:        m.properties.Javac_shard_size,
-	}
-
-	for axis, configToProps := range archVariantProps {
-		for config, _props := range configToProps {
-			if archProps, ok := _props.(*CommonProperties); ok {
-				var libLabels []bazel.Label
-				for _, d := range archProps.Libs {
-					neverlinkLabel := android.BazelLabelForModuleDepSingle(ctx, d)
-					neverlinkLabel.Label = neverlinkLabel.Label + "-neverlink"
-					libLabels = append(libLabels, neverlinkLabel)
-				}
-				deps.SetSelectValue(axis, config, bazel.MakeLabelList(libLabels))
-			}
-		}
-	}
-
-	depLabels := &javaDependencyLabels{}
-	deps.Append(resourcesAttrs.Additional_resources)
-	depLabels.Deps = deps
-
-	for axis, configToProps := range archVariantProps {
-		for config, _props := range configToProps {
-			if archProps, ok := _props.(*CommonProperties); ok {
-				archStaticLibs := android.BazelLabelForModuleDeps(
-					ctx,
-					android.LastUniqueStrings(android.CopyOf(archProps.Static_libs)))
-				depLabels.StaticDeps.SetSelectValue(axis, config, archStaticLibs)
-			}
-		}
-	}
-	depLabels.StaticDeps.Append(staticDeps)
-
-	var additionalProtoDeps bazel.LabelListAttribute
-	additionalProtoDeps.Append(depLabels.Deps)
-	additionalProtoDeps.Append(depLabels.StaticDeps)
-	protoDepLabel := bp2buildProto(ctx, &m.Module, srcPartitions[protoSrcPartition], additionalProtoDeps)
-	// Soong does not differentiate between a java_library and the Bazel equivalent of
-	// a java_proto_library + proto_library pair. Instead, in Soong proto sources are
-	// listed directly in the srcs of a java_library, and the classes produced
-	// by protoc are included directly in the resulting JAR. Thus upstream dependencies
-	// that depend on a java_library with proto sources can link directly to the protobuf API,
-	// and so this should be a static dependency.
-	if protoDepLabel != nil {
-		depLabels.StaticDeps.Append(bazel.MakeSingleLabelListAttribute(*protoDepLabel))
-	}
-
-	hasKotlin := !kotlinSrcs.IsEmpty()
-	commonAttrs.kotlinAttributes = &kotlinAttributes{
-		Kotlincflags: &m.properties.Kotlincflags,
-	}
-	if len(m.properties.Common_srcs) != 0 {
-		hasKotlin = true
-		commonAttrs.kotlinAttributes.Common_srcs = bazel.MakeLabelListAttribute(android.BazelLabelForModuleSrc(ctx, m.properties.Common_srcs))
-	}
-
-	bp2BuildInfo := &bp2BuildJavaInfo{
-		DepLabels: depLabels,
-		hasKotlin: hasKotlin,
-	}
-
-	return commonAttrs, bp2BuildInfo, true
-}
-
-type javaLibraryAttributes struct {
-	*javaCommonAttributes
-	Deps      bazel.LabelListAttribute
-	Exports   bazel.LabelListAttribute
-	Neverlink bazel.BoolAttribute
-}
-
-type kotlinAttributes struct {
-	Common_srcs  bazel.LabelListAttribute
-	Kotlincflags *[]string
-}
-
-func ktJvmLibraryBazelTargetModuleProperties() bazel.BazelTargetModuleProperties {
-	return bazel.BazelTargetModuleProperties{
-		Rule_class:        "kt_jvm_library",
-		Bzl_load_location: "//build/bazel/rules/kotlin:kt_jvm_library.bzl",
-	}
-}
-
-func javaLibraryBazelTargetModuleProperties() bazel.BazelTargetModuleProperties {
-	return bazel.BazelTargetModuleProperties{
-		Rule_class:        "java_library",
-		Bzl_load_location: "//build/bazel/rules/java:library.bzl",
-	}
-}
-
-func javaLibraryBp2Build(ctx android.Bp2buildMutatorContext, m *Library) {
-	commonAttrs, bp2BuildInfo, supported := m.convertLibraryAttrsBp2Build(ctx)
-	if !supported {
-		return
-	}
-	depLabels := bp2BuildInfo.DepLabels
-
-	deps := depLabels.Deps
-	exports := depLabels.StaticDeps
-	if !commonAttrs.Srcs.IsEmpty() {
-		deps.Append(exports) // we should only append these if there are sources to use them
-	} else if !deps.IsEmpty() {
-		// java_library does not accept deps when there are no srcs because
-		// there is no compilation happening, but it accepts exports.
-		// The non-empty deps here are unnecessary as deps on the java_library
-		// since they aren't being propagated to any dependencies.
-		// So we can drop deps here.
-		deps = bazel.LabelListAttribute{}
-	}
-	var props bazel.BazelTargetModuleProperties
-	attrs := &javaLibraryAttributes{
-		javaCommonAttributes: commonAttrs,
-		Deps:                 deps,
-		Exports:              exports,
-	}
-	name := m.Name()
-
-	if !bp2BuildInfo.hasKotlin {
-		props = javaLibraryBazelTargetModuleProperties()
-	} else {
-		props = ktJvmLibraryBazelTargetModuleProperties()
-	}
-
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: name}, attrs)
-	neverlinkProp := true
-	neverLinkAttrs := &javaLibraryAttributes{
-		Exports:   bazel.MakeSingleLabelListAttribute(bazel.Label{Label: ":" + name}),
-		Neverlink: bazel.BoolAttribute{Value: &neverlinkProp},
-		javaCommonAttributes: &javaCommonAttributes{
-			Sdk_version:  bazel.StringAttribute{Value: m.deviceProperties.Sdk_version},
-			Java_version: bazel.StringAttribute{Value: m.properties.Java_version},
-		},
-	}
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: name + "-neverlink"}, neverLinkAttrs)
-
-}
-
-type javaBinaryHostAttributes struct {
-	*javaCommonAttributes
-	Deps         bazel.LabelListAttribute
-	Runtime_deps bazel.LabelListAttribute
-	Main_class   string
-	Jvm_flags    bazel.StringListAttribute
-}
-
-// JavaBinaryHostBp2Build is for java_binary_host bp2build.
-func javaBinaryHostBp2Build(ctx android.Bp2buildMutatorContext, m *Binary) {
-	commonAttrs, bp2BuildInfo, supported := m.convertLibraryAttrsBp2Build(ctx)
-	if !supported {
-		return
-	}
-	depLabels := bp2BuildInfo.DepLabels
-
-	deps := depLabels.Deps
-	deps.Append(depLabels.StaticDeps)
-	if m.binaryProperties.Jni_libs != nil {
-		deps.Append(bazel.MakeLabelListAttribute(android.BazelLabelForModuleDeps(ctx, m.binaryProperties.Jni_libs)))
-	}
-
-	var runtimeDeps bazel.LabelListAttribute
-	if commonAttrs.Srcs.IsEmpty() {
-		// if there are no sources, then the dependencies can only be used at runtime
-		runtimeDeps = deps
-		deps = bazel.LabelListAttribute{}
-	}
-
-	mainClass := ""
-	if m.binaryProperties.Main_class != nil {
-		mainClass = *m.binaryProperties.Main_class
-	}
-	if m.properties.Manifest != nil {
-		mainClassInManifest, err := android.GetMainClassInManifest(ctx.Config(), android.PathForModuleSrc(ctx, *m.properties.Manifest).String())
-		if err != nil {
-			return
-		}
-		mainClass = mainClassInManifest
-	}
-
-	// Attribute jvm_flags
-	var jvmFlags bazel.StringListAttribute
-	if m.binaryProperties.Jni_libs != nil {
-		jniLibPackages := []string{}
-		for _, jniLib := range m.binaryProperties.Jni_libs {
-			if jniLibModule, exists := ctx.ModuleFromName(jniLib); exists {
-				otherDir := ctx.OtherModuleDir(jniLibModule)
-				jniLibPackages = append(jniLibPackages, filepath.Join(otherDir, jniLib))
-			}
-		}
-		jniLibPaths := []string{}
-		for _, jniLibPackage := range jniLibPackages {
-			// See cs/f:.*/third_party/bazel/.*java_stub_template.txt for the use of RUNPATH
-			jniLibPaths = append(jniLibPaths, "$${RUNPATH}"+jniLibPackage)
-		}
-		jvmFlags = bazel.MakeStringListAttribute([]string{"-Djava.library.path=" + strings.Join(jniLibPaths, ":")})
-	}
-
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "java_binary",
-		Bzl_load_location: "@rules_java//java:defs.bzl",
-	}
-	binAttrs := &javaBinaryHostAttributes{
-		Runtime_deps: runtimeDeps,
-		Main_class:   mainClass,
-		Jvm_flags:    jvmFlags,
-	}
-
-	if commonAttrs.Srcs.IsEmpty() {
-		binAttrs.javaCommonAttributes = commonAttrs
-		ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: m.Name()}, binAttrs)
-		return
-	}
-
-	libInfo := libraryCreationInfo{
-		deps:      deps,
-		attrs:     commonAttrs,
-		baseName:  m.Name(),
-		hasKotlin: bp2BuildInfo.hasKotlin,
-	}
-	libName := createLibraryTarget(ctx, libInfo)
-	binAttrs.Runtime_deps.Add(&bazel.LabelAttribute{Value: &bazel.Label{Label: ":" + libName}})
-
-	// Create the BazelTargetModule.
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: m.Name()}, binAttrs)
-}
-
-type javaTestHostAttributes struct {
-	*javaCommonAttributes
-	Srcs         bazel.LabelListAttribute
-	Deps         bazel.LabelListAttribute
-	Runtime_deps bazel.LabelListAttribute
-}
-
-// javaTestHostBp2Build is for java_test_host bp2build.
-func javaTestHostBp2Build(ctx android.Bp2buildMutatorContext, m *TestHost) {
-	commonAttrs, bp2BuildInfo, supported := m.convertLibraryAttrsBp2Build(ctx)
-	if !supported {
-		return
-	}
-	depLabels := bp2BuildInfo.DepLabels
-
-	deps := depLabels.Deps
-	deps.Append(depLabels.StaticDeps)
-
-	var runtimeDeps bazel.LabelListAttribute
-	attrs := &javaTestHostAttributes{
-		Runtime_deps: runtimeDeps,
-	}
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "java_test",
-		Bzl_load_location: "//build/bazel/rules/java:test.bzl",
-	}
-
-	if commonAttrs.Srcs.IsEmpty() {
-		// if there are no sources, then the dependencies can only be used at runtime
-		attrs.Runtime_deps = deps
-		attrs.javaCommonAttributes = commonAttrs
-		ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: m.Name()}, attrs)
-		return
-	}
-
-	libInfo := libraryCreationInfo{
-		deps:      deps,
-		attrs:     commonAttrs,
-		baseName:  m.Name(),
-		hasKotlin: bp2BuildInfo.hasKotlin,
-	}
-	libName := createLibraryTarget(ctx, libInfo)
-
-	attrs.Srcs = commonAttrs.Srcs
-	attrs.Deps = deps
-	attrs.Runtime_deps.Add(&bazel.LabelAttribute{Value: &bazel.Label{Label: ":" + libName}})
-	// Create the BazelTargetModule.
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: m.Name()}, attrs)
-}
-
-// libraryCreationInfo encapsulates the info needed to create java_library target from
-// java_binary_host or java_test_host.
-type libraryCreationInfo struct {
-	deps      bazel.LabelListAttribute
-	attrs     *javaCommonAttributes
-	baseName  string
-	hasKotlin bool
-}
-
-// helper function that creates java_library target from java_binary_host or java_test_host,
-// and returns the library target name,
-func createLibraryTarget(ctx android.Bp2buildMutatorContext, libInfo libraryCreationInfo) string {
-	libName := libInfo.baseName + "_lib"
-	var libProps bazel.BazelTargetModuleProperties
-	if libInfo.hasKotlin {
-		libProps = ktJvmLibraryBazelTargetModuleProperties()
-	} else {
-		libProps = javaLibraryBazelTargetModuleProperties()
-	}
-	libAttrs := &javaLibraryAttributes{
-		Deps:                 libInfo.deps,
-		javaCommonAttributes: libInfo.attrs,
-	}
-
-	ctx.CreateBazelTargetModule(libProps, android.CommonAttributes{Name: libName}, libAttrs)
-	return libName
-}
-
-type bazelJavaImportAttributes struct {
-	Jars    bazel.LabelListAttribute
-	Exports bazel.LabelListAttribute
-}
-
-// java_import bp2Build converter.
-func (i *Import) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	var jars bazel.LabelListAttribute
-	archVariantProps := i.GetArchVariantProperties(ctx, &ImportProperties{})
-	for axis, configToProps := range archVariantProps {
-		for config, _props := range configToProps {
-			if archProps, ok := _props.(*ImportProperties); ok {
-				archJars := android.BazelLabelForModuleSrcExcludes(ctx, archProps.Jars, []string(nil))
-				jars.SetSelectValue(axis, config, archJars)
-			}
-		}
-	}
-
-	attrs := &bazelJavaImportAttributes{
-		Jars: jars,
-	}
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "java_import",
-		Bzl_load_location: "//build/bazel/rules/java:import.bzl",
-	}
-
-	name := android.RemoveOptionalPrebuiltPrefix(i.Name())
-
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: name}, attrs)
-
-	neverlink := true
-	neverlinkAttrs := &javaLibraryAttributes{
-		Neverlink: bazel.BoolAttribute{Value: &neverlink},
-		Exports:   bazel.MakeSingleLabelListAttribute(bazel.Label{Label: ":" + name}),
-		javaCommonAttributes: &javaCommonAttributes{
-			Sdk_version: bazel.StringAttribute{Value: proptools.StringPtr("none")},
-		},
-	}
-	ctx.CreateBazelTargetModule(
-		javaLibraryBazelTargetModuleProperties(),
-		android.CommonAttributes{Name: name + "-neverlink"},
-		neverlinkAttrs)
-}
-
-var _ android.MixedBuildBuildable = (*Import)(nil)
-
-func (i *Import) getBazelModuleLabel(ctx android.BaseModuleContext) string {
-	return android.RemoveOptionalPrebuiltPrefixFromBazelLabel(i.GetBazelLabel(ctx, i))
-}
-
-func (i *Import) ProcessBazelQueryResponse(ctx android.ModuleContext) {
-	i.commonBuildActions(ctx)
-
-	bazelCtx := ctx.Config().BazelContext
-	filePaths, err := bazelCtx.GetOutputFiles(i.getBazelModuleLabel(ctx), android.GetConfigKey(ctx))
-	if err != nil {
-		ctx.ModuleErrorf(err.Error())
-		return
-	}
-
-	bazelJars := android.Paths{}
-	for _, bazelOutputFile := range filePaths {
-		bazelJars = append(bazelJars, android.PathForBazelOut(ctx, bazelOutputFile))
-	}
-
-	jarName := android.RemoveOptionalPrebuiltPrefix(i.Name()) + ".jar"
-	outputFile := android.PathForModuleOut(ctx, "bazelCombined", jarName)
-	TransformJarsToJar(ctx, outputFile, "combine prebuilt jars", bazelJars,
-		android.OptionalPath{}, // manifest
-		false,                  // stripDirEntries
-		[]string{},             // filesToStrip
-		[]string{},             // dirsToStrip
-	)
-	i.combinedClasspathFile = outputFile
-
-	ctx.SetProvider(JavaInfoProvider, JavaInfo{
-		HeaderJars:                     android.PathsIfNonNil(i.combinedClasspathFile),
-		ImplementationAndResourcesJars: android.PathsIfNonNil(i.combinedClasspathFile),
-		ImplementationJars:             android.PathsIfNonNil(i.combinedClasspathFile),
-		// TODO(b/240308299) include AIDL information from Bazel
-		// TODO: aconfig files?
-	})
-
-	i.maybeInstall(ctx, jarName, outputFile)
-}
-
-func (i *Import) QueueBazelCall(ctx android.BaseModuleContext) {
-	bazelCtx := ctx.Config().BazelContext
-	bazelCtx.QueueBazelRequest(i.getBazelModuleLabel(ctx), cquery.GetOutputFiles, android.GetConfigKey(ctx))
-}
-
-func (i *Import) IsMixedBuildSupported(ctx android.BaseModuleContext) bool {
-	return true
-}
-
 type JavaApiContributionImport struct {
 	JavaApiContribution
 
diff --git a/java/java_test.go b/java/java_test.go
index d4b056b..8e83fc4 100644
--- a/java/java_test.go
+++ b/java/java_test.go
@@ -1205,7 +1205,7 @@
 		expected := "java.base=.:out/soong"
 		checkPatchModuleFlag(t, ctx, "bar", expected)
 		expected = "java.base=" + strings.Join([]string{
-			".", "out/soong", "dir", "dir2", "nested", defaultModuleToPath("ext"), defaultModuleToPath("framework")}, ":")
+			".", "out/soong", defaultModuleToPath("ext"), defaultModuleToPath("framework")}, ":")
 		checkPatchModuleFlag(t, ctx, "baz", expected)
 	})
 }
@@ -1290,43 +1290,6 @@
 	}
 }
 
-func TestAidlIncludeDirFromConvertedFileGroupWithPathPropInMixedBuilds(t *testing.T) {
-	// TODO(b/247782695), TODO(b/242847534) Fix mixed builds for filegroups
-	t.Skip("Re-enable once filegroups are corrected for mixed builds")
-	bp := `
-	filegroup {
-		name: "foo_aidl",
-		srcs: ["aidl/foo/IFoo.aidl"],
-		path: "aidl/foo",
-		bazel_module: { label: "//:foo_aidl" },
-	}
-	java_library {
-		name: "foo",
-		srcs: [":foo_aidl"],
-	}
-`
-
-	outBaseDir := "out/bazel/output"
-	result := android.GroupFixturePreparers(
-		prepareForJavaTest,
-		android.PrepareForTestWithFilegroup,
-		android.FixtureModifyConfig(func(config android.Config) {
-			config.BazelContext = android.MockBazelContext{
-				OutputBaseDir: outBaseDir,
-				LabelToOutputFiles: map[string][]string{
-					"//:foo_aidl": []string{"aidl/foo/IFoo.aidl"},
-				},
-			}
-		}),
-	).RunTestWithBp(t, bp)
-
-	aidlCommand := result.ModuleForTests("foo", "android_common").Rule("aidl").RuleParams.Command
-	expectedAidlFlag := "-I" + outBaseDir + "/execroot/__main__/aidl/foo"
-	if !strings.Contains(aidlCommand, expectedAidlFlag) {
-		t.Errorf("aidl command %q does not contain %q", aidlCommand, expectedAidlFlag)
-	}
-}
-
 func TestAidlFlagsArePassedToTheAidlCompiler(t *testing.T) {
 	ctx, _ := testJava(t, `
 		java_library {
@@ -1743,85 +1706,6 @@
 	}
 }
 
-func TestImportMixedBuild(t *testing.T) {
-	bp := `
-		java_import {
-			name: "baz",
-			jars: [
-				"test1.jar",
-				"test2.jar",
-			],
-			bazel_module: { label: "//foo/bar:baz" },
-		}
-	`
-
-	ctx := android.GroupFixturePreparers(
-		prepareForJavaTest,
-		android.FixtureModifyConfig(func(config android.Config) {
-			config.BazelContext = android.MockBazelContext{
-				OutputBaseDir: "outputbase",
-				LabelToOutputFiles: map[string][]string{
-					"//foo/bar:baz": []string{"test1.jar", "test2.jar"},
-				},
-			}
-		}),
-	).RunTestWithBp(t, bp)
-
-	bazMod := ctx.ModuleForTests("baz", "android_common").Module()
-	producer := bazMod.(android.OutputFileProducer)
-	expectedOutputFiles := []string{".intermediates/baz/android_common/bazelCombined/baz.jar"}
-
-	outputFiles, err := producer.OutputFiles("")
-	if err != nil {
-		t.Errorf("Unexpected error getting java_import outputfiles %s", err)
-	}
-	actualOutputFiles := android.NormalizePathsForTesting(outputFiles)
-	android.AssertDeepEquals(t, "Output files are produced", expectedOutputFiles, actualOutputFiles)
-
-	javaInfoProvider := ctx.ModuleProvider(bazMod, JavaInfoProvider)
-	javaInfo, ok := javaInfoProvider.(JavaInfo)
-	if !ok {
-		t.Error("could not get JavaInfo from java_import module")
-	}
-	android.AssertDeepEquals(t, "Header JARs are produced", expectedOutputFiles, android.NormalizePathsForTesting(javaInfo.HeaderJars))
-	android.AssertDeepEquals(t, "Implementation/Resources JARs are produced", expectedOutputFiles, android.NormalizePathsForTesting(javaInfo.ImplementationAndResourcesJars))
-	android.AssertDeepEquals(t, "Implementation JARs are produced", expectedOutputFiles, android.NormalizePathsForTesting(javaInfo.ImplementationJars))
-}
-
-func TestGenAidlIncludeFlagsForMixedBuilds(t *testing.T) {
-	bazelOutputBaseDir := filepath.Join("out", "bazel")
-	result := android.GroupFixturePreparers(
-		PrepareForIntegrationTestWithJava,
-		android.FixtureModifyConfig(func(config android.Config) {
-			config.BazelContext = android.MockBazelContext{
-				OutputBaseDir: bazelOutputBaseDir,
-			}
-		}),
-	).RunTest(t)
-
-	ctx := &android.TestPathContext{TestResult: result}
-
-	srcDirectory := filepath.Join("frameworks", "base")
-	srcDirectoryAlreadyIncluded := filepath.Join("frameworks", "base", "core", "java")
-	bazelSrcDirectory := android.PathForBazelOut(ctx, srcDirectory)
-	bazelSrcDirectoryAlreadyIncluded := android.PathForBazelOut(ctx, srcDirectoryAlreadyIncluded)
-	srcs := android.Paths{
-		android.PathForTestingWithRel(bazelSrcDirectory.String(), "bazelAidl.aidl"),
-		android.PathForTestingWithRel(bazelSrcDirectory.String(), "bazelAidl2.aidl"),
-		android.PathForTestingWithRel(bazelSrcDirectoryAlreadyIncluded.String(), "bazelAidlExclude.aidl"),
-		android.PathForTestingWithRel(bazelSrcDirectoryAlreadyIncluded.String(), "bazelAidl2Exclude.aidl"),
-	}
-	dirsAlreadyIncluded := android.Paths{
-		android.PathForTesting(srcDirectoryAlreadyIncluded),
-	}
-
-	expectedFlags := " -Iout/bazel/execroot/__main__/frameworks/base"
-	flags := genAidlIncludeFlags(ctx, srcs, dirsAlreadyIncluded)
-	if flags != expectedFlags {
-		t.Errorf("expected flags to be %q; was %q", expectedFlags, flags)
-	}
-}
-
 func TestDeviceBinaryWrapperGeneration(t *testing.T) {
 	// Scenario 1: java_binary has main_class property in its bp
 	ctx, _ := testJava(t, `
diff --git a/java/platform_compat_config.go b/java/platform_compat_config.go
index 662a2d7..2197304 100644
--- a/java/platform_compat_config.go
+++ b/java/platform_compat_config.go
@@ -19,10 +19,7 @@
 	"path/filepath"
 
 	"android/soong/android"
-	"android/soong/bazel"
-
 	"github.com/google/blueprint"
-	"github.com/google/blueprint/proptools"
 )
 
 func init() {
@@ -57,7 +54,6 @@
 
 type platformCompatConfig struct {
 	android.ModuleBase
-	android.BazelModuleBase
 
 	properties     platformCompatConfigProperties
 	installDirPath android.InstallPath
@@ -126,29 +122,10 @@
 	}}
 }
 
-type bazelPlatformCompatConfigAttributes struct {
-	Src bazel.LabelAttribute
-}
-
-func (p *platformCompatConfig) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "platform_compat_config",
-		Bzl_load_location: "//build/bazel/rules/java:platform_compat_config.bzl",
-	}
-	attr := &bazelPlatformCompatConfigAttributes{
-		Src: *bazel.MakeLabelAttribute(
-			android.BazelLabelForModuleSrcSingle(ctx, proptools.String(p.properties.Src)).Label),
-	}
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{
-		Name: p.Name(),
-	}, attr)
-}
-
 func PlatformCompatConfigFactory() android.Module {
 	module := &platformCompatConfig{}
 	module.AddProperties(&module.properties)
 	android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibCommon)
-	android.InitBazelModule(module)
 	return module
 }
 
diff --git a/java/plugin.go b/java/plugin.go
index 4d4c199..9c4774a 100644
--- a/java/plugin.go
+++ b/java/plugin.go
@@ -16,7 +16,6 @@
 
 import (
 	"android/soong/android"
-	"android/soong/bazel"
 )
 
 func init() {
@@ -35,8 +34,6 @@
 
 	InitJavaModule(module, android.HostSupported)
 
-	android.InitBazelModule(module)
-
 	return module
 }
 
@@ -56,38 +53,3 @@
 	// parallelism and cause more recompilation for modules that depend on modules that use this plugin.
 	Generates_api *bool
 }
-
-type pluginAttributes struct {
-	*javaCommonAttributes
-	Deps            bazel.LabelListAttribute
-	Processor_class *string
-}
-
-// ConvertWithBp2build is used to convert android_app to Bazel.
-func (p *Plugin) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	pluginName := p.Name()
-	commonAttrs, bp2BuildInfo, supported := p.convertLibraryAttrsBp2Build(ctx)
-	if !supported {
-		return
-	}
-	depLabels := bp2BuildInfo.DepLabels
-
-	deps := depLabels.Deps
-	deps.Append(depLabels.StaticDeps)
-
-	var processorClass *string
-	if p.pluginProperties.Processor_class != nil {
-		processorClass = p.pluginProperties.Processor_class
-	}
-
-	attrs := &pluginAttributes{
-		javaCommonAttributes: commonAttrs,
-		Deps:                 deps,
-		Processor_class:      processorClass,
-	}
-
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class: "java_plugin",
-	}
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: pluginName}, attrs)
-}
diff --git a/java/prebuilt_apis.go b/java/prebuilt_apis.go
index 99cb99b..94e9c6c 100644
--- a/java/prebuilt_apis.go
+++ b/java/prebuilt_apis.go
@@ -127,41 +127,13 @@
 func prebuiltApiModuleName(mctx android.LoadHookContext, module, scope, version string) string {
 	return fmt.Sprintf("%s_%s_%s_%s", mctx.ModuleName(), scope, version, module)
 }
-
-func hasBazelPrebuilt(module string) bool {
-	return module == "android" || module == "core-for-system-modules"
-}
-
-func bazelPrebuiltApiModuleName(module, scope, version string) string {
-	bazelModule := module
-	switch module {
-	case "android":
-		bazelModule = "android_jar"
-	case "core-for-system-modules":
-		bazelModule = "core_jar"
-	}
-	bazelVersion := version
-	if version == "current" {
-		bazelVersion = strconv.Itoa(android.FutureApiLevelInt)
-	}
-	bazelScope := scope
-	switch scope {
-	case "module-lib":
-		bazelScope = "module"
-	case "system-server":
-		bazelScope = "system_server"
-	}
-	return fmt.Sprintf("//prebuilts/sdk:%s_%s_%s", bazelScope, bazelVersion, bazelModule)
-}
-
 func createImport(mctx android.LoadHookContext, module, scope, version, path, sdkVersion string, compileDex bool) {
 	props := struct {
-		Name         *string
-		Jars         []string
-		Sdk_version  *string
-		Installable  *bool
-		Compile_dex  *bool
-		Bazel_module android.BazelModuleProperties
+		Name        *string
+		Jars        []string
+		Sdk_version *string
+		Installable *bool
+		Compile_dex *bool
 	}{
 		Name:        proptools.StringPtr(prebuiltApiModuleName(mctx, module, scope, version)),
 		Jars:        []string{path},
@@ -169,10 +141,6 @@
 		Installable: proptools.BoolPtr(false),
 		Compile_dex: proptools.BoolPtr(compileDex),
 	}
-	if hasBazelPrebuilt(module) {
-		props.Bazel_module = android.BazelModuleProperties{
-			Label: proptools.StringPtr(bazelPrebuiltApiModuleName(module, scope, version))}
-	}
 	mctx.CreateModule(ImportFactory, &props)
 }
 
diff --git a/java/proto.go b/java/proto.go
index c88d3d7..e27ef2c 100644
--- a/java/proto.go
+++ b/java/proto.go
@@ -19,9 +19,6 @@
 	"strconv"
 
 	"android/soong/android"
-	"android/soong/bazel"
-
-	"github.com/google/blueprint/proptools"
 )
 
 const (
@@ -141,79 +138,3 @@
 
 	return flags
 }
-
-type protoAttributes struct {
-	Deps bazel.LabelListAttribute
-
-	// A list of proto_library targets that the proto_library in `deps` depends on
-	// This list is overestimation.
-	// Overestimation is necessary since Soong includes other protos via proto.include_dirs and not
-	// a specific .proto file module explicitly.
-	Transitive_deps bazel.LabelListAttribute
-
-	// This is the libs and the static_libs of the original java_library module.
-	// On the bazel side, after proto sources are generated in java_*_proto_library, a java_library
-	// will compile them. The libs and static_libs from the original java_library module need
-	// to be linked because they are necessary in compile-time classpath.
-	Additional_proto_deps bazel.LabelListAttribute
-
-	Sdk_version  bazel.StringAttribute
-	Java_version bazel.StringAttribute
-
-	Plugin bazel.LabelAttribute
-}
-
-func bp2buildProto(ctx android.Bp2buildMutatorContext, m *Module, protoSrcs bazel.LabelListAttribute, AdditionalProtoDeps bazel.LabelListAttribute) *bazel.Label {
-	protoInfo, ok := android.Bp2buildProtoProperties(ctx, &m.ModuleBase, protoSrcs)
-	if !ok {
-		return nil
-	}
-
-	typ := proptools.StringDefault(protoInfo.Type, protoTypeDefault)
-	var rule_class string
-	suffix := "_java_proto"
-	switch typ {
-	case "nano":
-		suffix += "_nano"
-		rule_class = "java_nano_proto_library"
-	case "micro":
-		suffix += "_micro"
-		rule_class = "java_micro_proto_library"
-	case "lite":
-		suffix += "_lite"
-		rule_class = "java_lite_proto_library"
-	case "stream":
-		suffix += "_stream"
-		rule_class = "java_stream_proto_library"
-	case "full":
-		rule_class = "java_proto_library"
-	default:
-		ctx.PropertyErrorf("proto.type", "cannot handle conversion at this time: %q", typ)
-	}
-
-	plugin := bazel.LabelAttribute{}
-	if m.protoProperties.Proto.Plugin != nil {
-		plugin.SetValue(android.BazelLabelForModuleDepSingle(ctx, "protoc-gen-"+*m.protoProperties.Proto.Plugin))
-	}
-
-	protoAttrs := &protoAttributes{
-		Deps:                  bazel.MakeLabelListAttribute(protoInfo.Proto_libs),
-		Transitive_deps:       bazel.MakeLabelListAttribute(protoInfo.Transitive_proto_libs),
-		Additional_proto_deps: AdditionalProtoDeps,
-		Java_version:          bazel.StringAttribute{Value: m.properties.Java_version},
-		Sdk_version:           bazel.StringAttribute{Value: m.deviceProperties.Sdk_version},
-		Plugin:                plugin,
-	}
-
-	name := m.Name() + suffix
-
-	ctx.CreateBazelTargetModule(
-		bazel.BazelTargetModuleProperties{
-			Rule_class:        rule_class,
-			Bzl_load_location: "//build/bazel/rules/java:proto.bzl",
-		},
-		android.CommonAttributes{Name: name},
-		protoAttrs)
-
-	return &bazel.Label{Label: ":" + name}
-}
diff --git a/java/sdk_library.go b/java/sdk_library.go
index fbfe509..176bda0 100644
--- a/java/sdk_library.go
+++ b/java/sdk_library.go
@@ -24,13 +24,10 @@
 	"strings"
 	"sync"
 
-	"android/soong/ui/metrics/bp2build_metrics_proto"
-
 	"github.com/google/blueprint"
 	"github.com/google/blueprint/proptools"
 
 	"android/soong/android"
-	"android/soong/bazel"
 	"android/soong/dexpreopt"
 )
 
@@ -1238,8 +1235,6 @@
 type SdkLibrary struct {
 	Library
 
-	android.BazelModuleBase
-
 	sdkLibraryProperties sdkLibraryProperties
 
 	// Map from api scope to the scope specific property structure.
@@ -2318,47 +2313,9 @@
 			module.CreateInternalModules(ctx)
 		}
 	})
-	android.InitBazelModule(module)
 	return module
 }
 
-type bazelSdkLibraryAttributes struct {
-	Public        *bazel.Label
-	System        *bazel.Label
-	Test          *bazel.Label
-	Module_lib    *bazel.Label
-	System_server *bazel.Label
-}
-
-// java_sdk_library bp2build converter
-func (module *SdkLibrary) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	if ctx.ModuleType() != "java_sdk_library" {
-		ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_TYPE_UNSUPPORTED, "")
-		return
-	}
-
-	nameToAttr := make(map[string]*bazel.Label)
-
-	for _, scope := range module.getGeneratedApiScopes(ctx) {
-		apiSurfaceFile := android.BazelLabelForModuleSrcSingle(ctx, path.Join(module.getApiDir(), scope.apiFilePrefix+"current.txt"))
-		nameToAttr[scope.name] = &apiSurfaceFile
-	}
-
-	attrs := bazelSdkLibraryAttributes{
-		Public:        nameToAttr["public"],
-		System:        nameToAttr["system"],
-		Test:          nameToAttr["test"],
-		Module_lib:    nameToAttr["module-lib"],
-		System_server: nameToAttr["system-server"],
-	}
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "java_sdk_library",
-		Bzl_load_location: "//build/bazel/rules/java:sdk_library.bzl",
-	}
-
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: module.Name()}, &attrs)
-}
-
 //
 // SDK library prebuilts
 //
@@ -2400,7 +2357,6 @@
 type SdkLibraryImport struct {
 	android.ModuleBase
 	android.DefaultableModuleBase
-	android.BazelModuleBase
 	prebuilt android.Prebuilt
 	android.ApexModuleBase
 
@@ -2484,7 +2440,6 @@
 
 	android.InitPrebuiltModule(module, &[]string{""})
 	android.InitApexModule(module)
-	android.InitBazelModule(module)
 	InitJavaModule(module, android.HostAndDeviceSupported)
 
 	module.SetDefaultableHook(func(mctx android.DefaultableHookContext) {
@@ -2495,33 +2450,6 @@
 	return module
 }
 
-// java_sdk_library bp2build converter
-func (i *SdkLibraryImport) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	nameToAttr := make(map[string]*bazel.Label)
-
-	for scope, props := range i.scopeProperties {
-		if api := proptools.String(props.Current_api); api != "" {
-			apiSurfaceFile := android.BazelLabelForModuleSrcSingle(ctx, api)
-			nameToAttr[scope.name] = &apiSurfaceFile
-		}
-	}
-
-	attrs := bazelSdkLibraryAttributes{
-		Public:        nameToAttr["public"],
-		System:        nameToAttr["system"],
-		Test:          nameToAttr["test"],
-		Module_lib:    nameToAttr["module-lib"],
-		System_server: nameToAttr["system-server"],
-	}
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "java_sdk_library",
-		Bzl_load_location: "//build/bazel/rules/java:sdk_library.bzl",
-	}
-
-	name := android.RemoveOptionalPrebuiltPrefix(i.Name())
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: name}, &attrs)
-}
-
 var _ PermittedPackagesForUpdatableBootJars = (*SdkLibraryImport)(nil)
 
 func (module *SdkLibraryImport) PermittedPackagesForUpdatableBootJars() []string {
diff --git a/linkerconfig/linkerconfig.go b/linkerconfig/linkerconfig.go
index dad5892..8b52d86 100644
--- a/linkerconfig/linkerconfig.go
+++ b/linkerconfig/linkerconfig.go
@@ -19,11 +19,9 @@
 	"sort"
 	"strings"
 
-	"android/soong/ui/metrics/bp2build_metrics_proto"
 	"github.com/google/blueprint/proptools"
 
 	"android/soong/android"
-	"android/soong/bazel"
 	"android/soong/cc"
 	"android/soong/etc"
 )
@@ -54,7 +52,6 @@
 
 type linkerConfig struct {
 	android.ModuleBase
-	android.BazelModuleBase
 	properties linkerConfigProperties
 
 	outputFilePath android.OutputPath
@@ -103,29 +100,6 @@
 	ctx.InstallFile(l.installDirPath, l.outputFilePath.Base(), l.outputFilePath)
 }
 
-type linkerConfigAttributes struct {
-	Src bazel.LabelAttribute
-}
-
-func (l *linkerConfig) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	if l.properties.Src == nil {
-		ctx.PropertyErrorf("src", "empty src is not supported")
-		ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_UNSUPPORTED, "")
-		return
-	}
-	src := android.BazelLabelForModuleSrcSingle(ctx, *l.properties.Src)
-	targetModuleProperties := bazel.BazelTargetModuleProperties{
-		Rule_class:        "linker_config",
-		Bzl_load_location: "//build/bazel/rules:linker_config.bzl",
-	}
-	ctx.CreateBazelTargetModule(
-		targetModuleProperties,
-		android.CommonAttributes{Name: l.Name()},
-		&linkerConfigAttributes{
-			Src: bazel.LabelAttribute{Value: &src},
-		})
-}
-
 func BuildLinkerConfig(ctx android.ModuleContext, builder *android.RuleBuilder,
 	input android.Path, otherModules []android.Module, output android.OutputPath) {
 
@@ -171,7 +145,6 @@
 	m := &linkerConfig{}
 	m.AddProperties(&m.properties)
 	android.InitAndroidArchModule(m, android.HostAndDeviceSupported, android.MultilibFirst)
-	android.InitBazelModule(m)
 	return m
 }
 
diff --git a/python/Android.bp b/python/Android.bp
index 87810c9..14e83c1 100644
--- a/python/Android.bp
+++ b/python/Android.bp
@@ -14,7 +14,6 @@
     ],
     srcs: [
         "binary.go",
-        "bp2build.go",
         "builder.go",
         "defaults.go",
         "library.go",
diff --git a/python/binary.go b/python/binary.go
index a5db2f6..85084a4 100644
--- a/python/binary.go
+++ b/python/binary.go
@@ -95,7 +95,6 @@
 	p.AddProperties(&p.binaryProperties)
 	android.InitAndroidArchModule(p, p.hod, p.multilib)
 	android.InitDefaultableModule(p)
-	android.InitBazelModule(p)
 	return p
 }
 
diff --git a/python/bp2build.go b/python/bp2build.go
deleted file mode 100644
index 3b283e4..0000000
--- a/python/bp2build.go
+++ /dev/null
@@ -1,240 +0,0 @@
-// Copyright 2023 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package python
-
-import (
-	"path/filepath"
-	"strings"
-
-	"github.com/google/blueprint/proptools"
-
-	"android/soong/android"
-	"android/soong/bazel"
-)
-
-type bazelPythonLibraryAttributes struct {
-	Srcs         bazel.LabelListAttribute
-	Deps         bazel.LabelListAttribute
-	Imports      bazel.StringListAttribute
-	Srcs_version *string
-}
-
-type bazelPythonProtoLibraryAttributes struct {
-	Deps bazel.LabelListAttribute
-
-	// A list of proto_library targets that the proto_library in `deps` depends on
-	// This list is overestimation.
-	// Overestimation is necessary since Soong includes other protos via proto.include_dirs and not
-	// a specific .proto file module explicitly.
-	Transitive_deps bazel.LabelListAttribute
-}
-
-type baseAttributes struct {
-	// TODO(b/200311466): Probably not translate b/c Bazel has no good equiv
-	//Pkg_path    bazel.StringAttribute
-	// TODO: Related to Pkg_bath and similarLy gated
-	//Is_internal bazel.BoolAttribute
-	// Combines Srcs and Exclude_srcs
-	Srcs bazel.LabelListAttribute
-	Deps bazel.LabelListAttribute
-	// Combines Data and Java_data (invariant)
-	Data    bazel.LabelListAttribute
-	Imports bazel.StringListAttribute
-}
-
-func (m *PythonLibraryModule) makeArchVariantBaseAttributes(ctx android.Bp2buildMutatorContext) baseAttributes {
-	var attrs baseAttributes
-	archVariantBaseProps := m.GetArchVariantProperties(ctx, &BaseProperties{})
-	for axis, configToProps := range archVariantBaseProps {
-		for config, props := range configToProps {
-			if baseProps, ok := props.(*BaseProperties); ok {
-				attrs.Srcs.SetSelectValue(axis, config,
-					android.BazelLabelForModuleSrcExcludes(ctx, baseProps.Srcs, baseProps.Exclude_srcs))
-				attrs.Deps.SetSelectValue(axis, config,
-					android.BazelLabelForModuleDeps(ctx, baseProps.Libs))
-				data := android.BazelLabelForModuleSrc(ctx, baseProps.Data)
-				data.Append(android.BazelLabelForModuleSrc(ctx, baseProps.Java_data))
-				attrs.Data.SetSelectValue(axis, config, data)
-			}
-		}
-	}
-
-	partitionedSrcs := bazel.PartitionLabelListAttribute(ctx, &attrs.Srcs, bazel.LabelPartitions{
-		"proto": android.ProtoSrcLabelPartition,
-		"py":    bazel.LabelPartition{Keep_remainder: true},
-	})
-	attrs.Srcs = partitionedSrcs["py"]
-
-	if !partitionedSrcs["proto"].IsEmpty() {
-		protoInfo, _ := android.Bp2buildProtoProperties(ctx, &m.ModuleBase, partitionedSrcs["proto"])
-
-		pyProtoLibraryName := m.Name() + "_py_proto"
-		ctx.CreateBazelTargetModule(bazel.BazelTargetModuleProperties{
-			Rule_class:        "py_proto_library",
-			Bzl_load_location: "//build/bazel/rules/python:py_proto.bzl",
-		}, android.CommonAttributes{
-			Name: pyProtoLibraryName,
-		}, &bazelPythonProtoLibraryAttributes{
-			Deps:            bazel.MakeLabelListAttribute(protoInfo.Proto_libs),
-			Transitive_deps: bazel.MakeLabelListAttribute(protoInfo.Transitive_proto_libs),
-		})
-
-		attrs.Deps.Add(bazel.MakeLabelAttribute(":" + pyProtoLibraryName))
-	}
-
-	// Bazel normally requires `import path.from.top.of.tree` statements in
-	// python code, but with soong you can directly import modules from libraries.
-	// Add "imports" attributes to the bazel library so it matches soong's behavior.
-	imports := "."
-	if m.properties.Pkg_path != nil {
-		// TODO(b/215119317) This is a hack to handle the fact that we don't convert
-		// pkg_path properly right now. If the folder structure that contains this
-		// Android.bp file matches pkg_path, we can set imports to an appropriate
-		// number of ../..s to emulate moving the files under a pkg_path folder.
-		pkg_path := filepath.Clean(*m.properties.Pkg_path)
-		if strings.HasPrefix(pkg_path, "/") {
-			ctx.ModuleErrorf("pkg_path cannot start with a /: %s", pkg_path)
-		}
-
-		if !strings.HasSuffix(ctx.ModuleDir(), "/"+pkg_path) && ctx.ModuleDir() != pkg_path {
-			ctx.ModuleErrorf("Currently, bp2build only supports pkg_paths that are the same as the folders the Android.bp file is in. pkg_path: %s, module directory: %s", pkg_path, ctx.ModuleDir())
-		}
-		numFolders := strings.Count(pkg_path, "/") + 1
-		dots := make([]string, numFolders)
-		for i := 0; i < numFolders; i++ {
-			dots[i] = ".."
-		}
-		imports = strings.Join(dots, "/")
-	}
-	attrs.Imports = bazel.MakeStringListAttribute([]string{imports})
-
-	return attrs
-}
-
-func (m *PythonLibraryModule) bp2buildPythonVersion(ctx android.Bp2buildMutatorContext) *string {
-	py3Enabled := proptools.BoolDefault(m.properties.Version.Py3.Enabled, true)
-	py2Enabled := proptools.BoolDefault(m.properties.Version.Py2.Enabled, false)
-	if py2Enabled && !py3Enabled {
-		return &pyVersion2
-	} else if !py2Enabled && py3Enabled {
-		return &pyVersion3
-	} else if !py2Enabled && !py3Enabled {
-		ctx.ModuleErrorf("bp2build converter doesn't understand having neither py2 nor py3 enabled")
-		return &pyVersion3
-	} else {
-		return &pyVersion2And3
-	}
-}
-
-type bazelPythonBinaryAttributes struct {
-	Main           *bazel.Label
-	Srcs           bazel.LabelListAttribute
-	Deps           bazel.LabelListAttribute
-	Python_version *string
-	Imports        bazel.StringListAttribute
-}
-
-func (p *PythonLibraryModule) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	// TODO(b/182306917): this doesn't fully handle all nested props versioned
-	// by the python version, which would have been handled by the version split
-	// mutator. This is sufficient for very simple python_library modules under
-	// Bionic.
-	baseAttrs := p.makeArchVariantBaseAttributes(ctx)
-	pyVersion := p.bp2buildPythonVersion(ctx)
-	if *pyVersion == pyVersion2And3 {
-		// Libraries default to python 2 and 3
-		pyVersion = nil
-	}
-
-	attrs := &bazelPythonLibraryAttributes{
-		Srcs:         baseAttrs.Srcs,
-		Deps:         baseAttrs.Deps,
-		Srcs_version: pyVersion,
-		Imports:      baseAttrs.Imports,
-	}
-
-	props := bazel.BazelTargetModuleProperties{
-		// Use the native py_library rule.
-		Rule_class: "py_library",
-	}
-
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{
-		Name: p.Name(),
-		Data: baseAttrs.Data,
-	}, attrs)
-}
-
-func (p *PythonBinaryModule) bp2buildBinaryProperties(ctx android.Bp2buildMutatorContext) (*bazelPythonBinaryAttributes, bazel.LabelListAttribute) {
-	// TODO(b/182306917): this doesn't fully handle all nested props versioned
-	// by the python version, which would have been handled by the version split
-	// mutator. This is sufficient for very simple python_binary_host modules
-	// under Bionic.
-
-	baseAttrs := p.makeArchVariantBaseAttributes(ctx)
-	pyVersion := p.bp2buildPythonVersion(ctx)
-	if *pyVersion == pyVersion3 {
-		// Binaries default to python 3
-		pyVersion = nil
-	} else if *pyVersion == pyVersion2And3 {
-		ctx.ModuleErrorf("error for '%s' module: bp2build's python_binary_host converter "+
-			"does not support converting a module that is enabled for both Python 2 and 3 at the "+
-			"same time.", p.Name())
-	}
-
-	attrs := &bazelPythonBinaryAttributes{
-		Main:           nil,
-		Srcs:           baseAttrs.Srcs,
-		Deps:           baseAttrs.Deps,
-		Python_version: pyVersion,
-		Imports:        baseAttrs.Imports,
-	}
-
-	// main is optional.
-	if p.binaryProperties.Main != nil {
-		main := android.BazelLabelForModuleSrcSingle(ctx, *p.binaryProperties.Main)
-		attrs.Main = &main
-	}
-	return attrs, baseAttrs.Data
-}
-
-func (p *PythonBinaryModule) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	attrs, data := p.bp2buildBinaryProperties(ctx)
-
-	props := bazel.BazelTargetModuleProperties{
-		// Use the native py_binary rule.
-		Rule_class: "py_binary",
-	}
-
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{
-		Name: p.Name(),
-		Data: data,
-	}, attrs)
-}
-
-func (p *PythonTestModule) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	// Python tests are currently exactly the same as binaries, but with a different module type
-	attrs, data := p.bp2buildBinaryProperties(ctx)
-
-	props := bazel.BazelTargetModuleProperties{
-		// Use the native py_binary rule.
-		Rule_class:        "py_test",
-		Bzl_load_location: "//build/bazel/rules/python:py_test.bzl",
-	}
-
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{
-		Name: p.Name(),
-		Data: data,
-	}, attrs)
-}
diff --git a/python/python.go b/python/python.go
index b4617c8..79b1515 100644
--- a/python/python.go
+++ b/python/python.go
@@ -129,7 +129,6 @@
 type PythonLibraryModule struct {
 	android.ModuleBase
 	android.DefaultableModuleBase
-	android.BazelModuleBase
 
 	properties      BaseProperties
 	protoProperties android.ProtoProperties
@@ -197,14 +196,6 @@
 	return String(p.properties.Pkg_path)
 }
 
-// PkgPath is the "public" version of `getPkgPath` that is only available during bp2build
-func (p *PythonLibraryModule) PkgPath(ctx android.BazelConversionContext) *string {
-	if ctx.Config().BuildMode != android.Bp2build {
-		ctx.ModuleErrorf("PkgPath is only supported in bp2build mode")
-	}
-	return p.properties.Pkg_path
-}
-
 func (p *PythonLibraryModule) getBaseProperties() *BaseProperties {
 	return &p.properties
 }
@@ -215,7 +206,6 @@
 	p.AddProperties(&p.properties, &p.protoProperties)
 	android.InitAndroidArchModule(p, p.hod, p.multilib)
 	android.InitDefaultableModule(p)
-	android.InitBazelModule(p)
 	return p
 }
 
diff --git a/python/test.go b/python/test.go
index 41c5538..f15a8fc 100644
--- a/python/test.go
+++ b/python/test.go
@@ -102,7 +102,6 @@
 	p.AddProperties(&p.testProperties)
 	android.InitAndroidArchModule(p, p.hod, p.multilib)
 	android.InitDefaultableModule(p)
-	android.InitBazelModule(p)
 	if p.isTestHost() && p.testProperties.Test_options.Unit_test == nil {
 		p.testProperties.Test_options.Unit_test = proptools.BoolPtr(true)
 	}
diff --git a/rust/binary.go b/rust/binary.go
index 5e7e922..9969513 100644
--- a/rust/binary.go
+++ b/rust/binary.go
@@ -15,10 +15,7 @@
 package rust
 
 import (
-	"fmt"
-
 	"android/soong/android"
-	"android/soong/bazel"
 )
 
 func init() {
@@ -63,8 +60,6 @@
 func NewRustBinary(hod android.HostOrDeviceSupported) (*Module, *binaryDecorator) {
 	module := newModule(hod, android.MultilibFirst)
 
-	android.InitBazelModule(module)
-
 	binary := &binaryDecorator{
 		baseCompiler: NewBaseCompiler("bin", "", InstallInSystem),
 	}
@@ -185,88 +180,3 @@
 func (binary *binaryDecorator) testBinary() bool {
 	return false
 }
-
-type rustBinaryLibraryAttributes struct {
-	Srcs            bazel.LabelListAttribute
-	Compile_data    bazel.LabelListAttribute
-	Crate_name      bazel.StringAttribute
-	Edition         bazel.StringAttribute
-	Crate_features  bazel.StringListAttribute
-	Deps            bazel.LabelListAttribute
-	Proc_macro_deps bazel.LabelListAttribute
-	Rustc_flags     bazel.StringListAttribute
-}
-
-func binaryBp2build(ctx android.Bp2buildMutatorContext, m *Module) {
-	binary := m.compiler.(*binaryDecorator)
-
-	var srcs bazel.LabelList
-	var compileData bazel.LabelList
-
-	if binary.baseCompiler.Properties.Srcs[0] == "src/main.rs" {
-		srcs = android.BazelLabelForModuleSrc(ctx, []string{"src/**/*.rs"})
-		compileData = android.BazelLabelForModuleSrc(
-			ctx,
-			[]string{
-				"src/**/*.proto",
-				"examples/**/*.rs",
-				"**/*.md",
-				"templates/**/*.template",
-			},
-		)
-	} else {
-		srcs = android.BazelLabelForModuleSrc(ctx, binary.baseCompiler.Properties.Srcs)
-	}
-
-	deps := android.BazelLabelForModuleDeps(ctx, append(
-		binary.baseCompiler.Properties.Rustlibs,
-	))
-
-	procMacroDeps := android.BazelLabelForModuleDeps(ctx, binary.baseCompiler.Properties.Proc_macros)
-
-	var rustcFLags []string
-	for _, cfg := range binary.baseCompiler.Properties.Cfgs {
-		rustcFLags = append(rustcFLags, fmt.Sprintf("--cfg=%s", cfg))
-	}
-
-	attrs := &rustBinaryLibraryAttributes{
-		Srcs: bazel.MakeLabelListAttribute(
-			srcs,
-		),
-		Compile_data: bazel.MakeLabelListAttribute(
-			compileData,
-		),
-		Crate_name: bazel.StringAttribute{
-			Value: &binary.baseCompiler.Properties.Crate_name,
-		},
-		Edition: bazel.StringAttribute{
-			Value: binary.baseCompiler.Properties.Edition,
-		},
-		Crate_features: bazel.StringListAttribute{
-			Value: binary.baseCompiler.Properties.Features,
-		},
-		Deps: bazel.MakeLabelListAttribute(
-			deps,
-		),
-		Proc_macro_deps: bazel.MakeLabelListAttribute(
-			procMacroDeps,
-		),
-		Rustc_flags: bazel.StringListAttribute{
-			Value: append(
-				rustcFLags,
-				binary.baseCompiler.Properties.Flags...,
-			),
-		},
-	}
-
-	ctx.CreateBazelTargetModule(
-		bazel.BazelTargetModuleProperties{
-			Rule_class:        "rust_binary",
-			Bzl_load_location: "@rules_rust//rust:defs.bzl",
-		},
-		android.CommonAttributes{
-			Name: m.Name(),
-		},
-		attrs,
-	)
-}
diff --git a/rust/config/global.go b/rust/config/global.go
index 3e189b5..377ae58 100644
--- a/rust/config/global.go
+++ b/rust/config/global.go
@@ -51,8 +51,6 @@
 		"-C force-unwind-tables=yes",
 		// Use v0 mangling to distinguish from C++ symbols
 		"-C symbol-mangling-version=v0",
-		// This flag requires to have no space so that when it's exported to bazel
-		// it can be removed. See aosp/2768339
 		"--color=always",
 		"-Z dylib-lto",
 		"-Z link-native-libraries=no",
@@ -145,8 +143,3 @@
 	}
 	return RustDefaultVersion
 }
-
-// BazelRustToolchainVars returns a string with
-func BazelRustToolchainVars(config android.Config) string {
-	return android.BazelToolchainVars(config, ExportedVars)
-}
diff --git a/rust/library.go b/rust/library.go
index c0ff741..199ffbb 100644
--- a/rust/library.go
+++ b/rust/library.go
@@ -21,10 +21,7 @@
 	"strings"
 
 	"android/soong/android"
-	"android/soong/bazel"
 	"android/soong/cc"
-
-	"github.com/google/blueprint/proptools"
 )
 
 var (
@@ -402,8 +399,6 @@
 func NewRustLibrary(hod android.HostOrDeviceSupported) (*Module, *libraryDecorator) {
 	module := newModule(hod, android.MultilibBoth)
 
-	android.InitBazelModule(module)
-
 	library := &libraryDecorator{
 		MutatedProperties: LibraryMutatedProperties{
 			BuildDylib:  false,
@@ -801,184 +796,3 @@
 	// TODO(185577950): If support for generated headers is added, they need to be collected here as well.
 	l.collectedSnapshotHeaders = ret
 }
-
-type rustLibraryAttributes struct {
-	commonLibraryAttrs
-}
-
-type commonLibraryAttrs struct {
-	Srcs            bazel.LabelListAttribute
-	Compile_data    bazel.LabelListAttribute
-	Crate_name      bazel.StringAttribute
-	Edition         bazel.StringAttribute
-	Crate_features  bazel.StringListAttribute
-	Deps            bazel.LabelListAttribute
-	Rustc_flags     bazel.StringListAttribute
-	Proc_macro_deps bazel.LabelListAttribute
-}
-
-func commonLibraryAttrsBp2build(ctx android.Bp2buildMutatorContext, m *Module) *commonLibraryAttrs {
-	lib := m.compiler.(*libraryDecorator)
-
-	srcs, compileData := srcsAndCompileDataAttrs(ctx, *lib.baseCompiler)
-
-	deps := android.BazelLabelForModuleDeps(ctx, append(
-		lib.baseCompiler.Properties.Rustlibs,
-		lib.baseCompiler.Properties.Rlibs...,
-	))
-
-	cargoBuildScript := cargoBuildScriptBp2build(ctx, m)
-	if cargoBuildScript != nil {
-		deps.Add(&bazel.Label{
-			Label: ":" + *cargoBuildScript,
-		})
-	}
-
-	procMacroDeps := android.BazelLabelForModuleDeps(ctx, lib.baseCompiler.Properties.Proc_macros)
-
-	var rustcFLags []string
-	for _, cfg := range lib.baseCompiler.Properties.Cfgs {
-		rustcFLags = append(rustcFLags, fmt.Sprintf("--cfg=%s", cfg))
-	}
-
-	return &commonLibraryAttrs{
-		Srcs: bazel.MakeLabelListAttribute(
-			srcs,
-		),
-		Compile_data: bazel.MakeLabelListAttribute(
-			compileData,
-		),
-		Crate_name: bazel.StringAttribute{
-			Value: &lib.baseCompiler.Properties.Crate_name,
-		},
-		Edition: bazel.StringAttribute{
-			Value: lib.baseCompiler.Properties.Edition,
-		},
-		Crate_features: bazel.StringListAttribute{
-			Value: lib.baseCompiler.Properties.Features,
-		},
-		Deps: bazel.MakeLabelListAttribute(
-			deps,
-		),
-		Proc_macro_deps: bazel.MakeLabelListAttribute(
-			procMacroDeps,
-		),
-		Rustc_flags: bazel.StringListAttribute{
-			Value: append(
-				rustcFLags,
-				lib.baseCompiler.Properties.Flags...,
-			),
-		},
-	}
-
-}
-
-func libraryBp2build(ctx android.Bp2buildMutatorContext, m *Module) {
-	ctx.CreateBazelTargetModule(
-		bazel.BazelTargetModuleProperties{
-			Rule_class:        "rust_library",
-			Bzl_load_location: "@rules_rust//rust:defs.bzl",
-		},
-		android.CommonAttributes{
-			Name: m.Name(),
-		},
-		commonLibraryAttrsBp2build(ctx, m),
-	)
-}
-
-type cargoBuildScriptAttributes struct {
-	Srcs    bazel.LabelListAttribute
-	Edition bazel.StringAttribute
-	Version bazel.StringAttribute
-}
-
-func cargoBuildScriptBp2build(ctx android.Bp2buildMutatorContext, m *Module) *string {
-	// Soong treats some crates like libprotobuf as special in that they have
-	// cargo build script ran to produce an out folder and check it into AOSP
-	// For example, https://cs.android.com/android/platform/superproject/main/+/main:external/rust/crates/protobuf/out/
-	// is produced by cargo build script https://cs.android.com/android/platform/superproject/main/+/main:external/rust/crates/protobuf/build.rs
-	// The out folder is then fed into `rust_library` by a genrule
-	// https://cs.android.com/android/platform/superproject/main/+/main:external/rust/crates/protobuf/Android.bp;l=22
-	// This allows Soong to decouple from cargo completely.
-
-	// Soong decouples from cargo so that it has control over cc compilation.
-	// https://cs.android.com/android/platform/superproject/main/+/main:development/scripts/cargo2android.py;l=1033-1041;drc=8449944a50a0445a5ecaf9b7aed12608c81bf3f1
-	// generates a `cc_library_static` module to have custom cc flags.
-	// Since bp2build will convert the cc modules to cc targets which include the cflags,
-	// Bazel does not need to have this optimization.
-
-	// Performance-wise: rust_library -> cargo_build_script vs rust_library -> genrule (like Soong)
-	// don't have any major difference in build time in Bazel. So using cargo_build_script does not slow
-	// down the build.
-
-	// The benefit of using `cargo_build_script` here is that it would take care of setting correct
-	// `OUT_DIR` for us - similar to what Soong does here
-	// https://cs.android.com/android/platform/superproject/main/+/main:build/soong/rust/builder.go;l=202-218;drc=f29ca58e88c5846bbe8955e5192135e5ab4f14a1
-
-	// TODO(b/297364081): cargo2android.py has logic for when generate/not cc_library_static and out directory
-	// bp2build might be able use the same logic for when to use `cargo_build_script`.
-	// For now, we're building libprotobuf_build_script as a one-off until we have a more principled solution
-	if m.Name() != "libprotobuf" {
-		return nil
-	}
-
-	lib := m.compiler.(*libraryDecorator)
-
-	name := m.Name() + "_build_script"
-	attrs := &cargoBuildScriptAttributes{
-		Srcs: bazel.MakeLabelListAttribute(
-			android.BazelLabelForModuleSrc(ctx, []string{"build.rs"}),
-		),
-		Edition: bazel.StringAttribute{
-			Value: lib.baseCompiler.Properties.Edition,
-		},
-		Version: bazel.StringAttribute{
-			Value: lib.baseCompiler.Properties.Cargo_pkg_version,
-		},
-	}
-
-	// TODO(b/290790800): Remove the restriction when rust toolchain for android is implemented
-	var restriction bazel.BoolAttribute
-	restriction.SetSelectValue(bazel.OsConfigurationAxis, "android", proptools.BoolPtr(false))
-
-	ctx.CreateBazelTargetModuleWithRestrictions(
-		bazel.BazelTargetModuleProperties{
-			Rule_class:        "cargo_build_script",
-			Bzl_load_location: "@rules_rust//cargo:cargo_build_script.bzl",
-		},
-		android.CommonAttributes{
-			Name: name,
-		},
-		attrs,
-		restriction,
-	)
-
-	return &name
-}
-
-type ffiStaticAttributes struct {
-	commonLibraryAttrs
-	Export_includes bazel.StringListAttribute
-}
-
-func ffiStaticBp2build(ctx android.Bp2buildMutatorContext, m *Module) {
-	lib := m.compiler.(*libraryDecorator)
-
-	attrs := &ffiStaticAttributes{
-		Export_includes: bazel.StringListAttribute{
-			Value: lib.Properties.Include_dirs,
-		},
-		commonLibraryAttrs: *commonLibraryAttrsBp2build(ctx, m),
-	}
-
-	ctx.CreateBazelTargetModule(
-		bazel.BazelTargetModuleProperties{
-			Rule_class:        "rust_ffi_static",
-			Bzl_load_location: "//build/bazel/rules/rust:rust_ffi_static.bzl",
-		},
-		android.CommonAttributes{
-			Name: m.Name(),
-		},
-		attrs,
-	)
-}
diff --git a/rust/proc_macro.go b/rust/proc_macro.go
index c18d5ec..b491449 100644
--- a/rust/proc_macro.go
+++ b/rust/proc_macro.go
@@ -15,10 +15,7 @@
 package rust
 
 import (
-	"fmt"
-
 	"android/soong/android"
-	"android/soong/bazel"
 )
 
 func init() {
@@ -50,8 +47,6 @@
 func NewProcMacro(hod android.HostOrDeviceSupported) (*Module, *procMacroDecorator) {
 	module := newModule(hod, android.MultilibFirst)
 
-	android.InitBazelModule(module)
-
 	procMacro := &procMacroDecorator{
 		baseCompiler: NewBaseCompiler("lib", "lib64", InstallInSystem),
 		flagExporter: NewFlagExporter(),
@@ -103,65 +98,3 @@
 	// Proc_macros are never installed
 	return false
 }
-
-type procMacroAttributes struct {
-	Srcs           bazel.LabelListAttribute
-	Compile_data   bazel.LabelListAttribute
-	Crate_name     bazel.StringAttribute
-	Edition        bazel.StringAttribute
-	Crate_features bazel.StringListAttribute
-	Deps           bazel.LabelListAttribute
-	Rustc_flags    bazel.StringListAttribute
-}
-
-func procMacroBp2build(ctx android.Bp2buildMutatorContext, m *Module) {
-	procMacro := m.compiler.(*procMacroDecorator)
-	srcs, compileData := srcsAndCompileDataAttrs(ctx, *procMacro.baseCompiler)
-	deps := android.BazelLabelForModuleDeps(ctx, append(
-		procMacro.baseCompiler.Properties.Rustlibs,
-		procMacro.baseCompiler.Properties.Rlibs...,
-	))
-
-	var rustcFLags []string
-	for _, cfg := range procMacro.baseCompiler.Properties.Cfgs {
-		rustcFLags = append(rustcFLags, fmt.Sprintf("--cfg=%s", cfg))
-	}
-
-	attrs := &procMacroAttributes{
-		Srcs: bazel.MakeLabelListAttribute(
-			srcs,
-		),
-		Compile_data: bazel.MakeLabelListAttribute(
-			compileData,
-		),
-		Crate_name: bazel.StringAttribute{
-			Value: &procMacro.baseCompiler.Properties.Crate_name,
-		},
-		Edition: bazel.StringAttribute{
-			Value: procMacro.baseCompiler.Properties.Edition,
-		},
-		Crate_features: bazel.StringListAttribute{
-			Value: procMacro.baseCompiler.Properties.Features,
-		},
-		Deps: bazel.MakeLabelListAttribute(
-			deps,
-		),
-		Rustc_flags: bazel.StringListAttribute{
-			Value: append(
-				rustcFLags,
-				procMacro.baseCompiler.Properties.Flags...,
-			),
-		},
-	}
-	// m.IsConvertedByBp2build()
-	ctx.CreateBazelTargetModule(
-		bazel.BazelTargetModuleProperties{
-			Rule_class:        "rust_proc_macro",
-			Bzl_load_location: "@rules_rust//rust:defs.bzl",
-		},
-		android.CommonAttributes{
-			Name: m.Name(),
-		},
-		attrs,
-	)
-}
diff --git a/rust/protobuf.go b/rust/protobuf.go
index 2982efd..8d231bb 100644
--- a/rust/protobuf.go
+++ b/rust/protobuf.go
@@ -19,10 +19,7 @@
 	"strings"
 
 	"android/soong/android"
-	"android/soong/bazel"
 	"android/soong/cc"
-
-	"github.com/google/blueprint/proptools"
 )
 
 var (
@@ -282,77 +279,5 @@
 
 	module := NewSourceProviderModule(hod, protobuf, false, false)
 
-	android.InitBazelModule(module)
-
 	return module, protobuf
 }
-
-type rustProtoAttributes struct {
-	Srcs       bazel.LabelListAttribute
-	Crate_name bazel.StringAttribute
-	Deps       bazel.LabelListAttribute
-}
-
-type protoLibraryAttributes struct {
-	Srcs bazel.LabelListAttribute
-}
-
-func protoLibraryBp2build(ctx android.Bp2buildMutatorContext, m *Module) {
-	var protoFiles []string
-
-	for _, propsInterface := range m.sourceProvider.SourceProviderProps() {
-		if possibleProps, ok := propsInterface.(*ProtobufProperties); ok {
-			protoFiles = possibleProps.Protos
-			break
-		}
-	}
-
-	protoLibraryName := m.Name() + "_proto"
-
-	protoDeps := bazel.LabelListAttribute{
-		Value: bazel.LabelList{
-			Includes: []bazel.Label{
-				{
-					Label:              ":" + protoLibraryName,
-					OriginalModuleName: m.Name(),
-				},
-			},
-		},
-	}
-
-	// TODO(b/295918553): Remove androidRestriction after rust toolchain for android is checked in.
-	var androidRestriction bazel.BoolAttribute
-	androidRestriction.SetSelectValue(bazel.OsConfigurationAxis, "android", proptools.BoolPtr(false))
-
-	ctx.CreateBazelTargetModuleWithRestrictions(
-		bazel.BazelTargetModuleProperties{
-			Rule_class: "proto_library",
-		},
-		android.CommonAttributes{
-			Name: protoLibraryName,
-		},
-		&protoLibraryAttributes{
-			Srcs: bazel.MakeLabelListAttribute(
-				android.BazelLabelForModuleSrc(ctx, protoFiles),
-			),
-		},
-		androidRestriction,
-	)
-
-	ctx.CreateBazelTargetModuleWithRestrictions(
-		bazel.BazelTargetModuleProperties{
-			Rule_class:        "rust_proto_library",
-			Bzl_load_location: "@rules_rust//proto/protobuf:defs.bzl",
-		},
-		android.CommonAttributes{
-			Name: m.Name(),
-		},
-		&rustProtoAttributes{
-			Crate_name: bazel.StringAttribute{
-				Value: proptools.StringPtr(m.CrateName()),
-			},
-			Deps: protoDeps,
-		},
-		androidRestriction,
-	)
-}
diff --git a/rust/rust.go b/rust/rust.go
index ddebb75..02ec22d 100644
--- a/rust/rust.go
+++ b/rust/rust.go
@@ -18,11 +18,8 @@
 	"fmt"
 	"strings"
 
-	"android/soong/bazel"
 	"android/soong/bloaty"
 	"android/soong/testing"
-	"android/soong/ui/metrics/bp2build_metrics_proto"
-
 	"github.com/google/blueprint"
 	"github.com/google/blueprint/proptools"
 
@@ -176,8 +173,6 @@
 
 	transitiveAndroidMkSharedLibs *android.DepSet[string]
 
-	android.BazelModuleBase
-
 	// Aconfig files for all transitive deps.  Also exposed via TransitiveDeclarationsInfo
 	mergedAconfigFiles map[string]android.Paths
 }
@@ -1856,48 +1851,6 @@
 	return ""
 }
 
-func (m *Module) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	if ctx.ModuleType() == "rust_library_host" || ctx.ModuleType() == "rust_library" {
-		libraryBp2build(ctx, m)
-	} else if ctx.ModuleType() == "rust_proc_macro" {
-		procMacroBp2build(ctx, m)
-	} else if ctx.ModuleType() == "rust_binary_host" {
-		binaryBp2build(ctx, m)
-	} else if ctx.ModuleType() == "rust_protobuf_host" || ctx.ModuleType() == "rust_protobuf" {
-		protoLibraryBp2build(ctx, m)
-	} else if ctx.ModuleType() == "rust_ffi_static" {
-		ffiStaticBp2build(ctx, m)
-	} else {
-		ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_TYPE_UNSUPPORTED, "")
-	}
-}
-
-// This is a workaround by assuming the conventions that rust crate repos are structured
-// while waiting for the sandboxing work to complete.
-// TODO(b/297344471): When crate_root prop is set which enforces inputs sandboxing,
-// always use `srcs` and `compile_data` props to generate `srcs` and `compile_data` attributes
-// instead of using globs.
-func srcsAndCompileDataAttrs(ctx android.Bp2buildMutatorContext, c baseCompiler) (bazel.LabelList, bazel.LabelList) {
-	var srcs bazel.LabelList
-	var compileData bazel.LabelList
-
-	if c.Properties.Srcs[0] == "src/lib.rs" {
-		srcs = android.BazelLabelForModuleSrc(ctx, []string{"src/**/*.rs"})
-		compileData = android.BazelLabelForModuleSrc(
-			ctx,
-			[]string{
-				"src/**/*.proto",
-				"examples/**/*.rs",
-				"**/*.md",
-			},
-		)
-	} else {
-		srcs = android.BazelLabelForModuleSrc(ctx, c.Properties.Srcs)
-	}
-
-	return srcs, compileData
-}
-
 var Bool = proptools.Bool
 var BoolDefault = proptools.BoolDefault
 var String = proptools.String
diff --git a/sh/sh_binary.go b/sh/sh_binary.go
index 7962749..1e27375 100644
--- a/sh/sh_binary.go
+++ b/sh/sh_binary.go
@@ -24,7 +24,6 @@
 	"github.com/google/blueprint/proptools"
 
 	"android/soong/android"
-	"android/soong/bazel"
 	"android/soong/cc"
 	"android/soong/snapshot"
 	"android/soong/tradefed"
@@ -155,7 +154,6 @@
 
 type ShBinary struct {
 	android.ModuleBase
-	android.BazelModuleBase
 
 	properties shBinaryProperties
 
@@ -490,18 +488,15 @@
 	}}
 }
 
-func initShBinaryModule(s *ShBinary, useBazel bool) {
+func initShBinaryModule(s *ShBinary) {
 	s.AddProperties(&s.properties)
-	if useBazel {
-		android.InitBazelModule(s)
-	}
 }
 
 // sh_binary is for a shell script or batch file to be installed as an
 // executable binary to <partition>/bin.
 func ShBinaryFactory() android.Module {
 	module := &ShBinary{}
-	initShBinaryModule(module, true)
+	initShBinaryModule(module)
 	android.InitAndroidArchModule(module, android.HostAndDeviceSupported, android.MultilibFirst)
 	return module
 }
@@ -510,7 +505,7 @@
 // to $(HOST_OUT)/bin.
 func ShBinaryHostFactory() android.Module {
 	module := &ShBinary{}
-	initShBinaryModule(module, true)
+	initShBinaryModule(module)
 	android.InitAndroidArchModule(module, android.HostSupported, android.MultilibFirst)
 	return module
 }
@@ -518,7 +513,7 @@
 // sh_test defines a shell script based test module.
 func ShTestFactory() android.Module {
 	module := &ShTest{}
-	initShBinaryModule(&module.ShBinary, true)
+	initShBinaryModule(&module.ShBinary)
 	module.AddProperties(&module.testProperties)
 
 	android.InitAndroidArchModule(module, android.HostAndDeviceSupported, android.MultilibFirst)
@@ -528,7 +523,7 @@
 // sh_test_host defines a shell script based test module that runs on a host.
 func ShTestHostFactory() android.Module {
 	module := &ShTest{}
-	initShBinaryModule(&module.ShBinary, true)
+	initShBinaryModule(&module.ShBinary)
 	module.AddProperties(&module.testProperties)
 	// Default sh_test_host to unit_tests = true
 	if module.testProperties.Test_options.Unit_test == nil {
@@ -539,117 +534,6 @@
 	return module
 }
 
-type bazelShBinaryAttributes struct {
-	Srcs     bazel.LabelListAttribute
-	Filename *string
-	Sub_dir  *string
-	// Bazel also supports the attributes below, but (so far) these are not required for Bionic
-	// deps
-	// data
-	// args
-	// compatible_with
-	// deprecation
-	// distribs
-	// env
-	// exec_compatible_with
-	// exec_properties
-	// features
-	// licenses
-	// output_licenses
-	// restricted_to
-	// tags
-	// target_compatible_with
-	// testonly
-	// toolchains
-	// visibility
-}
-
-type bazelShTestAttributes struct {
-	Srcs      bazel.LabelListAttribute
-	Data      bazel.LabelListAttribute
-	Data_bins bazel.LabelListAttribute
-	Tags      bazel.StringListAttribute
-	Runs_on   bazel.StringListAttribute
-	tradefed.TestConfigAttributes
-}
-
-func (m *ShBinary) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	srcs := bazel.MakeLabelListAttribute(
-		android.BazelLabelForModuleSrc(ctx, []string{*m.properties.Src}))
-
-	var filename *string
-	if m.properties.Filename != nil {
-		filename = m.properties.Filename
-	}
-
-	var subDir *string
-	if m.properties.Sub_dir != nil {
-		subDir = m.properties.Sub_dir
-	}
-
-	attrs := &bazelShBinaryAttributes{
-		Srcs:     srcs,
-		Filename: filename,
-		Sub_dir:  subDir,
-	}
-
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "sh_binary",
-		Bzl_load_location: "//build/bazel/rules:sh_binary.bzl",
-	}
-
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: m.Name()}, attrs)
-}
-
-func (m *ShTest) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	srcs := bazel.MakeLabelListAttribute(
-		android.BazelLabelForModuleSrc(ctx, []string{*m.properties.Src}))
-
-	dataBins := bazel.MakeLabelListAttribute(android.BazelLabelForModuleDeps(ctx, m.testProperties.Data_bins))
-
-	var combinedData bazel.LabelList
-	combinedData.Append(android.BazelLabelForModuleSrc(ctx, m.testProperties.Data))
-	combinedData.Append(android.BazelLabelForModuleDeps(ctx, m.testProperties.Data_bins))
-	combinedData.Append(android.BazelLabelForModuleDeps(ctx, m.testProperties.Data_libs))
-	data := bazel.MakeLabelListAttribute(combinedData)
-
-	tags := bazel.MakeStringListAttribute(
-		m.testProperties.Test_options.Tags)
-
-	testConfigAttributes := tradefed.GetTestConfigAttributes(
-		ctx,
-		m.testProperties.Test_config,
-		[]string{},
-		m.testProperties.Auto_gen_config,
-		m.testProperties.Test_suites,
-		m.testProperties.Test_config_template,
-		nil,
-		nil,
-	)
-
-	unitTest := m.testProperties.Test_options.Unit_test
-
-	runs_on := bazel.MakeStringListAttribute(android.RunsOn(
-		m.ModuleBase.HostSupported(),
-		m.ModuleBase.DeviceSupported(),
-		(unitTest != nil && *unitTest)))
-
-	attrs := &bazelShTestAttributes{
-		Srcs:                 srcs,
-		Data:                 data,
-		Data_bins:            dataBins,
-		Tags:                 tags,
-		Runs_on:              runs_on,
-		TestConfigAttributes: testConfigAttributes,
-	}
-
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "sh_test",
-		Bzl_load_location: "//build/bazel/rules:sh_test.bzl",
-	}
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: m.Name()}, attrs)
-}
-
 var Bool = proptools.Bool
 
 var _ snapshot.RelativeInstallPath = (*ShBinary)(nil)
diff --git a/sysprop/Android.bp b/sysprop/Android.bp
index 7f51000..1d5eb31 100644
--- a/sysprop/Android.bp
+++ b/sysprop/Android.bp
@@ -9,10 +9,8 @@
         "blueprint",
         "soong",
         "soong-android",
-        "soong-bp2build",
         "soong-cc",
         "soong-java",
-        "soong-sysprop-bp2build",
     ],
     srcs: [
         "sysprop_library.go",
@@ -20,7 +18,6 @@
     ],
     testSrcs: [
         "sysprop_test.go",
-        "sysprop_library_conversion_test.go",
     ],
     pluginFor: ["soong_build"],
 }
diff --git a/sysprop/bp2build/Android.bp b/sysprop/bp2build/Android.bp
deleted file mode 100644
index 1b9eda8..0000000
--- a/sysprop/bp2build/Android.bp
+++ /dev/null
@@ -1,16 +0,0 @@
-package {
-    default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
-bootstrap_go_package {
-    name: "soong-sysprop-bp2build",
-    pkgPath: "android/soong/sysprop/bp2build",
-    deps: [
-        "soong-android",
-        "soong-bazel",
-    ],
-    srcs: [
-        "bp2build.go",
-    ],
-    pluginFor: ["soong_build"],
-}
diff --git a/sysprop/bp2build/bp2build.go b/sysprop/bp2build/bp2build.go
deleted file mode 100644
index 18991de..0000000
--- a/sysprop/bp2build/bp2build.go
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright (C) 2019 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package bp2build
-
-import (
-	"android/soong/android"
-	"android/soong/bazel"
-)
-
-type SyspropLibraryLabels struct {
-	SyspropLibraryLabel  string
-	CcSharedLibraryLabel string
-	CcStaticLibraryLabel string
-	JavaLibraryLabel     string
-}
-
-// TODO(b/240463568): Additional properties will be added for API validation
-type bazelSyspropLibraryAttributes struct {
-	Srcs bazel.LabelListAttribute
-	Tags bazel.StringListAttribute
-}
-
-func Bp2buildBaseSyspropLibrary(ctx android.Bp2buildMutatorContext, name string, srcs bazel.LabelListAttribute) {
-	apexAvailableTags := android.ApexAvailableTagsWithoutTestApexes(ctx.(android.Bp2buildMutatorContext), ctx.Module())
-
-	ctx.CreateBazelTargetModule(
-		bazel.BazelTargetModuleProperties{
-			Rule_class:        "sysprop_library",
-			Bzl_load_location: "//build/bazel/rules/sysprop:sysprop_library.bzl",
-		},
-		android.CommonAttributes{Name: name},
-		&bazelSyspropLibraryAttributes{
-			Srcs: srcs,
-			Tags: apexAvailableTags,
-		},
-	)
-}
-
-type bazelCcSyspropLibraryAttributes struct {
-	Dep             bazel.LabelAttribute
-	Min_sdk_version *string
-	Tags            bazel.StringListAttribute
-}
-
-func Bp2buildSyspropCc(ctx android.Bp2buildMutatorContext, labels SyspropLibraryLabels, minSdkVersion *string) {
-	apexAvailableTags := android.ApexAvailableTagsWithoutTestApexes(ctx.(android.Bp2buildMutatorContext), ctx.Module())
-
-	attrs := &bazelCcSyspropLibraryAttributes{
-		Dep:             *bazel.MakeLabelAttribute(":" + labels.SyspropLibraryLabel),
-		Min_sdk_version: minSdkVersion,
-		Tags:            apexAvailableTags,
-	}
-
-	if labels.CcSharedLibraryLabel != "" {
-		ctx.CreateBazelTargetModule(
-			bazel.BazelTargetModuleProperties{
-				Rule_class:        "cc_sysprop_library_shared",
-				Bzl_load_location: "//build/bazel/rules/cc:cc_sysprop_library.bzl",
-			},
-			android.CommonAttributes{Name: labels.CcSharedLibraryLabel},
-			attrs)
-	}
-	if labels.CcStaticLibraryLabel != "" {
-		ctx.CreateBazelTargetModule(
-			bazel.BazelTargetModuleProperties{
-				Rule_class:        "cc_sysprop_library_static",
-				Bzl_load_location: "//build/bazel/rules/cc:cc_sysprop_library.bzl",
-			},
-			android.CommonAttributes{Name: labels.CcStaticLibraryLabel},
-			attrs)
-	}
-}
-
-type bazelJavaLibraryAttributes struct {
-	Dep             bazel.LabelAttribute
-	Min_sdk_version *string
-	Tags            bazel.StringListAttribute
-}
-
-func Bp2buildSyspropJava(ctx android.Bp2buildMutatorContext, labels SyspropLibraryLabels, minSdkVersion *string) {
-	apexAvailableTags := android.ApexAvailableTagsWithoutTestApexes(ctx.(android.Bp2buildMutatorContext), ctx.Module())
-
-	ctx.CreateBazelTargetModule(
-		bazel.BazelTargetModuleProperties{
-			Rule_class:        "java_sysprop_library",
-			Bzl_load_location: "//build/bazel/rules/java:java_sysprop_library.bzl",
-		},
-		android.CommonAttributes{Name: labels.JavaLibraryLabel},
-		&bazelJavaLibraryAttributes{
-			Dep:             *bazel.MakeLabelAttribute(":" + labels.SyspropLibraryLabel),
-			Min_sdk_version: minSdkVersion,
-			Tags:            apexAvailableTags,
-		})
-}
diff --git a/sysprop/sysprop_library.go b/sysprop/sysprop_library.go
index 013624f..c89c6b0 100644
--- a/sysprop/sysprop_library.go
+++ b/sysprop/sysprop_library.go
@@ -23,10 +23,6 @@
 	"path"
 	"sync"
 
-	"android/soong/bazel"
-	"android/soong/sysprop/bp2build"
-	"android/soong/ui/metrics/bp2build_metrics_proto"
-
 	"github.com/google/blueprint"
 	"github.com/google/blueprint/proptools"
 
@@ -129,7 +125,6 @@
 type syspropLibrary struct {
 	android.ModuleBase
 	android.ApexModuleBase
-	android.BazelModuleBase
 
 	properties syspropLibraryProperties
 
@@ -238,10 +233,6 @@
 	return m.BaseModuleName() + "_java_gen_public"
 }
 
-func (m *syspropLibrary) bp2buildJavaImplementationModuleName() string {
-	return m.BaseModuleName() + "_java_library"
-}
-
 func (m *syspropLibrary) BaseModuleName() string {
 	return m.ModuleBase.Name()
 }
@@ -390,7 +381,6 @@
 	)
 	android.InitAndroidModule(m)
 	android.InitApexModule(m)
-	android.InitBazelModule(m)
 	android.AddLoadHook(m, func(ctx android.LoadHookContext) { syspropLibraryHook(ctx, m) })
 	return m
 }
@@ -424,9 +414,6 @@
 	Min_sdk_version    *string
 	Cflags             []string
 	Ldflags            []string
-	Bazel_module       struct {
-		Label *string
-	}
 }
 
 type javaLibraryProperties struct {
@@ -443,10 +430,6 @@
 	SyspropPublicStub string
 	Apex_available    []string
 	Min_sdk_version   *string
-	Bazel_module      struct {
-		Bp2build_available *bool
-		Label              *string
-	}
 }
 
 func syspropLibraryHook(ctx android.LoadHookContext, m *syspropLibrary) {
@@ -492,14 +475,6 @@
 			"Unknown value %s: must be one of Platform, Vendor or Odm", m.Owner())
 	}
 
-	var label *string
-	if b, ok := ctx.Module().(android.Bazelable); ok && b.ShouldConvertWithBp2build(ctx) {
-		// TODO: b/295566168 - this will need to change once build files are checked in to account for
-		// checked in modules in mixed builds
-		label = proptools.StringPtr(
-			fmt.Sprintf("//%s:%s", ctx.ModuleDir(), m.CcImplementationModuleName()))
-	}
-
 	// Generate a C++ implementation library.
 	// cc_library can receive *.sysprop files as their srcs, generating sources itself.
 	ccProps := ccLibraryProperties{}
@@ -521,7 +496,6 @@
 	ccProps.Min_sdk_version = m.properties.Cpp.Min_sdk_version
 	ccProps.Cflags = m.properties.Cpp.Cflags
 	ccProps.Ldflags = m.properties.Cpp.Ldflags
-	ccProps.Bazel_module.Label = label
 	ctx.CreateModule(cc.LibraryFactory, &ccProps)
 
 	scope := "internal"
@@ -566,13 +540,6 @@
 		SyspropPublicStub: publicStub,
 		Apex_available:    m.ApexProperties.Apex_available,
 		Min_sdk_version:   m.properties.Java.Min_sdk_version,
-		Bazel_module: struct {
-			Bp2build_available *bool
-			Label              *string
-		}{
-			Label: proptools.StringPtr(
-				fmt.Sprintf("//%s:%s", ctx.ModuleDir(), m.bp2buildJavaImplementationModuleName())),
-		},
 	})
 
 	if publicStub != "" {
@@ -590,12 +557,6 @@
 			Sdk_version: proptools.StringPtr("core_current"),
 			Libs:        []string{javaSyspropStub},
 			Stem:        proptools.StringPtr(m.BaseModuleName()),
-			Bazel_module: struct {
-				Bp2build_available *bool
-				Label              *string
-			}{
-				Bp2build_available: proptools.BoolPtr(false),
-			},
 		})
 	}
 
@@ -609,20 +570,3 @@
 		*libraries = append(*libraries, "//"+ctx.ModuleDir()+":"+ctx.ModuleName())
 	}
 }
-
-// TODO(b/240463568): Additional properties will be added for API validation
-func (m *syspropLibrary) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	if m.Owner() != "Platform" {
-		ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_UNSUPPORTED, "Only sysprop libraries owned by platform are supported at this time")
-		return
-	}
-	labels := bp2build.SyspropLibraryLabels{
-		SyspropLibraryLabel:  m.BaseModuleName(),
-		CcSharedLibraryLabel: m.CcImplementationModuleName(),
-		CcStaticLibraryLabel: cc.BazelLabelNameForStaticModule(m.CcImplementationModuleName()),
-		JavaLibraryLabel:     m.bp2buildJavaImplementationModuleName(),
-	}
-	bp2build.Bp2buildBaseSyspropLibrary(ctx, labels.SyspropLibraryLabel, bazel.MakeLabelListAttribute(android.BazelLabelForModuleSrc(ctx, m.properties.Srcs)))
-	bp2build.Bp2buildSyspropCc(ctx, labels, m.properties.Cpp.Min_sdk_version)
-	bp2build.Bp2buildSyspropJava(ctx, labels, m.properties.Java.Min_sdk_version)
-}
diff --git a/sysprop/sysprop_library_conversion_test.go b/sysprop/sysprop_library_conversion_test.go
deleted file mode 100644
index dabcc92..0000000
--- a/sysprop/sysprop_library_conversion_test.go
+++ /dev/null
@@ -1,195 +0,0 @@
-// Copyright 2022 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package sysprop
-
-import (
-	"testing"
-
-	"android/soong/bp2build"
-)
-
-func TestSyspropLibrarySimple(t *testing.T) {
-	bp2build.RunBp2BuildTestCaseSimple(t, bp2build.Bp2buildTestCase{
-		Description:                "sysprop_library simple",
-		ModuleTypeUnderTest:        "sysprop_library",
-		ModuleTypeUnderTestFactory: syspropLibraryFactory,
-		Filesystem: map[string]string{
-			"foo.sysprop": "",
-			"bar.sysprop": "",
-		},
-		Blueprint: `
-sysprop_library {
-	name: "sysprop_foo",
-	srcs: [
-		"foo.sysprop",
-		"bar.sysprop",
-	],
-	property_owner: "Platform",
-}
-`,
-		ExpectedBazelTargets: []string{
-			bp2build.MakeBazelTargetNoRestrictions("sysprop_library",
-				"sysprop_foo",
-				bp2build.AttrNameToString{
-					"srcs": `[
-        "foo.sysprop",
-        "bar.sysprop",
-    ]`,
-				}),
-			bp2build.MakeBazelTargetNoRestrictions("cc_sysprop_library_shared",
-				"libsysprop_foo",
-				bp2build.AttrNameToString{
-					"dep": `":sysprop_foo"`,
-				}),
-			bp2build.MakeBazelTargetNoRestrictions("cc_sysprop_library_static",
-				"libsysprop_foo_bp2build_cc_library_static",
-				bp2build.AttrNameToString{
-					"dep": `":sysprop_foo"`,
-				}),
-			bp2build.MakeBazelTargetNoRestrictions("java_sysprop_library",
-				"sysprop_foo_java_library",
-				bp2build.AttrNameToString{
-					"dep": `":sysprop_foo"`,
-				}),
-		},
-	})
-}
-
-func TestSyspropLibraryCppMinSdkVersion(t *testing.T) {
-	bp2build.RunBp2BuildTestCaseSimple(t, bp2build.Bp2buildTestCase{
-		Description:                "sysprop_library with cpp min_sdk_version",
-		ModuleTypeUnderTest:        "sysprop_library",
-		ModuleTypeUnderTestFactory: syspropLibraryFactory,
-		Filesystem: map[string]string{
-			"foo.sysprop": "",
-			"bar.sysprop": "",
-		},
-		Blueprint: `
-sysprop_library {
-	name: "sysprop_foo",
-	srcs: [
-		"foo.sysprop",
-		"bar.sysprop",
-	],
-	cpp: {
-		min_sdk_version: "5",
-	},
-	property_owner: "Platform",
-}
-`,
-		ExpectedBazelTargets: []string{
-			bp2build.MakeBazelTargetNoRestrictions("sysprop_library",
-				"sysprop_foo",
-				bp2build.AttrNameToString{
-					"srcs": `[
-        "foo.sysprop",
-        "bar.sysprop",
-    ]`,
-				}),
-			bp2build.MakeBazelTargetNoRestrictions("cc_sysprop_library_shared",
-				"libsysprop_foo",
-				bp2build.AttrNameToString{
-					"dep":             `":sysprop_foo"`,
-					"min_sdk_version": `"5"`,
-				}),
-			bp2build.MakeBazelTargetNoRestrictions("cc_sysprop_library_static",
-				"libsysprop_foo_bp2build_cc_library_static",
-				bp2build.AttrNameToString{
-					"dep":             `":sysprop_foo"`,
-					"min_sdk_version": `"5"`,
-				}),
-			bp2build.MakeBazelTargetNoRestrictions("java_sysprop_library",
-				"sysprop_foo_java_library",
-				bp2build.AttrNameToString{
-					"dep": `":sysprop_foo"`,
-				}),
-		},
-	})
-}
-
-func TestSyspropLibraryJavaMinSdkVersion(t *testing.T) {
-	bp2build.RunBp2BuildTestCaseSimple(t, bp2build.Bp2buildTestCase{
-		Description:                "sysprop_library with java min_sdk_version",
-		ModuleTypeUnderTest:        "sysprop_library",
-		ModuleTypeUnderTestFactory: syspropLibraryFactory,
-		Filesystem: map[string]string{
-			"foo.sysprop": "",
-			"bar.sysprop": "",
-		},
-		Blueprint: `
-sysprop_library {
-	name: "sysprop_foo",
-	srcs: [
-		"foo.sysprop",
-		"bar.sysprop",
-	],
-	java: {
-		min_sdk_version: "5",
-	},
-	property_owner: "Platform",
-}
-`,
-		ExpectedBazelTargets: []string{
-			bp2build.MakeBazelTargetNoRestrictions("sysprop_library",
-				"sysprop_foo",
-				bp2build.AttrNameToString{
-					"srcs": `[
-        "foo.sysprop",
-        "bar.sysprop",
-    ]`,
-				}),
-			bp2build.MakeBazelTargetNoRestrictions("cc_sysprop_library_shared",
-				"libsysprop_foo",
-				bp2build.AttrNameToString{
-					"dep": `":sysprop_foo"`,
-				}),
-			bp2build.MakeBazelTargetNoRestrictions("cc_sysprop_library_static",
-				"libsysprop_foo_bp2build_cc_library_static",
-				bp2build.AttrNameToString{
-					"dep": `":sysprop_foo"`,
-				}),
-			bp2build.MakeBazelTargetNoRestrictions("java_sysprop_library",
-				"sysprop_foo_java_library",
-				bp2build.AttrNameToString{
-					"dep":             `":sysprop_foo"`,
-					"min_sdk_version": `"5"`,
-				}),
-		},
-	})
-}
-
-func TestSyspropLibraryOwnerNotPlatformUnconvertible(t *testing.T) {
-	bp2build.RunBp2BuildTestCaseSimple(t, bp2build.Bp2buildTestCase{
-		Description:                "sysprop_library simple",
-		ModuleTypeUnderTest:        "sysprop_library",
-		ModuleTypeUnderTestFactory: syspropLibraryFactory,
-		Filesystem: map[string]string{
-			"foo.sysprop": "",
-			"bar.sysprop": "",
-		},
-		Blueprint: `
-sysprop_library {
-	name: "sysprop_foo",
-	srcs: [
-		"foo.sysprop",
-		"bar.sysprop",
-	],
-	property_owner: "Vendor",
-	device_specific: true,
-}
-`,
-		ExpectedBazelTargets: []string{},
-	})
-}
diff --git a/testing/code_metadata.go b/testing/code_metadata.go
index 4550283..9e20ec6 100644
--- a/testing/code_metadata.go
+++ b/testing/code_metadata.go
@@ -36,7 +36,6 @@
 type CodeMetadataModule struct {
 	android.ModuleBase
 	android.DefaultableModuleBase
-	android.BazelModuleBase
 
 	// Properties for "code_metadata"
 	properties struct {
diff --git a/testing/test_spec.go b/testing/test_spec.go
index c370f71..58d9c23 100644
--- a/testing/test_spec.go
+++ b/testing/test_spec.go
@@ -40,7 +40,6 @@
 type TestSpecModule struct {
 	android.ModuleBase
 	android.DefaultableModuleBase
-	android.BazelModuleBase
 
 	// Properties for "test_spec"
 	properties struct {
diff --git a/tradefed/Android.bp b/tradefed/Android.bp
index a161108..f0336a3 100644
--- a/tradefed/Android.bp
+++ b/tradefed/Android.bp
@@ -11,7 +11,6 @@
     ],
     srcs: [
         "autogen.go",
-        "autogen_bazel.go",
         "config.go",
         "makevars.go",
     ],
diff --git a/tradefed/autogen_bazel.go b/tradefed/autogen_bazel.go
deleted file mode 100644
index cc16176..0000000
--- a/tradefed/autogen_bazel.go
+++ /dev/null
@@ -1,111 +0,0 @@
-// Copyright 2022 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package tradefed
-
-import (
-	"android/soong/android"
-	"android/soong/bazel"
-
-	"github.com/google/blueprint/proptools"
-)
-
-const (
-	InstrumentationTestConfigTemplate  = "build/make/core/instrumentation_test_config_template.xml"
-	JavaTestConfigTemplate             = "build/make/core/java_test_config_template.xml"
-	JavaHostTestConfigTemplate         = "build/make/core/java_host_test_config_template.xml"
-	JavaHostUnitTestConfigTemplate     = "build/make/core/java_host_unit_test_config_template.xml"
-	NativeBenchmarkTestConfigTemplate  = "build/make/core/native_benchmark_test_config_template.xml"
-	NativeHostTestConfigTemplate       = "build/make/core/native_host_test_config_template.xml"
-	NativeTestConfigTemplate           = "build/make/core/native_test_config_template.xml"
-	PythonBinaryHostTestConfigTemplate = "build/make/core/python_binary_host_test_config_template.xml"
-	RustDeviceTestConfigTemplate       = "build/make/core/rust_device_test_config_template.xml"
-	RustHostTestConfigTemplate         = "build/make/core/rust_host_test_config_template.xml"
-	RustDeviceBenchmarkConfigTemplate  = "build/make/core/rust_device_benchmark_config_template.xml"
-	RustHostBenchmarkConfigTemplate    = "build/make/core/rust_host_benchmark_config_template.xml"
-	RobolectricTestConfigTemplate      = "build/make/core/robolectric_test_config_template.xml"
-	ShellTestConfigTemplate            = "build/make/core/shell_test_config_template.xml"
-)
-
-type TestConfigAttributes struct {
-	Test_config    *bazel.Label
-	Dynamic_config *bazel.Label
-
-	Auto_generate_test_config *bool
-	Template_test_config      *bazel.Label
-	Template_configs          []string
-	Template_install_base     *string
-}
-
-func GetTestConfigAttributes(
-	ctx android.Bp2buildMutatorContext,
-	testConfig *string,
-	extraTestConfigs []string,
-	autoGenConfig *bool,
-	testSuites []string,
-	template *string,
-	templateConfigs []Config,
-	templateInstallBase *string) TestConfigAttributes {
-
-	attrs := TestConfigAttributes{}
-
-	dynamicConfig := "DynamicConfig.xml"
-	c, _ := android.BazelStringOrLabelFromProp(ctx, &dynamicConfig)
-	attrs.Dynamic_config = c.Value
-
-	attrs.Test_config = GetTestConfig(ctx, testConfig)
-	// do not generate a test config if
-	// 1) test config already found
-	// 2) autoGenConfig == false
-	// 3) CTS tests and no template specified.
-	// CTS Modules can be used for test data, so test config files must be explicitly specified.
-	if (attrs.Template_test_config != nil) ||
-		proptools.Bool(autoGenConfig) == false ||
-		(template == nil && !android.InList("cts", testSuites)) {
-
-		return attrs
-	}
-
-	// Add properties for the bazel rule to generate a test config
-	// since a test config was not specified.
-	templateLabel := android.BazelLabelForModuleSrcSingle(ctx, *template)
-	attrs.Template_test_config = &templateLabel
-	attrs.Auto_generate_test_config = autoGenConfig
-	var configStrings []string
-	for _, c := range templateConfigs {
-		configString := proptools.NinjaAndShellEscape(c.Config())
-		configStrings = append(configStrings, configString)
-	}
-	attrs.Template_configs = configStrings
-	attrs.Template_install_base = templateInstallBase
-	return attrs
-}
-
-func GetTestConfig(
-	ctx android.Bp2buildMutatorContext,
-	testConfig *string,
-) *bazel.Label {
-
-	if testConfig != nil {
-		c, _ := android.BazelStringOrLabelFromProp(ctx, testConfig)
-		if c.Value != nil {
-			return c.Value
-		}
-	}
-
-	// check for default AndroidTest.xml
-	defaultTestConfigPath := "AndroidTest.xml"
-	c, _ := android.BazelStringOrLabelFromProp(ctx, &defaultTestConfigPath)
-	return c.Value
-}
diff --git a/xml/Android.bp b/xml/Android.bp
index d4753de..1542930 100644
--- a/xml/Android.bp
+++ b/xml/Android.bp
@@ -9,7 +9,6 @@
         "blueprint",
         "blueprint-pathtools",
         "soong",
-        "soong-bp2build",
         "soong-android",
         "soong-etc",
     ],
@@ -19,7 +18,6 @@
     ],
     testSrcs: [
         "xml_test.go",
-        "xml_conversion_test.go",
     ],
     pluginFor: ["soong_build"],
 }
diff --git a/xml/xml.go b/xml/xml.go
index 65fe12a..c281078 100644
--- a/xml/xml.go
+++ b/xml/xml.go
@@ -16,7 +16,6 @@
 
 import (
 	"android/soong/android"
-	"android/soong/bazel"
 	"android/soong/etc"
 
 	"github.com/google/blueprint"
@@ -68,8 +67,6 @@
 }
 
 type prebuiltEtcXml struct {
-	android.BazelModuleBase
-
 	etc.PrebuiltEtc
 
 	properties prebuiltEtcXmlProperties
@@ -132,44 +129,5 @@
 	etc.InitPrebuiltEtcModule(&module.PrebuiltEtc, "etc")
 	// This module is device-only
 	android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibFirst)
-	android.InitBazelModule(module)
 	return module
 }
-
-type bazelPrebuiltEtcXmlAttributes struct {
-	Src               bazel.LabelAttribute
-	Filename          bazel.LabelAttribute
-	Dir               string
-	Installable       bazel.BoolAttribute
-	Filename_from_src bazel.BoolAttribute
-	Schema            *string
-}
-
-func (p *prebuiltEtcXml) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
-	baseAttrs, convertible := p.PrebuiltEtc.Bp2buildHelper(ctx)
-
-	if !convertible {
-		return
-	}
-
-	var schema *string
-	if p.properties.Schema != nil {
-		schema = p.properties.Schema
-	}
-
-	attrs := &bazelPrebuiltEtcXmlAttributes{
-		Src:               baseAttrs.Src,
-		Filename:          baseAttrs.Filename,
-		Dir:               baseAttrs.Dir,
-		Installable:       baseAttrs.Installable,
-		Filename_from_src: baseAttrs.Filename_from_src,
-		Schema:            schema,
-	}
-
-	props := bazel.BazelTargetModuleProperties{
-		Rule_class:        "prebuilt_xml",
-		Bzl_load_location: "//build/bazel/rules/prebuilt_xml.bzl",
-	}
-
-	ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: p.Name()}, attrs)
-}
diff --git a/xml/xml_conversion_test.go b/xml/xml_conversion_test.go
deleted file mode 100644
index c052b44..0000000
--- a/xml/xml_conversion_test.go
+++ /dev/null
@@ -1,129 +0,0 @@
-// Copyright 2022 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package xml
-
-import (
-	"android/soong/android"
-	"android/soong/bp2build"
-
-	"testing"
-)
-
-func runXmlPrebuiltEtcTestCase(t *testing.T, tc bp2build.Bp2buildTestCase) {
-	t.Helper()
-	(&tc).ModuleTypeUnderTest = "prebuilt_etc_xml"
-	(&tc).ModuleTypeUnderTestFactory = PrebuiltEtcXmlFactory
-	bp2build.RunBp2BuildTestCase(t, registerXmlModuleTypes, tc)
-}
-
-func registerXmlModuleTypes(ctx android.RegistrationContext) {
-}
-
-func TestXmlPrebuiltEtcSimple(t *testing.T) {
-	runXmlPrebuiltEtcTestCase(t, bp2build.Bp2buildTestCase{
-		Description: "prebuilt_etc_xml - simple example",
-		Filesystem:  map[string]string{},
-		Blueprint: `
-prebuilt_etc_xml {
-    name: "foo",
-    src: "fooSrc",
-    filename: "fooFileName",
-    sub_dir: "fooDir",
-    schema: "foo.dtd",
-}
-`,
-		ExpectedBazelTargets: []string{
-			bp2build.MakeBazelTarget("prebuilt_xml", "foo", bp2build.AttrNameToString{
-				"src":      `"fooSrc"`,
-				"filename": `"fooFileName"`,
-				"dir":      `"etc/fooDir"`,
-				"schema":   `"foo.dtd"`,
-			})}})
-}
-
-func TestXmlPrebuiltEtcFilenameFromSrc(t *testing.T) {
-	runXmlPrebuiltEtcTestCase(t, bp2build.Bp2buildTestCase{
-		Description: "prebuilt_etc_xml - filenameFromSrc True  ",
-		Filesystem:  map[string]string{},
-		Blueprint: `
-prebuilt_etc_xml {
-    name: "foo",
-    src: "fooSrc",
-    filename_from_src: true,
-    sub_dir: "fooDir",
-    schema: "foo.dtd",
-}
-`,
-		ExpectedBazelTargets: []string{
-			bp2build.MakeBazelTarget("prebuilt_xml", "foo", bp2build.AttrNameToString{
-				"src":      `"fooSrc"`,
-				"filename": `"fooSrc"`,
-				"dir":      `"etc/fooDir"`,
-				"schema":   `"foo.dtd"`,
-			})}})
-}
-
-func TestXmlPrebuiltEtcFilenameAndFilenameFromSrc(t *testing.T) {
-	runXmlPrebuiltEtcTestCase(t, bp2build.Bp2buildTestCase{
-		Description: "prebuilt_etc_xml - filename provided and filenameFromSrc True  ",
-		Filesystem:  map[string]string{},
-		Blueprint: `
-prebuilt_etc_xml {
-    name: "foo",
-    src: "fooSrc",
-    filename: "fooFileName",
-    filename_from_src: true,
-    sub_dir: "fooDir",
-    schema: "foo.dtd",
-}
-`,
-		ExpectedBazelTargets: []string{
-			bp2build.MakeBazelTarget("prebuilt_xml", "foo", bp2build.AttrNameToString{
-				"src":      `"fooSrc"`,
-				"filename": `"fooFileName"`,
-				"dir":      `"etc/fooDir"`,
-				"schema":   `"foo.dtd"`,
-			})}})
-}
-
-func TestXmlPrebuiltEtcFileNameFromSrcMultipleSrcs(t *testing.T) {
-	runXmlPrebuiltEtcTestCase(t, bp2build.Bp2buildTestCase{
-		Description: "prebuilt_etc - filename_from_src is true but there are multiple srcs",
-		Filesystem:  map[string]string{},
-		Blueprint: `
-prebuilt_etc_xml {
-    name: "foo",
-    filename_from_src: true,
-    arch: {
-        arm: {
-            src: "barSrc",
-        },
-        arm64: {
-            src: "bazSrc",
-        },
-    }
-}
-`,
-		ExpectedBazelTargets: []string{
-			bp2build.MakeBazelTarget("prebuilt_xml", "foo", bp2build.AttrNameToString{
-				"filename_from_src": `True`,
-				"dir":               `"etc"`,
-				"src": `select({
-        "//build/bazel_common_rules/platforms/arch:arm": "barSrc",
-        "//build/bazel_common_rules/platforms/arch:arm64": "bazSrc",
-        "//conditions:default": None,
-    })`,
-			})}})
-}