Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ build --spawn_strategy=local
# Setup Xcode configuration.
build --xcode_version_config=//:host_xcodes

build --experimental_strict_conflict_checks

build --verbose_failures # Print the full command line for commands that failed
build --test_output=errors # Prints log file output to the console on failure

Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.1.0
8.4.0
10 changes: 9 additions & 1 deletion .bcr/presubmit.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
matrix:
bazel: ["7.x"]
bazel: ["7.x", "8.x"]
tasks:
verify_build_targets_bazel_7:
name: Verify Build targets on macOS with Bazel 7
Expand All @@ -9,3 +9,11 @@ tasks:
- "@rules_ios//rules/..."
build_flags:
- "--repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1"
verify_build_targets_bazel_8:
name: Verify Build targets on macOS with Bazel 8
platform: macos_arm64
bazel: 8.x
build_targets:
- "@rules_ios//rules/..."
build_flags:
- "--repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1"
12 changes: 6 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ jobs:
strategy:
fail-fast: false
matrix:
bazel_version: [7.1.0]
bazel_version: [7.1.0, 8.4.0]
xcode_version: [15.2]
virtual_frameworks: [true, false]
sandbox: [true, false]
latest_rules: [true, false]
env:
XCODE_VERSION: ${{ matrix.xcode_version }}
USE_BAZEL_VERSION: ${{ matrix.bazel_version }}
LATEST_RULES_SWIFT_VERSION: 3.0.2
LATEST_RULES_APPLE_VERSION: 4.0.1
LATEST_RULES_SWIFT_VERSION: 3.4.1
LATEST_RULES_APPLE_VERSION: 4.3.3
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
strategy:
fail-fast: false
matrix:
bazel_version: [7.1.0]
bazel_version: [7.1.0, 8.4.0]
sandbox: [true, false]
xcode_version: [15.2]
env:
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
strategy:
fail-fast: false
matrix:
bazel_version: [7.1.0] # Only run on latest Bazel version as stardoc changes between versions and produces different results
bazel_version: [8.4.0] # Only run on latest Bazel version as stardoc changes between versions and produces different results
xcode_version: [15.2]
env:
XCODE_VERSION: ${{ matrix.xcode_version }}
Expand Down Expand Up @@ -164,7 +164,7 @@ jobs:
strategy:
fail-fast: false
matrix:
bazel_version: [7.1.0]
bazel_version: [7.1.0, 8.4.0]
xcode_version: [15.2]
env:
XCODE_VERSION: ${{ matrix.xcode_version }}
Expand Down
22 changes: 20 additions & 2 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -150,19 +150,37 @@ xcode_version(
version = "15.2.0.15C500b",
)

xcode_version(
name = "version16_2_0_16C5032a",
aliases = [
"16.2",
"16.2.0",
"16.2.0.16C5032a",
"16C5032a",
],
default_ios_sdk_version = "18.2",
default_macos_sdk_version = "15.2",
default_tvos_sdk_version = "18.2",
default_visionos_sdk_version = "2.2",
default_watchos_sdk_version = "11.2",
version = "16.2.0.16C5032a",
)

xcode_config(
name = "host_xcodes",
default = ":version15_2_0_15C500b",
default = ":version16_2_0_16C5032a",
versions = [
":version15_2_0_15C500b",
":version16_2_0_16C5032a",
],
visibility = ["//visibility:public"],
)

