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
This commit is contained in:
Colin Cross
2023-12-07 13:10:56 -08:00
parent e51c6e4109
commit 8ff105860d
168 changed files with 64 additions and 39712 deletions

View File

@@ -19,16 +19,12 @@ import (
"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 @@ func HostForDeviceFactory() android.Module {
module.AddProperties(&module.properties)
InitJavaModule(module, android.DeviceSupported)
android.InitBazelModule(module)
return module
}
@@ -193,32 +188,3 @@ func (d *DeviceHostConverter) AndroidMk() android.AndroidMkData {
},
}
}
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)
}