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/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
 }