available_xcodes(
name = "host_available_xcodes",
default = ":version15_2_0_15C500b",
default = ":version16_2_0_16C5032a",
versions = [
":version15_2_0_15C500b",
":version16_2_0_16C5032a",
],
)
8 changes: 4 additions & 4 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module(
name = "rules_ios",
version = "0",
bazel_compatibility = [
">=7.0.0",
">=7.0.0", # Support both Bazel 7.x and 8.x
],
compatibility_level = 1,
repo_name = "build_bazel_rules_ios",
Expand All @@ -17,12 +17,12 @@ module(
# Declare the bzlmod dependencies needed by rules_ios and users of rules_ios
bazel_dep(
name = "apple_support",
version = "1.15.1",
version = "2.0.0",
repo_name = "build_bazel_apple_support",
)
bazel_dep(
name = "rules_apple",
version = "4.0.1",
version = "4.3.3",
repo_name = "build_bazel_rules_apple",
)
bazel_dep(
Expand All @@ -31,7 +31,7 @@ bazel_dep(
)
bazel_dep(
name = "rules_swift",
version = "3.0.2",
version = "3.4.1",
max_compatibility_level = 3,
repo_name = "build_bazel_rules_swift",
)
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ See the following table for supported release versions.

| Bazel release | Minimum supported rules version | Final supported rules version
|:-------------------:|:-------------------------:|:-------------------------:
| 8.* | 7.0.0 | current
| 7.* | 4.4.0 | current
| 6.* | 2.0.0 | 5.3.0
| 5.* | 1.0.0 | 3.2.2
Expand All @@ -44,6 +45,7 @@ See the following table for supported rules_apple release versions.

| rules_apple release | Minimum supported rules version | Final supported rules version
|:-------------------:|:-------------------------:|:-------------------------:
| 4.3.3 | 7.0.0 | current
| 3.15.0 | 5.3.0 | current
| 3.* | 3.* | 4.2.1
| 2.* | 2.* | 3.2.2
Expand Down
2 changes: 1 addition & 1 deletion docs/app_clip_doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
load("@rules_ios//rules:app_clip.bzl", "ios_app_clip")

ios_app_clip(<a href="#ios_app_clip-name">name</a>, <a href="#ios_app_clip-families">families</a>, <a href="#ios_app_clip-infoplists">infoplists</a>, <a href="#ios_app_clip-infoplists_by_build_setting">infoplists_by_build_setting</a>, <a href="#ios_app_clip-xcconfig">xcconfig</a>,
<a href="#ios_app_clip-xcconfig_by_build_setting">xcconfig_by_build_setting</a>, <a href="#ios_app_clip-kwargs">kwargs</a>)
<a href="#ios_app_clip-xcconfig_by_build_setting">xcconfig_by_build_setting</a>, <a href="#ios_app_clip-kwargs">**kwargs</a>)
</pre>

Builds and packages an iOS App Clip.
Expand Down
2 changes: 1 addition & 1 deletion docs/app_doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
load("@rules_ios//rules:app.bzl", "ios_application")

ios_application(<a href="#ios_application-name">name</a>, <a href="#ios_application-families">families</a>, <a href="#ios_application-apple_library">apple_library</a>, <a href="#ios_application-infoplists">infoplists</a>, <a href="#ios_application-infoplists_by_build_setting">infoplists_by_build_setting</a>, <a href="#ios_application-xcconfig">xcconfig</a>,
<a href="#ios_application-xcconfig_by_build_setting">xcconfig_by_build_setting</a>, <a href="#ios_application-kwargs">kwargs</a>)
<a href="#ios_application-xcconfig_by_build_setting">xcconfig_by_build_setting</a>, <a href="#ios_application-kwargs">**kwargs</a>)
</pre>

Builds and packages an iOS application.
Expand Down
2 changes: 1 addition & 1 deletion docs/extension_doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
load("@rules_ios//rules:extension.bzl", "ios_extension")

ios_extension(<a href="#ios_extension-name">name</a>, <a href="#ios_extension-families">families</a>, <a href="#ios_extension-infoplists">infoplists</a>, <a href="#ios_extension-infoplists_by_build_setting">infoplists_by_build_setting</a>, <a href="#ios_extension-xcconfig">xcconfig</a>,
<a href="#ios_extension-xcconfig_by_build_setting">xcconfig_by_build_setting</a>, <a href="#ios_extension-kwargs">kwargs</a>)
<a href="#ios_extension-xcconfig_by_build_setting">xcconfig_by_build_setting</a>, <a href="#ios_extension-kwargs">**kwargs</a>)
</pre>

Builds and packages an iOS extension.
Expand Down
2 changes: 1 addition & 1 deletion docs/framework_doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Packages compiled code into an Apple .framework package
load("@rules_ios//rules:framework.bzl", "apple_framework")

