diff --git a/dev-scripts/dependencies/setup.sh b/dev-scripts/dependencies/setup.sh index 945c2ea..50b5dd8 100644 --- a/dev-scripts/dependencies/setup.sh +++ b/dev-scripts/dependencies/setup.sh @@ -4,7 +4,8 @@ set -euo pipefail SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) ROOT_DIR=$(cd "${SCRIPT_DIR}/../.." && pwd) -BAZEL_DEPS_DIR="$ROOT_DIR/../bazel-deps" +# TODO(https://github.com/bazelbuild/bazel/issues/1673): move bazel-deps to a WORKSPACE rule. +BAZEL_DEPS_DIR="$ROOT_DIR/../BUILD_file_generator-bazel-deps" # Pin a specific version of bazel-deps; change this to upgrade: BAZEL_DEPS_VERSION="7d89b39e8b9c1a0b5a1481909c56c39d970e59b1" @@ -36,7 +37,7 @@ generate_and_format() { # TODO format-deps removes the copyright, otherwise this is nice for consistency # "$BAZEL_DEPS_DIR/gen_maven_deps.sh" format-deps --deps "$ROOT_DIR/maven_deps.yaml" --overwrite - "$BAZEL_DEPS_DIR/gen_maven_deps.sh" generate --repo-root "$ROOT_DIR" --sha-file "thirdparty/workspace.bzl" --deps maven_deps.yaml + "$BAZEL_DEPS_DIR/gen_maven_deps.sh" generate --buildifier "buildifier" --repo-root "$ROOT_DIR" --sha-file "thirdparty/workspace.bzl" --deps maven_deps.yaml # TODO(https://github.com/johnynek/bazel-deps/issues/62): Drop once issue is fixed. # Manually add the AutoValue plugin. Otherwise, everything can be auto-generated from the YAML. @@ -44,8 +45,4 @@ generate_and_format() { buildozer 'new java_plugin auto_value_plugin' //thirdparty/jvm/com/google/auto/value:auto_value buildozer 'set processor_class com.google.auto.value.processor.AutoValueProcessor' //thirdparty/jvm/com/google/auto/value:auto_value_plugin buildozer 'add deps //external:jar/com/google/auto/value/auto_value' //thirdparty/jvm/com/google/auto/value:auto_value_plugin - - # TODO(https://github.com/johnynek/bazel-deps/issues/73): Drop once issue is fixed. - # The generated BUILD files are not well-formatted. Run the buildifier on them. - find "${ROOT_DIR}/thirdparty/jvm" -name "BUILD" -exec "buildifier" -showlog -mode=fix {} + }