diff options
| author | 2023-08-07 13:38:18 -0400 | |
|---|---|---|
| committer | 2023-08-29 20:06:48 -0400 | |
| commit | 02914408de35b650612bc79b392ae37964d29118 (patch) | |
| tree | 68c5ce9a6f7f1dc07cbc54a696d9128f89500023 /java/java.go | |
| parent | 8bbe26cad78f2d36e113a356c3cfa5e8d37c8c16 (diff) | |
Add do not convert for sdk_version unset
When sdk_version is unset, the build with fail with Bazel because
private APIs are do not build with Bazel at this time.
This instead prevents migrating the relevant target to Bazel in bp2build
Test: go tests
Change-Id: I31dabcf143de7933706d1b734ef21467a01b65e9
Diffstat (limited to 'java/java.go')
| -rw-r--r-- | java/java.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/java/java.go b/java/java.go index 4b01c316d..6c448a2f0 100644 --- a/java/java.go +++ b/java/java.go @@ -2905,6 +2905,11 @@ func (m *Library) convertLibraryAttrsBp2Build(ctx android.TopDownMutatorContext) var deps bazel.LabelListAttribute var staticDeps bazel.LabelListAttribute + if proptools.String(m.deviceProperties.Sdk_version) == "" && m.DeviceSupported() { + ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_PROPERTY_UNSUPPORTED, "sdk_version unset") + return &javaCommonAttributes{}, &bp2BuildJavaInfo{}, false + } + archVariantProps := m.GetArchVariantProperties(ctx, &CommonProperties{}) for axis, configToProps := range archVariantProps { for config, _props := range configToProps { |