diff --git a/BUILD.bazel b/BUILD.bazel index 4f85ed11..6562cd36 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,3 +1,4 @@ +load("@buildifier_prebuilt//:rules.bzl", "buildifier", "buildifier_test") load("@rules_cc//cc:cc_library.bzl", "cc_library") load("@rules_cc//cc:cc_test.bzl", "cc_test") load("@rules_gazebo//gazebo:headers.bzl", "gz_configure_header", "gz_export_header", "gz_include_header") @@ -611,3 +612,19 @@ cc_library( ":wide_angle_camera", ], ) + +buildifier( + name = "buildifier.fix", + exclude_patterns = ["./.git/*"], + lint_mode = "fix", + mode = "fix", +) + +buildifier_test( + name = "buildifier.test", + exclude_patterns = ["./.git/*"], + lint_mode = "warn", + mode = "diff", + no_sandbox = True, + workspace = "//:MODULE.bazel", +) diff --git a/MODULE.bazel b/MODULE.bazel index d25e8189..b8a2f051 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -1,69 +1,21 @@ -## MODULE.bazel module( name = "gz-sensors", - repo_name = "org_gazebosim_gz-sensors", + compatibility_level = 9, ) bazel_dep(name = "bazel_skylib", version = "1.7.1") +bazel_dep(name = "buildifier_prebuilt", version = "8.2.1") bazel_dep(name = "eigen", version = "3.4.0.bcr.3") bazel_dep(name = "googletest", version = "1.15.2") +bazel_dep(name = "rules_cc", version = "0.2.14") bazel_dep(name = "rules_license", version = "1.0.0") # Gazebo Dependencies -bazel_dep(name = "rules_cc", version = "0.1.1") bazel_dep(name = "rules_gazebo", version = "0.0.6") -bazel_dep(name = "gz-common") -bazel_dep(name = "gz-math") -bazel_dep(name = "gz-msgs") -bazel_dep(name = "gz-rendering") -bazel_dep(name = "gz-transport") -bazel_dep(name = "gz-utils") -bazel_dep(name = "sdformat") - -archive_override( - module_name = "gz-common", - strip_prefix = "gz-common-gz-common7", - urls = ["https://github.com/gazebosim/gz-common/archive/refs/heads/gz-common7.tar.gz"], -) - -archive_override( - module_name = "gz-math", - strip_prefix = "gz-math-gz-math9", - urls = ["https://github.com/gazebosim/gz-math/archive/refs/heads/gz-math9.tar.gz"], -) - -archive_override( - module_name = "gz-msgs", - strip_prefix = "gz-msgs-gz-msgs12", - urls = ["https://github.com/gazebosim/gz-msgs/archive/refs/heads/gz-msgs12.tar.gz"], -) - -archive_override( - module_name = "gz-rendering", - strip_prefix = "gz-rendering-gz-rendering10", - urls = ["https://github.com/gazebosim/gz-rendering/archive/refs/heads/gz-rendering10.tar.gz"], -) - -archive_override( - module_name = "gz-plugin", - strip_prefix = "gz-plugin-gz-plugin4", - urls = ["https://github.com/gazebosim/gz-plugin/archive/refs/heads/gz-plugin4.tar.gz"], -) - -archive_override( - module_name = "gz-transport", - strip_prefix = "gz-transport-gz-transport15", - urls = ["https://github.com/gazebosim/gz-transport/archive/refs/heads/gz-transport15.tar.gz"], -) - -archive_override( - module_name = "gz-utils", - strip_prefix = "gz-utils-gz-utils4", - urls = ["https://github.com/gazebosim/gz-utils/archive/refs/heads/gz-utils4.tar.gz"], -) - -archive_override( - module_name = "sdformat", - strip_prefix = "sdformat-sdf16", - urls = ["https://github.com/gazebosim/sdformat/archive/refs/heads/sdf16.tar.gz"], -) +bazel_dep(name = "gz-common", version = "7.0.0-pre1") +bazel_dep(name = "gz-math", version = "9.0.0-pre1") +bazel_dep(name = "gz-msgs", version = "12.0.0-pre1") +bazel_dep(name = "gz-rendering", version = "10.0.0-pre2") +bazel_dep(name = "gz-transport", version = "15.0.0-pre2") +bazel_dep(name = "gz-utils", version = "4.0.0-pre1") +bazel_dep(name = "sdformat", version = "16.0.0-pre2") diff --git a/bazel/gz_sensor_library.bzl b/bazel/gz_sensor_library.bzl index aceb883e..bf590568 100644 --- a/bazel/gz_sensor_library.bzl +++ b/bazel/gz_sensor_library.bzl @@ -1,3 +1,7 @@ +""" +Rules for sensor libraries. +""" + load("@rules_cc//cc:cc_library.bzl", "cc_library") load("@rules_gazebo//gazebo:headers.bzl", "gz_export_header")