apple_framework(<a href="#apple_framework-name">name</a>, <a href="#apple_framework-apple_library">apple_library</a>, <a href="#apple_framework-infoplists">infoplists</a>, <a href="#apple_framework-infoplists_by_build_setting">infoplists_by_build_setting</a>, <a href="#apple_framework-xcconfig">xcconfig</a>,
<a href="#apple_framework-xcconfig_by_build_setting">xcconfig_by_build_setting</a>, <a href="#apple_framework-kwargs">kwargs</a>)
<a href="#apple_framework-xcconfig_by_build_setting">xcconfig_by_build_setting</a>, <a href="#apple_framework-kwargs">**kwargs</a>)
</pre>

Builds and packages an Apple framework.
Expand Down
6 changes: 1 addition & 5 deletions docs/import_middleman_doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ can be updated to work without the other behavior
<pre>
load("@rules_ios//rules:import_middleman.bzl", "find_imports")

find_imports(<a href="#find_imports-name">name</a>)
find_imports()
</pre>

Internal aspect for the `import_middleman` see below for a description.
Expand All @@ -71,8 +71,4 @@ Internal aspect for the `import_middleman` see below for a description.
**ATTRIBUTES**


| Name | Description | Type | Mandatory | Default |
| :------------- | :------------- | :------------- | :------------- | :------------- |
| <a id="find_imports-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |


2 changes: 1 addition & 1 deletion docs/library_doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ load("@rules_ios//rules:library.bzl", "apple_library")

apple_library(<a href="#apple_library-name">name</a>, <a href="#apple_library-library_tools">library_tools</a>, <a href="#apple_library-export_private_headers">export_private_headers</a>, <a href="#apple_library-namespace_is_module_name">namespace_is_module_name</a>,
<a href="#apple_library-default_xcconfig_name">default_xcconfig_name</a>, <a href="#apple_library-xcconfig">xcconfig</a>, <a href="#apple_library-xcconfig_by_build_setting">xcconfig_by_build_setting</a>, <a href="#apple_library-objc_defines">objc_defines</a>, <a href="#apple_library-swift_defines">swift_defines</a>,
<a href="#apple_library-kwargs">kwargs</a>)
<a href="#apple_library-kwargs">**kwargs</a>)
</pre>

Create libraries for native source code on Apple platforms.
Expand Down
2 changes: 1 addition & 1 deletion docs/precompiled_apple_resource_bundle_doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if this is ever fixed in bazel it should be removed
<pre>
load("@rules_ios//rules:precompiled_apple_resource_bundle.bzl", "precompiled_apple_resource_bundle")

precompiled_apple_resource_bundle(<a href="#precompiled_apple_resource_bundle-kwargs">kwargs</a>)
precompiled_apple_resource_bundle(<a href="#precompiled_apple_resource_bundle-kwargs">**kwargs</a>)
</pre>


Expand Down
18 changes: 9 additions & 9 deletions docs/test_doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<pre>
load("@rules_ios//rules:test.bzl", "default_test_factory")

default_test_factory.make_named_split(<a href="#default_test_factory.make_named_split-name">name</a>, <a href="#default_test_factory.make_named_split-split_kwargs">split_kwargs</a>, <a href="#default_test_factory.make_named_split-in_split">in_split</a>)
default_test_factory.make_named_split(<a href="#default_test_factory.make_named_split-name">name</a>, <a href="#default_test_factory.make_named_split-split_kwargs">split_kwargs</a>, <a href="#default_test_factory.make_named_split-in_split">**in_split</a>)
</pre>


