Merge "Switch bp2build mutator to bottom up" into main am: 11b20b2993
am: febe41d738
am: be9f6850a7
am: 9660ccbe20
am: 9edfb56e62
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2760865 Change-Id: I0cee13a821d91dd6dbd9a2393544e72060ab4fec Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -24,7 +24,6 @@ import (
|
||||
"github.com/google/blueprint/proptools"
|
||||
|
||||
"android/soong/android"
|
||||
"android/soong/bazel"
|
||||
"android/soong/java/config"
|
||||
"android/soong/remoteexec"
|
||||
)
|
||||
@@ -855,34 +854,6 @@ func (d *Droidstubs) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
}
|
||||
}
|
||||
|
||||
var _ android.ApiProvider = (*Droidstubs)(nil)
|
||||
|
||||
type bazelJavaApiContributionAttributes struct {
|
||||
Api bazel.LabelAttribute
|
||||
Api_surface *string
|
||||
}
|
||||
|
||||
func (d *Droidstubs) ConvertWithApiBp2build(ctx android.TopDownMutatorContext) {
|
||||
props := bazel.BazelTargetModuleProperties{
|
||||
Rule_class: "java_api_contribution",
|
||||
Bzl_load_location: "//build/bazel/rules/apis:java_api_contribution.bzl",
|
||||
}
|
||||
apiFile := d.properties.Check_api.Current.Api_file
|
||||
// Do not generate a target if check_api is not set
|
||||
if apiFile == nil {
|
||||
return
|
||||
}
|
||||
attrs := &bazelJavaApiContributionAttributes{
|
||||
Api: *bazel.MakeLabelAttribute(
|
||||
android.BazelLabelForModuleSrcSingle(ctx, proptools.String(apiFile)).Label,
|
||||
),
|
||||
Api_surface: proptools.StringPtr(bazelApiSurfaceName(d.Name())),
|
||||
}
|
||||
ctx.CreateBazelTargetModule(props, android.CommonAttributes{
|
||||
Name: android.ApiContributionTargetName(ctx.ModuleName()),
|
||||
}, attrs)
|
||||
}
|
||||
|
||||
func (d *Droidstubs) createApiContribution(ctx android.DefaultableHookContext) {
|
||||
api_file := d.properties.Check_api.Current.Api_file
|
||||
api_surface := d.properties.Api_surface
|
||||
|
Reference in New Issue
Block a user