Skip to content

Commit

Permalink
chore: further codebase prep work
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Gammon <[email protected]>
  • Loading branch information
sgammon committed Sep 3, 2023
1 parent 4a8cb34 commit bdab4da
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 11 deletions.
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import %workspace%/tools/bazel/java.bazelrc
import %workspace%/tools/bazel/windows.bazelrc
import %workspace%/tools/bazel/linux.bazelrc
import %workspace%/tools/bazel/macos.bazelrc
import %workspace%/tools/bazel/remote.bazelrc

common --color=auto

Expand Down
58 changes: 49 additions & 9 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ workspace(name = "rules_gradle")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
load(
"//internal:config.bzl",
"GO_VERSION",
"GRAALVM_DISTRIBUTION",
"GRAALVM_JAVA_VERSION",
"GRAALVM_VERSION",
Expand All @@ -28,6 +29,15 @@ http_archive(
],
)

http_archive(
name = "googleapis",
sha256 = "9d1a930e767c93c825398b8f8692eca3fe353b9aaadedfbcf1fca2282c85df88",
strip_prefix = "googleapis-64926d52febbf298cb82a8f472ade4a3969ba922",
urls = [
"https://github.com/googleapis/googleapis/archive/64926d52febbf298cb82a8f472ade4a3969ba922.zip",
],
)

http_file(
name = "gradle",
sha256 = "591855b517fc635b9e04de1d05d5e76ada3f89f5fc76f87978d1b245b4f69225",
Expand All @@ -41,6 +51,16 @@ http_archive(
url = "https://github.com/sgammon/rules_graalvm/archive/167f5c6a96e67921d8d960bac7461fc94f9960ce/rules_graalvm-167f5c6a96e67921d8d960bac7461fc94f9960ce.tar.gz",
)

http_archive(
name = "bazel_toolchains",
sha256 = "179ec02f809e86abf56356d8898c8bd74069f1bd7c56044050c2cd3d79d0e024",
strip_prefix = "bazel-toolchains-4.1.0",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/releases/download/4.1.0/bazel-toolchains-4.1.0.tar.gz",
"https://github.com/bazelbuild/bazel-toolchains/releases/download/4.1.0/bazel-toolchains-4.1.0.tar.gz",
],
)

http_archive(
name = "bazel_features",
sha256 = "9fcb3d7cbe908772462aaa52f02b857a225910d30daa3c252f670e3af6d8036d",
Expand Down Expand Up @@ -72,6 +92,15 @@ http_archive(
urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.8/rules_cc-0.0.8.tar.gz"],
)

http_archive(
name = "io_bazel_rules_go",
sha256 = "278b7ff5a826f3dc10f04feaf0b70d48b68748ccd512d7f98bf442077f043fe3",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip",
],
)

http_archive(
name = "rules_kotlin",
sha256 = RULES_KOTLIN_SHA,
Expand Down Expand Up @@ -131,15 +160,6 @@ http_archive(
],
)

http_archive(
name = "io_bazel_rules_go",
sha256 = "278b7ff5a826f3dc10f04feaf0b70d48b68748ccd512d7f98bf442077f043fe3",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip",
],
)

http_archive(
name = "bazel_gazelle",
sha256 = "29218f8e0cebe583643cbf93cae6f971be8a2484cdcfa1e45057658df8d54002",
Expand Down Expand Up @@ -191,6 +211,26 @@ http_archive(
# --------------------------------------------------------------------------------------------------------------
# Dev Dependencies:

# - Go / Gazelle

load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")

go_rules_dependencies()

go_register_toolchains(version = GO_VERSION)

load("@googleapis//:repository_rules.bzl", "switched_rules_by_language")

switched_rules_by_language(
name = "com_google_googleapis_imports",
)

# - Bazel Toolchains (RBE)

load("@bazel_toolchains//rules:rbe_repo.bzl", "rbe_autoconfig")

rbe_autoconfig(name = "rbe_default")

# - JavaScript

load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")
Expand Down
6 changes: 4 additions & 2 deletions tools/bazel/java.bazelrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
build --experimental_strict_java_deps=strict

build --explicit_java_test_deps

build --java_language_version=11
build --java_runtime_version=remotejdk_11

build --extra_toolchains=@graalvm//:sdk

build --experimental_inmemory_jdeps_files
build --experimental_strict_java_deps=strict

test --verbose_failures
test --test_output=errors
13 changes: 13 additions & 0 deletions tools/bazel/remote.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

build:remote --remote_download_minimal
build:remote --remote_executor=grpcs://remote.buildbuddy.io
build:remote --host_platform=@buildbuddy_toolchain//:platform
build:remote --platforms=@buildbuddy_toolchain//:platform
build:remote --extra_execution_platforms=@buildbuddy_toolchain//:platform
build:remote --crosstool_top=@buildbuddy_toolchain//:toolchain
build:remote --extra_toolchains=@buildbuddy_toolchain//:cc_toolchain
build:remote --javabase=@buildbuddy_toolchain//:javabase_jdk8
build:remote --host_javabase=@buildbuddy_toolchain//:javabase_jdk8
build:remote --java_toolchain=@buildbuddy_toolchain//:toolchain_jdk8
build:remote --host_java_toolchain=@buildbuddy_toolchain//:toolchain_jdk8
build:remote --define=EXECUTOR=remote

0 comments on commit bdab4da

Please sign in to comment.