diff options
author | Ted Xie <tedx@google.com> | 2023-10-03 14:45:21 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-10-03 14:46:01 -0700 |
commit | 124cf7138fae8a12e144a68ba4b9ad5c18ca1d12 (patch) | |
tree | 38b028478ae5e66615acd46ae67a9f8a6c6952cb | |
parent | 7b6e8cc612c410d90c62dd8fb0ce3cc6d125c642 (diff) | |
download | bazelbuild-rules_android-124cf7138fae8a12e144a68ba4b9ad5c18ca1d12.tar.gz |
Deal with explicit namespaces in Bazel
Part of #12
PiperOrigin-RevId: 570502548
Change-Id: I2369446e537113f6f5de25e6dbf6023aa0601a52
-rw-r--r-- | src/tools/ak/rjar/rjar.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tools/ak/rjar/rjar.go b/src/tools/ak/rjar/rjar.go index c95dea8..fca8c76 100644 --- a/src/tools/ak/rjar/rjar.go +++ b/src/tools/ak/rjar/rjar.go @@ -240,6 +240,11 @@ func compileRJar(srcs []string, rjar, jdk, jartool string, targetLabel string) e "--output", rjar, }...) if len(targetLabel) > 0 { + // Deal with "@//"-prefixed labels (in Bazel) + if strings.HasPrefix(targetLabel, "@//") { + targetLabel = strings.Replace(targetLabel, "@//", "//", 1) + } + args = append(args, []string{ "--target_label", targetLabel, }...) |