Skip to content

Commit

Permalink
iox-eclipse-iceoryx#1547 Squash me
Browse files Browse the repository at this point in the history
  • Loading branch information
elBoberido committed Oct 15, 2024
1 parent ea85e69 commit aa65267
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 30 deletions.
13 changes: 0 additions & 13 deletions bazel/buildifier_prebuilt/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,6 @@ This module downloads the buildifier prebuilt project and its deps: https://gith
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")

BAZEL_SKYLIB_VERSION = "1.7.1"

def load_bazel_skylib_repositories():
maybe(
name = "bazel_skylib",
repo_rule = http_archive,
sha256 = "bc283cdfcd526a52c3201279cda4bc298652efa898b10b4db0837dc51652756f",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version = BAZEL_SKYLIB_VERSION),
"https://github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version = BAZEL_SKYLIB_VERSION),
],
)

BUILDIFIER_PREBUILT_VERSION = "7.3.1"

def load_buildifier_prebuilt_repositories():
Expand Down
3 changes: 0 additions & 3 deletions bazel/buildifier_prebuilt/setup.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,10 @@ SPDX-License-Identifier: Apache-2.0
This module prepares the buildifier prebuilt project and its deps: https://github.com/keith/buildifier-prebuilt
"""

load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
load("@buildifier_prebuilt//:defs.bzl", "buildifier_prebuilt_register_toolchains")
load("@buildifier_prebuilt//:deps.bzl", "buildifier_prebuilt_deps")

def setup_buildifier_prebuilt():
buildifier_prebuilt_deps()

bazel_skylib_workspace()

buildifier_prebuilt_register_toolchains()
6 changes: 2 additions & 4 deletions bazel/deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@ limitations under the License.
SPDX-License-Identifier: Apache-2.0
"""

load("//bazel:load_repositories.bzl", "load_repositories")
load("//bazel:setup_repositories.bzl", "setup_repositories")

def iceoryx_deps():
"""
Loads iceoryx dependencies into workspace
"""

load("//bazel:load_repositories.bzl", "load_repositories")
load("//bazel:setup_repositories.bzl", "setup_repositories")

load_repositories()
setup_repositories()
2 changes: 2 additions & 0 deletions bazel/setup_repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ SPDX-License-Identifier: Apache-2.0
"""

load("//bazel/buildifier_prebuilt:setup.bzl", "setup_buildifier_prebuilt")
load("//bazel/skylib:setup.bzl", "setup_skylib")

def setup_repositories():
"""
Loads repositories for iceoryx dependencies
"""
setup_skylib()
setup_buildifier_prebuilt()
Empty file added bazel/skylib/BUILD.bazel
Empty file.
35 changes: 35 additions & 0 deletions bazel/skylib/repository.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"""
Copyright (c) 2024 by ekxide IO GmbH. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
SPDX-License-Identifier: Apache-2.0
Loads dependent repositories from https://github.com/bazelbuild
"""

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")

BAZEL_SKYLIB_VERSION = "1.7.1"

def load_bazel_skylib_repositories():
maybe(
name = "bazel_skylib",
repo_rule = http_archive,
sha256 = "bc283cdfcd526a52c3201279cda4bc298652efa898b10b4db0837dc51652756f",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version = BAZEL_SKYLIB_VERSION),
"https://github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version = BAZEL_SKYLIB_VERSION),
],
)
15 changes: 5 additions & 10 deletions bazel/bazelbuild/setup.bzl → bazel/skylib/setup.bzl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Copyright (c) 2022 by Apex.AI Inc. All rights reserved.
Copyright (c) 2024 by ekxide IO GmbH. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -15,15 +15,10 @@ limitations under the License.
SPDX-License-Identifier: Apache-2.0
Macro for setting the dependencies for the buildtools of bazel
This module prepares the skylib dependency
"""

load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")

def setup_go_protobuf_for_bazelbuild():
go_rules_dependencies()

go_register_toolchains(version = "1.17.2")

protobuf_deps()
def setup_skylib_prebuilt():
bazel_skylib_workspace()

0 comments on commit aa65267

Please sign in to comment.