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:
@@ -14,8 +14,6 @@
|
||||
|
||||
package android
|
||||
|
||||
import "android/soong/bazel"
|
||||
|
||||
func init() {
|
||||
RegisterLicenseKindBuildComponents(InitRegistrationContext)
|
||||
}
|
||||
@@ -34,39 +32,13 @@ type licenseKindProperties struct {
|
||||
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 @@ func LicenseKindFactory() Module {
|
||||
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
|
||||
}
|
||||
|
Reference in New Issue
Block a user