Merge "add target_compatible_with stanza for host targets" am: 75664acd70 am: c9c5269342 am: 608b32f41a am: d3b10485f0

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1966480

Change-Id: I521a6c7e2ef12516bebe06661086ebe3338a1bad
This commit is contained in:
Sam Delmerico
2022-02-04 20:15:02 +00:00
committed by Automerger Merge Worker
9 changed files with 236 additions and 95 deletions

View File

@@ -17,8 +17,6 @@ package java
import (
"android/soong/android"
"android/soong/bazel"
"github.com/google/blueprint/proptools"
)
func init() {
@@ -78,12 +76,9 @@ func (p *Plugin) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
attrs.Processor_class = p.pluginProperties.Processor_class
}
var enabledProperty bazel.BoolAttribute
enabledProperty.SetSelectValue(bazel.OsConfigurationAxis, android.Android.Name, proptools.BoolPtr(false))
props := bazel.BazelTargetModuleProperties{
Rule_class: "java_plugin",
}
ctx.CreateBazelTargetModuleWithRestrictions(props, android.CommonAttributes{Name: p.Name()}, attrs, enabledProperty)
ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: p.Name()}, attrs)
}