Skip to content

Commit ae977fc

Browse files
authored
chore: use bzlmod (#261)
1 parent 1b55f93 commit ae977fc

File tree

3 files changed

+8
-45
lines changed

3 files changed

+8
-45
lines changed

.bazelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
common --enable_bzlmod
12
build --enable_platform_specific_config
23
build --incompatible_use_platforms_repo_for_constraints
34
build --incompatible_enable_cc_toolchain_resolution

MODULE.bazel

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module(name = "ecsact_sdk")
2+
3+
bazel_dep(name = "nlohmann_json", version = "3.11.2")
4+
bazel_dep(name = "rules_cc", version = "0.0.6")
5+
bazel_dep(name = "platforms", version = "0.0.6")
6+
bazel_dep(name = "rules_pkg", version = "0.9.0")
7+
bazel_dep(name = "bazel_skylib", version = "1.4.1")

WORKSPACE.bazel

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,6 @@ workspace(name = "ecsact_sdk")
22

33
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
44

5-
_NLOHMANN_JSON_BUILD_FILE = """
6-
load("@rules_cc//cc:defs.bzl", "cc_library")
7-
8-
cc_library(
9-
name = "json",
10-
visibility = ["//visibility:public"],
11-
includes = ["include"],
12-
hdrs = glob(["include/**/*.hpp"]),
13-
strip_include_prefix = "include",
14-
)
15-
"""
16-
17-
http_archive(
18-
name = "nlohmann_json",
19-
build_file_content = _NLOHMANN_JSON_BUILD_FILE,
20-
sha256 = "e5c7a9f49a16814be27e4ed0ee900ecd0092bfb7dbfca65b5a421b774dccaaed",
21-
url = "https://github.com/nlohmann/json/releases/download/v3.11.2/include.zip",
22-
)
23-
245
http_archive(
256
name = "bazelregistry_docopt_cpp",
267
sha256 = "a06e705978b1c09427f130a187cb361916c1e7d66b69e91b865ebcd5390a6774",
@@ -39,19 +20,6 @@ load("@boost//:index.bzl", "boost_http_archives")
3920

4021
boost_http_archives()
4122

42-
http_archive(
43-
name = "rules_pkg",
44-
sha256 = "451e08a4d78988c06fa3f9306ec813b836b1d076d0f055595444ba4ff22b867f",
45-
urls = [
46-
"https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.7.1/rules_pkg-0.7.1.tar.gz",
47-
"https://github.com/bazelbuild/rules_pkg/releases/download/0.7.1/rules_pkg-0.7.1.tar.gz",
48-
],
49-
)
50-
51-
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
52-
53-
rules_pkg_dependencies()
54-
5523
http_archive(
5624
name = "rules_cc_stamp",
5725
strip_prefix = "rules_cc_stamp-63d4861f4d420b574fa0f112599aae2b8aee785e",
@@ -180,19 +148,6 @@ load("@rules_7zip//:setup.bzl", "setup_7zip")
180148

181149
setup_7zip()
182150

183-
http_archive(
184-
name = "bazel_skylib",
185-
sha256 = "74d544d96f4a5bb630d465ca8bbcfe231e3594e5aae57e1edbf17a6eb3ca2506",
186-
urls = [
187-
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz",
188-
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz",
189-
],
190-
)
191-
192-
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
193-
194-
bazel_skylib_workspace()
195-
196151
http_archive(
197152
name = "rules_blender",
198153
sha256 = "734b08d1f0eb29a09f81509803cc324c2012a09f47e692a13c41af1370fcb648",

0 commit comments

Comments
 (0)