-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7ad2cd0
commit 68d11a5
Showing
6 changed files
with
236 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
""" | ||
Defines all the external repositories and dependencies for rules_ios. | ||
""" | ||
|
||
# Defines the rules_ios bzlmod module | ||
# TODO: The `version` needs to be updated between releases | ||
module( | ||
name = "rules_ios", | ||
version = "1.0.1", | ||
bazel_compatibility = [">=5.0.0"], | ||
compatibility_level = 1, | ||
repo_name = "build_bazel_rules_ios", | ||
) | ||
|
||
# Declare the bzlmod dependencies needed by rules_ios and users of rules_ios | ||
bazel_dep( | ||
name = "apple_support", | ||
version = "1.5.0", | ||
repo_name = "build_bazel_apple_support", | ||
) | ||
bazel_dep( | ||
name = "bazel_skylib", | ||
version = "1.4.1", | ||
) | ||
bazel_dep( | ||
name = "rules_apple", | ||
version = "2.2.0", | ||
repo_name = "build_bazel_rules_apple", | ||
) | ||
bazel_dep( | ||
name = "rules_cc", | ||
version = "0.0.6", | ||
) | ||
bazel_dep( | ||
name = "rules_pkg", | ||
version = "0.7.0", | ||
) | ||
bazel_dep( | ||
name = "rules_proto", | ||
version = "5.3.0-21.7", | ||
) | ||
bazel_dep( | ||
name = "rules_python", | ||
version = "0.21.0", | ||
) | ||
bazel_dep( | ||
name = "rules_swift", | ||
version = "1.7.1", | ||
repo_name = "build_bazel_rules_swift", | ||
) | ||
|
||
# Load non-bzlmod dependencies from rules_ios | ||
non_module_deps = use_extension("//rules:module_extensions.bzl", "non_module_deps") | ||
use_repo( | ||
non_module_deps, | ||
"com_github_yonaskolb_xcodegen", | ||
"xchammer", | ||
) | ||
|
||
non_module_dev_deps = use_extension( | ||
"//rules:module_extensions.bzl", | ||
"non_module_dev_deps", | ||
dev_dependency = True, | ||
) | ||
use_repo( | ||
non_module_dev_deps, | ||
"arm64-to-sim", | ||
"io_bazel_stardoc", | ||
"tart", | ||
) | ||
|
||
# Load non-bzlmod dependencies used in this repo from rules_swift | ||
swift_non_module_deps = use_extension("@build_bazel_rules_swift//swift:extensions.bzl", "non_module_deps") | ||
use_repo( | ||
swift_non_module_deps, | ||
"build_bazel_rules_swift_index_import", | ||
) | ||
|
||
# Load non-bzlmod dependencies used in this repo from rules_apple | ||
apple_non_module_deps = use_extension("@build_bazel_rules_apple//apple:extensions.bzl", "non_module_deps") | ||
use_repo( | ||
apple_non_module_deps, | ||
"xctestrunner", | ||
) | ||
|
||
# Configure the Apple cc toolcahin | ||
apple_cc_configure = use_extension("@build_bazel_apple_support//crosstool:setup.bzl", "apple_cc_configure_extension") | ||
use_repo( | ||
apple_cc_configure, | ||
"local_config_apple_cc", | ||
) | ||
|
||
# Register the Python toolchain | ||
python = use_extension("@rules_python//python:extensions.bzl", "python") | ||
python.toolchain( | ||
name = "python3_9", | ||
python_version = "3.9", | ||
) | ||
use_repo( | ||
python, | ||
"python3_9_toolchains", | ||
) | ||
|
||
register_toolchains( | ||
"@python3_9_toolchains//:all", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# This file marks the root of the Bazel workspace. | ||
# See MODULE.bazel for dependencies and setup. | ||
# It is only used when bzlmod is enabled. | ||
# When bzlmod is disabled WORKSPACE is used. | ||
|
||
workspace(name = "build_bazel_rules_ios") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"""Definitions for bzlmod module extensions.""" | ||
|
||
load( | ||
"//rules:repositories.bzl", | ||
"rules_ios_dependencies", | ||
"rules_ios_dev_dependencies", | ||
) | ||
|
||
def _non_module_deps_impl(_): | ||
rules_ios_dependencies(load_xchammer_dependencies = True) | ||
|
||
non_module_deps = module_extension(implementation = _non_module_deps_impl) | ||
|
||
def _non_module_dev_deps_impl(_): | ||
rules_ios_dev_dependencies() | ||
|
||
non_module_dev_deps = module_extension(implementation = _non_module_dev_deps_impl) |
Oops, something went wrong.