Merge "Add unconverted reason for jarjar incompatibility." into main am: 6b6b150d0a
am: 7d941462bb
am: 1397a3a96b
am: 472f943b6d
am: 44536d9bfa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2696067 Change-Id: I7d831ad01c92b86d585764dc8cbcffa58a649353 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
c519bc6f28
4 changed files with 32 additions and 8 deletions
|
@ -1307,7 +1307,11 @@ func AndroidLibraryBazelTargetModuleProperties() bazel.BazelTargetModuleProperti
|
|||
}
|
||||
|
||||
func (a *AndroidLibrary) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
|
||||
commonAttrs, bp2buildInfo := a.convertLibraryAttrsBp2Build(ctx)
|
||||
commonAttrs, bp2buildInfo, supported := a.convertLibraryAttrsBp2Build(ctx)
|
||||
if !supported {
|
||||
return
|
||||
}
|
||||
|
||||
depLabels := bp2buildInfo.DepLabels
|
||||
|
||||
deps := depLabels.Deps
|
||||
|
|
|
@ -1613,7 +1613,10 @@ type bazelAndroidAppAttributes struct {
|
|||
|
||||
// ConvertWithBp2build is used to convert android_app to Bazel.
|
||||
func (a *AndroidApp) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
|
||||
commonAttrs, bp2BuildInfo := a.convertLibraryAttrsBp2Build(ctx)
|
||||
commonAttrs, bp2BuildInfo, supported := a.convertLibraryAttrsBp2Build(ctx)
|
||||
if !supported {
|
||||
return
|
||||
}
|
||||
depLabels := bp2BuildInfo.DepLabels
|
||||
|
||||
deps := depLabels.Deps
|
||||
|
|
24
java/java.go
24
java/java.go
|
@ -26,6 +26,7 @@ import (
|
|||
"android/soong/bazel"
|
||||
"android/soong/bazel/cquery"
|
||||
"android/soong/remoteexec"
|
||||
"android/soong/ui/metrics/bp2build_metrics_proto"
|
||||
|
||||
"github.com/google/blueprint"
|
||||
"github.com/google/blueprint/proptools"
|
||||
|
@ -2828,7 +2829,7 @@ func javaXsdTargetName(xsd android.XsdConfigBp2buildTargets) string {
|
|||
// which has other non-attribute information needed for bp2build conversion
|
||||
// that needs different handling depending on the module types, and thus needs
|
||||
// to be returned to the calling function.
|
||||
func (m *Library) convertLibraryAttrsBp2Build(ctx android.TopDownMutatorContext) (*javaCommonAttributes, *bp2BuildJavaInfo) {
|
||||
func (m *Library) convertLibraryAttrsBp2Build(ctx android.TopDownMutatorContext) (*javaCommonAttributes, *bp2BuildJavaInfo, bool) {
|
||||
var srcs bazel.LabelListAttribute
|
||||
var deps bazel.LabelListAttribute
|
||||
var staticDeps bazel.LabelListAttribute
|
||||
|
@ -2839,6 +2840,10 @@ func (m *Library) convertLibraryAttrsBp2Build(ctx android.TopDownMutatorContext)
|
|||
if archProps, ok := _props.(*CommonProperties); ok {
|
||||
archSrcs := android.BazelLabelForModuleSrcExcludes(ctx, archProps.Srcs, archProps.Exclude_srcs)
|
||||
srcs.SetSelectValue(axis, config, archSrcs)
|
||||
if archProps.Jarjar_rules != nil {
|
||||
ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_PROPERTY_UNSUPPORTED, "jarjar_rules")
|
||||
return &javaCommonAttributes{}, &bp2BuildJavaInfo{}, false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3006,7 +3011,7 @@ func (m *Library) convertLibraryAttrsBp2Build(ctx android.TopDownMutatorContext)
|
|||
hasKotlin: hasKotlin,
|
||||
}
|
||||
|
||||
return commonAttrs, bp2BuildInfo
|
||||
return commonAttrs, bp2BuildInfo, true
|
||||
}
|
||||
|
||||
type javaLibraryAttributes struct {
|
||||
|
@ -3036,7 +3041,10 @@ func javaLibraryBazelTargetModuleProperties() bazel.BazelTargetModuleProperties
|
|||
}
|
||||
|
||||
func javaLibraryBp2Build(ctx android.TopDownMutatorContext, m *Library) {
|
||||
commonAttrs, bp2BuildInfo := m.convertLibraryAttrsBp2Build(ctx)
|
||||
commonAttrs, bp2BuildInfo, supported := m.convertLibraryAttrsBp2Build(ctx)
|
||||
if !supported {
|
||||
return
|
||||
}
|
||||
depLabels := bp2BuildInfo.DepLabels
|
||||
|
||||
deps := depLabels.Deps
|
||||
|
@ -3083,7 +3091,10 @@ type javaBinaryHostAttributes struct {
|
|||
|
||||
// JavaBinaryHostBp2Build is for java_binary_host bp2build.
|
||||
func javaBinaryHostBp2Build(ctx android.TopDownMutatorContext, m *Binary) {
|
||||
commonAttrs, bp2BuildInfo := m.convertLibraryAttrsBp2Build(ctx)
|
||||
commonAttrs, bp2BuildInfo, supported := m.convertLibraryAttrsBp2Build(ctx)
|
||||
if !supported {
|
||||
return
|
||||
}
|
||||
depLabels := bp2BuildInfo.DepLabels
|
||||
|
||||
deps := depLabels.Deps
|
||||
|
@ -3167,7 +3178,10 @@ type javaTestHostAttributes struct {
|
|||
|
||||
// javaTestHostBp2Build is for java_test_host bp2build.
|
||||
func javaTestHostBp2Build(ctx android.TopDownMutatorContext, m *TestHost) {
|
||||
commonAttrs, bp2BuildInfo := m.convertLibraryAttrsBp2Build(ctx)
|
||||
commonAttrs, bp2BuildInfo, supported := m.convertLibraryAttrsBp2Build(ctx)
|
||||
if !supported {
|
||||
return
|
||||
}
|
||||
depLabels := bp2BuildInfo.DepLabels
|
||||
|
||||
deps := depLabels.Deps
|
||||
|
|
|
@ -66,7 +66,10 @@ type pluginAttributes struct {
|
|||
// ConvertWithBp2build is used to convert android_app to Bazel.
|
||||
func (p *Plugin) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
|
||||
pluginName := p.Name()
|
||||
commonAttrs, bp2BuildInfo := p.convertLibraryAttrsBp2Build(ctx)
|
||||
commonAttrs, bp2BuildInfo, supported := p.convertLibraryAttrsBp2Build(ctx)
|
||||
if !supported {
|
||||
return
|
||||
}
|
||||
depLabels := bp2BuildInfo.DepLabels
|
||||
|
||||
deps := depLabels.Deps
|
||||
|
|
Loading…
Reference in a new issue