Skip to content

Commit

Permalink
Migrate to Bzlmod.
Browse files Browse the repository at this point in the history
This drops unmaintained Gradle support.
  • Loading branch information
SanjayVas committed Dec 12, 2023
1 parent 3da36d7 commit 2823d3d
Show file tree
Hide file tree
Showing 14 changed files with 48 additions and 439 deletions.
3 changes: 3 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
common --enable_bzlmod
common --registry=https://raw.githubusercontent.com/SanjayVas/bazel-registry/main/
common --registry=https://bcr.bazel.build
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6.4.0
4 changes: 0 additions & 4 deletions .editorconfig

This file was deleted.

25 changes: 25 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module(
name = "cross-media-measurement-api",
repo_name = "wfa_measurement_proto",
)

# Bazel Central Registry deps.
bazel_dep(
name = "rules_proto",
version = "5.3.0-21.7",
)
bazel_dep(
name = "protobuf",
version = "21.7",
repo_name = "com_google_protobuf",
)

# WFA registry deps.
bazel_dep(
name = "googleapis",
version = "0.0.0-bzlmod.1",
repo_name = "com_google_googleapis",
)

non_module_deps = use_extension("//build:non_module_deps.bzl", "non_module_deps")
use_repo(non_module_deps, "plantuml")
20 changes: 3 additions & 17 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
workspace(name = "wfa_measurement_proto")

load("//build:repositories.bzl", "wfa_measurement_proto_repositories")

wfa_measurement_proto_repositories()

load("//build:deps.bzl", "wfa_measurement_proto_deps")
# This file marks the root of the Bazel workspace.
# See MODULE.bazel for external dependencies setup.

wfa_measurement_proto_deps()

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

http_file(
name = "plantuml",
downloaded_file_path = "plantuml.jar",
sha256 = "3a659c3d87ea5ebac7aadb645233176c51d0290777ebc28285dd2a35dc947752",
urls = ["https://github.com/plantuml/plantuml/releases/download/v1.2023.4/plantuml-1.2023.4.jar"],
)
workspace(name = "wfa_measurement_proto")
82 changes: 0 additions & 82 deletions build.gradle.kts

This file was deleted.

28 changes: 12 additions & 16 deletions build/deps.bzl → build/non_module_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""Transitive dependencies for this workspace."""
"""Module extension for non-module dependencies."""

load(
"@rules_proto//proto:repositories.bzl",
"rules_proto_dependencies",
"rules_proto_toolchains",
)
load(
"@com_google_googleapis//:repository_rules.bzl",
"switched_rules_by_language",
)
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")

def wfa_measurement_proto_deps():
rules_proto_dependencies()
rules_proto_toolchains()

switched_rules_by_language(
name = "com_google_googleapis_imports",
def _non_module_deps_impl(
# buildifier: disable=unused-variable
mctx):
http_file(
name = "plantuml",
downloaded_file_path = "plantuml.jar",
sha256 = "3a659c3d87ea5ebac7aadb645233176c51d0290777ebc28285dd2a35dc947752",
urls = ["https://github.com/plantuml/plantuml/releases/download/v1.2023.4/plantuml-1.2023.4.jar"],
)

non_module_deps = module_extension(implementation = _non_module_deps_impl)
37 changes: 0 additions & 37 deletions build/repositories.bzl

This file was deleted.

Binary file removed gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 0 additions & 5 deletions gradle/wrapper/gradle-wrapper.properties

This file was deleted.

172 changes: 0 additions & 172 deletions gradlew

This file was deleted.

Loading

0 comments on commit 2823d3d

Please sign in to comment.