Expand All @@ -31,7 +31,7 @@ default_test_factory.make_named_split(<a href="#default_test_factory.make_named_
<pre>
load("@rules_ios//rules:test.bzl", "default_test_factory")

default_test_factory.make_runner_split(<a href="#default_test_factory.make_runner_split-name">name</a>, <a href="#default_test_factory.make_runner_split-runner">runner</a>, <a href="#default_test_factory.make_runner_split-in_split">in_split</a>)
default_test_factory.make_runner_split(<a href="#default_test_factory.make_runner_split-name">name</a>, <a href="#default_test_factory.make_runner_split-runner">runner</a>, <a href="#default_test_factory.make_runner_split-in_split">**in_split</a>)
</pre>


Expand All @@ -53,7 +53,7 @@ default_test_factory.make_runner_split(<a href="#default_test_factory.make_runne
<pre>
load("@rules_ios//rules:test.bzl", "default_test_factory")

default_test_factory.make_test(<a href="#default_test_factory.make_test-name">name</a>, <a href="#default_test_factory.make_test-test_rule">test_rule</a>, <a href="#default_test_factory.make_test-kwargs">kwargs</a>)
default_test_factory.make_test(<a href="#default_test_factory.make_test-name">name</a>, <a href="#default_test_factory.make_test-test_rule">test_rule</a>, <a href="#default_test_factory.make_test-kwargs">**kwargs</a>)
</pre>

Helper to create an individual test
Expand All @@ -75,7 +75,7 @@ Helper to create an individual test
<pre>
load("@rules_ios//rules:test.bzl", "default_test_factory")

default_test_factory.make_test_suite(<a href="#default_test_factory.make_test_suite-factory">factory</a>, <a href="#default_test_factory.make_test_suite-name">name</a>, <a href="#default_test_factory.make_test_suite-test_rule">test_rule</a>, <a href="#default_test_factory.make_test_suite-test_kwargs">test_kwargs</a>)
default_test_factory.make_test_suite(<a href="#default_test_factory.make_test_suite-factory">factory</a>, <a href="#default_test_factory.make_test_suite-name">name</a>, <a href="#default_test_factory.make_test_suite-test_rule">test_rule</a>, <a href="#default_test_factory.make_test_suite-test_kwargs">**test_kwargs</a>)
</pre>


Expand All @@ -98,7 +98,7 @@ default_test_factory.make_test_suite(<a href="#default_test_factory.make_test_su
<pre>
load("@rules_ios//rules:test.bzl", "default_test_factory")

default_test_factory.make_test_suite_splits(<a href="#default_test_factory.make_test_suite_splits-factory">factory</a>, <a href="#default_test_factory.make_test_suite_splits-name">name</a>, <a href="#default_test_factory.make_test_suite_splits-in_kwargs">in_kwargs</a>)
default_test_factory.make_test_suite_splits(<a href="#default_test_factory.make_test_suite_splits-factory">factory</a>, <a href="#default_test_factory.make_test_suite_splits-name">name</a>, <a href="#default_test_factory.make_test_suite_splits-in_kwargs">**in_kwargs</a>)
</pre>

Helper function to split up a test for named splits and runners splits
Expand All @@ -125,7 +125,7 @@ Finally - you can set the splits to be whatever you want.
<pre>
load("@rules_ios//rules:test.bzl", "default_test_factory")

default_test_factory.make_tests(<a href="#default_test_factory.make_tests-factory">factory</a>, <a href="#default_test_factory.make_tests-name">name</a>, <a href="#default_test_factory.make_tests-test_rule">test_rule</a>, <a href="#default_test_factory.make_tests-kwargs">kwargs</a>)
default_test_factory.make_tests(<a href="#default_test_factory.make_tests-factory">factory</a>, <a href="#default_test_factory.make_tests-name">name</a>, <a href="#default_test_factory.make_tests-test_rule">test_rule</a>, <a href="#default_test_factory.make_tests-kwargs">**kwargs</a>)
</pre>

Main entry point of generating tests"
Expand All @@ -148,7 +148,7 @@ Main entry point of generating tests"
<pre>
load("@rules_ios//rules:test.bzl", "ios_ui_test")

ios_ui_test(<a href="#ios_ui_test-name">name</a>, <a href="#ios_ui_test-apple_library">apple_library</a>, <a href="#ios_ui_test-test_factory">test_factory</a>, <a href="#ios_ui_test-kwargs">kwargs</a>)
ios_ui_test(<a href="#ios_ui_test-name">name</a>, <a href="#ios_ui_test-apple_library">apple_library</a>, <a href="#ios_ui_test-test_factory">test_factory</a>, <a href="#ios_ui_test-kwargs">**kwargs</a>)
</pre>

Builds and packages iOS UI Tests.
Expand All @@ -171,7 +171,7 @@ Builds and packages iOS UI Tests.
<pre>
load("@rules_ios//rules:test.bzl", "ios_unit_snapshot_test")

ios_unit_snapshot_test(<a href="#ios_unit_snapshot_test-name">name</a>, <a href="#ios_unit_snapshot_test-apple_library">apple_library</a>, <a href="#ios_unit_snapshot_test-test_factory">test_factory</a>, <a href="#ios_unit_snapshot_test-kwargs">kwargs</a>)
ios_unit_snapshot_test(<a href="#ios_unit_snapshot_test-name">name</a>, <a href="#ios_unit_snapshot_test-apple_library">apple_library</a>, <a href="#ios_unit_snapshot_test-test_factory">test_factory</a>, <a href="#ios_unit_snapshot_test-kwargs">**kwargs</a>)
</pre>

Builds and packages iOS Unit Snapshot Tests.
Expand All @@ -194,7 +194,7 @@ Builds and packages iOS Unit Snapshot Tests.
<pre>
load("@rules_ios//rules:test.bzl", "ios_unit_test")

ios_unit_test(<a href="#ios_unit_test-name">name</a>, <a href="#ios_unit_test-apple_library">apple_library</a>, <a href="#ios_unit_test-test_factory">test_factory</a>, <a href="#ios_unit_test-kwargs">kwargs</a>)
ios_unit_test(<a href="#ios_unit_test-name">name</a>, <a href="#ios_unit_test-apple_library">apple_library</a>, <a href="#ios_unit_test-test_factory">test_factory</a>, <a href="#ios_unit_test-kwargs">**kwargs</a>)
</pre>

Builds and packages iOS Unit Tests.
Expand Down
2 changes: 1 addition & 1 deletion docs/xcconfig_doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Struct with different copts behind 'select()' statements
<pre>
load("@rules_ios//rules:xcconfig.doc.bzl", "merge_xcconfigs")

merge_xcconfigs(<a href="#merge_xcconfigs-xcconfigs">xcconfigs</a>)
merge_xcconfigs(<a href="#merge_xcconfigs-xcconfigs">*xcconfigs</a>)
</pre>

Merges a list of xcconfigs into a single dictionary
Expand Down
13 changes: 10 additions & 3 deletions rules/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ genrule(
cmd = "touch $(OUTS)",
)

bzl_library(
name = "utils",
srcs = ["utils.bzl"],
visibility = ["//visibility:public"],
)

bzl_library(
name = "providers",
srcs = ["providers.bzl"],
Expand Down Expand Up @@ -79,7 +85,7 @@ bzl_library(
visibility = ["//visibility:public"],
deps = [
":transition_support",
":utils.bzl",
":utils",
"@bazel_skylib//lib:partial",
"@bazel_skylib//lib:paths",
"@build_bazel_apple_support//lib:apple_support",
Expand All @@ -93,7 +99,7 @@ bzl_library(
visibility = ["//visibility:public"],
deps = [
":features",
"//rules:utils.bzl",
":utils",
"//rules/internal:objc_provider_utils",
"@build_bazel_rules_apple//apple",
],
Expand All @@ -107,7 +113,7 @@ bzl_library(
":hmap",
":import_middleman",
":precompiled_apple_resource_bundle",
":utils.bzl",
":utils",
"//rules/framework:vfs_overlay",
"//rules/library:resources",
"//rules/library:xcconfig",
Expand All @@ -132,6 +138,7 @@ bzl_library(
":plists",
":providers",
":transition_support",
":utils",
"//rules/framework:vfs_overlay",
"//rules/internal:objc_provider_utils",
"@bazel_skylib//lib:partial",
Expand Down
2 changes: 1 addition & 1 deletion rules/framework.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,7 @@ apple_framework_packaging = rule(
implementation = _apple_framework_packaging_impl,
toolchains = use_cpp_toolchain(),
cfg = transition_support.apple_rule_transition,
fragments = ["apple", "cpp", "objc"],
fragments = ["apple", "cpp", "objc", "j2objc"],
output_to_genfiles = True,
attrs = {
"framework_name": attr.string(
Expand Down
2 changes: 1 addition & 1 deletion rules/hmap.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def _make_hmap(actions, headermap_builder, output, namespace, hdrs_lists):
args.add("--output", output)

for hdrs in hdrs_lists:
args.add_all(hdrs)
args.add_all(hdrs, expand_directories = False)

args.set_param_file_format(format = "multiline")
args.use_param_file("@%s")
Expand Down
Loading