summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2023-05-05 01:44:03 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-05-05 01:44:03 +0000
commitc144c08d2a7caf9decc10826fd7d2cb34096a828 (patch)
tree14fe5348b9f53658891a86be807217d066fba247 /java/java.go
parentee6bd5a7b2e4936889620d8518cd95357fe9d123 (diff)
parentd5fe1330774ee9e6342b08e371fdefce5c0d6214 (diff)
Merge "Provide a resource_prefix_strip for java_resources in bp2build."
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/java/java.go b/java/java.go
index d3e74fd1c..b751b9a31 100644
--- a/java/java.go
+++ b/java/java.go
@@ -2710,8 +2710,13 @@ func (m *Library) convertJavaResourcesAttributes(ctx android.TopDownMutatorConte
var resources bazel.LabelList
var resourceStripPrefix *string
+ if m.properties.Java_resources != nil && len(m.properties.Java_resource_dirs) > 0 {
+ ctx.ModuleErrorf("bp2build doesn't support both java_resources and java_resource_dirs being set on the same module.")
+ }
+
if m.properties.Java_resources != nil {
resources.Append(android.BazelLabelForModuleSrc(ctx, m.properties.Java_resources))
+ resourceStripPrefix = proptools.StringPtr(ctx.ModuleDir())
}
//TODO(b/179889880) handle case where glob includes files outside package