Skip to content
This repository was archived by the owner on Jan 26, 2022. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions dev-scripts/dependencies/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -36,16 +37,12 @@ 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.
buildozer 'add exported_plugins :auto_value_plugin' //thirdparty/jvm/com/google/auto/value:auto_value
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 {} +
}