summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2023-09-08 16:04:45 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-09-08 16:04:45 +0000
commit3fb2002c9ebdcabd12896ad1e54d815e41410487 (patch)
treeb458394c4872d18581ce6a93070317dd16377678 /java/java.go
parentb091d3b688b6a33ca33d679ead65005b11b29926 (diff)
parent33dddf5a7e4437e61ab5aa122a23a7df8cf2e470 (diff)
Merge changes I86f30b99,I2769c0d5 into main
* changes: Do not convert resource dirs without resources Do not convert java libraries with core_platform
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/java/java.go b/java/java.go
index 521aef301..99bb1b3ee 100644
--- a/java/java.go
+++ b/java/java.go
@@ -2826,7 +2826,7 @@ func (m *Library) convertJavaResourcesAttributes(ctx android.TopDownMutatorConte
if resourceStripPrefix == nil && i == 0 {
resourceStripPrefix = resAttr.Resource_strip_prefix
resources = resAttr.Resources.Value
- } else {
+ } else if !resAttr.Resources.IsEmpty() {
ctx.CreateBazelTargetModule(
bazel.BazelTargetModuleProperties{
Rule_class: "java_resources",
@@ -2904,8 +2904,13 @@ func (m *Library) convertLibraryAttrsBp2Build(ctx android.TopDownMutatorContext)
var staticDeps bazel.LabelListAttribute
if proptools.String(m.deviceProperties.Sdk_version) == "" && m.DeviceSupported() {
+ // TODO(b/297356704): handle platform apis in bp2build
ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_PROPERTY_UNSUPPORTED, "sdk_version unset")
return &javaCommonAttributes{}, &bp2BuildJavaInfo{}, false
+ } else if proptools.String(m.deviceProperties.Sdk_version) == "core_platform" {
+ // TODO(b/297356582): handle core_platform in bp2build
+ ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_PROPERTY_UNSUPPORTED, "sdk_version core_platform")
+ return &javaCommonAttributes{}, &bp2BuildJavaInfo{}, false
}
archVariantProps := m.GetArchVariantProperties(ctx, &CommonProperties{})