Skip to content
This repository was archived by the owner on Jan 26, 2022. It is now read-only.

Commit 672c557

Browse files
authored
Remove the manual autovalue support now that bazel-deps supports annotation processors. (#31)
We can remove the buildozer rules we were using to work around this. The PR for bazeltools/bazel-deps#62 has been merged.
1 parent 5f7b3e0 commit 672c557

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

dev-scripts/dependencies/setup.sh

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
66
ROOT_DIR=$(cd "${SCRIPT_DIR}/../.." && pwd)
77
BAZEL_DEPS_DIR="$ROOT_DIR/../bazel-deps"
88
# Pin a specific version of bazel-deps; change this to upgrade:
9-
BAZEL_DEPS_VERSION="7d89b39e8b9c1a0b5a1481909c56c39d970e59b1"
9+
BAZEL_DEPS_VERSION="aad33e40cd2ce2400347e5db28b767e5d512a4fd"
1010

1111
if [ -d "$BAZEL_DEPS_DIR" ]
1212
then
@@ -38,13 +38,6 @@ generate_and_format() {
3838

3939
"$BAZEL_DEPS_DIR/gen_maven_deps.sh" generate --repo-root "$ROOT_DIR" --sha-file "thirdparty/workspace.bzl" --deps maven_deps.yaml
4040

41-
# TODO(https://github.com/johnynek/bazel-deps/issues/62): Drop once issue is fixed.
42-
# Manually add the AutoValue plugin. Otherwise, everything can be auto-generated from the YAML.
43-
buildozer 'add exported_plugins :auto_value_plugin' //thirdparty/jvm/com/google/auto/value:auto_value
44-
buildozer 'new java_plugin auto_value_plugin' //thirdparty/jvm/com/google/auto/value:auto_value
45-
buildozer 'set processor_class com.google.auto.value.processor.AutoValueProcessor' //thirdparty/jvm/com/google/auto/value:auto_value_plugin
46-
buildozer 'add deps //external:jar/com/google/auto/value/auto_value' //thirdparty/jvm/com/google/auto/value:auto_value_plugin
47-
4841
# TODO(https://github.com/johnynek/bazel-deps/issues/73): Drop once issue is fixed.
4942
# The generated BUILD files are not well-formatted. Run the buildifier on them.
5043
find "${ROOT_DIR}/thirdparty/jvm" -name "BUILD" -exec "buildifier" -showlog -mode=fix {} +

maven_deps.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ dependencies:
6262
auto-value:
6363
version: "1.5"
6464
lang: java
65+
processorClasses: ["com.google.auto.value.processor.AutoValueProcessor"]
6566

6667
com.google.code.findbugs:
6768
jsr305:

thirdparty/jvm/com/google/auto/value/BUILD

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
java_library(
22
name = "auto_value",
3-
exported_plugins = [":auto_value_plugin"],
3+
exported_plugins = [
4+
":auto_value_plugin",
5+
],
46
visibility = [
57
"//visibility:public",
68
],
@@ -12,5 +14,10 @@ java_library(
1214
java_plugin(
1315
name = "auto_value_plugin",
1416
processor_class = "com.google.auto.value.processor.AutoValueProcessor",
15-
deps = ["//external:jar/com/google/auto/value/auto_value"],
17+
visibility = [
18+
"//visibility:public",
19+
],
20+
deps = [
21+
"//external:jar/com/google/auto/value/auto_value",
22+
],
1623
)

0 commit comments

Comments
 (0)