Use bzlmod to manage dependencies
This will also make it easier to maintain emboss in the BCR
(https://github.com/bazelbuild/bazel-central-registry/tree/main/modules/emboss).
diff --git a/.bazelrc b/.bazelrc
index f3470b4..85399b9 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -1,5 +1,3 @@
-# Emboss doesn't (yet) support bzlmod.
-common --noenable_bzlmod
# Emboss (at least notionally) supports C++11 until (at least) 2027. However,
# Googletest requires C++14, which means that all of the Emboss unit tests
# require C++14 to run.
diff --git a/MODULE.bazel b/MODULE.bazel
index 00bb183..f5d06a2 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -1,6 +1,17 @@
-###############################################################################
-# Bazel now uses Bzlmod by default to manage external dependencies.
-# Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel.
-#
-# For more details, please check https://github.com/bazelbuild/bazel/issues/18958
-###############################################################################
+module(
+ name = "emboss",
+ version = "0.0.0",
+ repo_name = "com_google_emboss",
+)
+
+bazel_dep(
+ name = "abseil-cpp",
+ version = "20230125.1",
+ repo_name = "com_google_absl",
+)
+bazel_dep(
+ name = "googletest",
+ version = "1.14.0.bcr.1",
+ repo_name = "com_google_googletest",
+)
+bazel_dep(name = "rules_python", version = "0.31.0")
diff --git a/WORKSPACE b/WORKSPACE
deleted file mode 100644
index 90179b8..0000000
--- a/WORKSPACE
+++ /dev/null
@@ -1,36 +0,0 @@
-workspace(name = "com_google_emboss")
-
-load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
-load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
-
-# googletest
-git_repository(
- name = "com_google_googletest",
- commit = "2f2e72bae991138cedd0e3d06a115022736cd568",
- remote = "https://github.com/google/googletest",
- shallow_since = "1563302555 -0400",
-)
-
-git_repository(
- name = "com_google_absl",
- commit = "3020b58f0d987073b8adab204426f82c3f60b283",
- remote = "https://github.com/abseil/abseil-cpp",
- shallow_since = "1562769772 +0000",
-)
-
-http_archive(
- name = "bazel_skylib",
- sha256 = "f7be3474d42aae265405a592bb7da8e171919d74c16f082a5457840f06054728",
- urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/1.2.1/bazel-skylib-1.2.1.tar.gz"],
-)
-
-http_archive(
- name = "rules_python",
- sha256 = "c68bdc4fbec25de5b5493b8819cfc877c4ea299c0dcb15c244c5a00208cde311",
- strip_prefix = "rules_python-0.31.0",
- url = "https://github.com/bazelbuild/rules_python/releases/download/0.31.0/rules_python-0.31.0.tar.gz",
-)
-
-load("@rules_python//python:repositories.bzl", "py_repositories")
-
-py_repositories()