Skip to content

Commit ad7014a

Browse files
committed
docs
Signed-off-by: Brentley Jones <github@brentleyjones.com>
1 parent ecbe4df commit ad7014a

1 file changed

Lines changed: 64 additions & 4 deletions

File tree

docs/bazel.md

Lines changed: 64 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ xcodeproj(
107107
| <a id="xcodeproj-project_name"></a>project_name | Optional. The name to use for the `.xcodeproj` file.<br><br>If not specified, the value of the `name` argument is used. | `None` |
108108
| <a id="xcodeproj-project_options"></a>project_options | Optional. A value returned by `project_options`. | `None` |
109109
| <a id="xcodeproj-scheme_autogeneration_mode"></a>scheme_autogeneration_mode | Optional. Specifies how Xcode schemes are automatically generated:<br><br><ul> <li> `auto`: If no custom schemes are specified, via `schemes`, an Xcode scheme will be created for every buildable target. If custom schemes are provided, no autogenerated schemes will be created. </li> <li> `none`: No schemes are automatically generated. </li> <li> `all`: A scheme is generated for every buildable target even if custom schemes are provided. </li> </ul> | `"auto"` |
110-
| <a id="xcodeproj-scheme_autogeneration_config"></a>scheme_autogeneration_config | Optional. A value returned by [`xcschemes.autogeneration_config`](#xcschemes.autogeneration_config).<br><br>Allows further configuration of `scheme_autogeneration_mode`. | `{}` |
110+
| <a id="xcodeproj-scheme_autogeneration_config"></a>scheme_autogeneration_config | Optional. A value returned by [`xcschemes.autogeneration_config`](#xcschemes.autogeneration_config).<br><br>Allows further configuration of `scheme_autogeneration_mode`. | `None` |
111111
| <a id="xcodeproj-target_name_mode"></a>target_name_mode | Optional. Specifies how Xcode targets names are represented:<br><br><ul> <li> `auto`: Use the product name if it is available and there is no collision. Otherwise select the target name from the label. And if there is a collision, use the full label. </li> <li> `label`: Always use full label for Xcode targets names. </li> </ul> | `"auto"` |
112112
| <a id="xcodeproj-top_level_targets"></a>top_level_targets | A `list` of a list of top-level targets.<br><br>Each target can be specified as either a `Label` (or label-like `string`), a value returned by `top_level_target`, or a value returned by `top_level_targets`. | none |
113113
| <a id="xcodeproj-tvos_device_cpus"></a>tvos_device_cpus | Optional. The value to use for `--tvos_cpus` when building the transitive dependencies of the targets specified in the `top_level_targets` argument with the `"device"` `target_environment`.<br><br>**Warning:** Changing this value will affect the Starlark transition hash of all transitive dependencies of the targets specified in the `top_level_targets` argument with the `"device"` `target_environment`, even if they aren't tvOS targets. | `"arm64"` |
@@ -235,14 +235,69 @@ Defines a command-line argument.
235235
| <a id="xcschemes.arg-literal_string"></a>literal_string | Whether `value` should be interpreted as a literal string.<br><br>If `True`, any spaces will be escaped. This means that `value` will be passed to the launch target as a single string. If `False`, any spaces will not be escaped. This is useful to group multiple arguments under a single checkbox in Xcode. | `True` |
236236

237237

238+
<a id="xcschemes.autogeneration.profile"></a>
239+
240+
## xcschemes.autogeneration.profile
241+
242+
<pre>
243+
load("@rules_xcodeproj//xcodeproj/internal/docs:xcschemes.bzl", "xcschemes")
244+
245+
xcschemes.autogeneration.profile(*, <a href="#xcschemes.autogeneration.profile-post_actions">post_actions</a>, <a href="#xcschemes.autogeneration.profile-pre_actions">pre_actions</a>)
246+
</pre>
247+
248+
Creates a value for the `profile` argument of `xcschemes.autogeneration_config`.
249+
250+
**PARAMETERS**
251+
252+
253+
| Name | Description | Default Value |
254+
| :------------- | :------------- | :------------- |
255+
| <a id="xcschemes.autogeneration.profile-post_actions"></a>post_actions | Profile post-actions for autogenerated schemes.<br><br>Defaults to `[]`. | `[]` |
256+
| <a id="xcschemes.autogeneration.profile-pre_actions"></a>pre_actions | Profile pre-actions for autogenerated schemes.<br><br>Defaults to `[]`. | `[]` |
257+
258+
**RETURNS**
259+
260+
An opaque value for the
261+
[`profile`](user-content-xcschemes.autogeneration_config-profile)
262+
argument of `xcschemes.autogeneration_config`.
263+
264+
265+
<a id="xcschemes.autogeneration.run"></a>
266+
267+
## xcschemes.autogeneration.run
268+
269+
<pre>
270+
load("@rules_xcodeproj//xcodeproj/internal/docs:xcschemes.bzl", "xcschemes")
271+
272+
xcschemes.autogeneration.run(*, <a href="#xcschemes.autogeneration.run-post_actions">post_actions</a>, <a href="#xcschemes.autogeneration.run-pre_actions">pre_actions</a>, <a href="#xcschemes.autogeneration.run-run_build_post_actions_on_failure">run_build_post_actions_on_failure</a>)
273+
</pre>
274+
275+
Creates a value for the `run` argument of `xcschemes.autogeneration_config`.
276+
277+
**PARAMETERS**
278+
279+
280+
| Name | Description | Default Value |
281+
| :------------- | :------------- | :------------- |
282+
| <a id="xcschemes.autogeneration.run-post_actions"></a>post_actions | Build and run post-actions for autogenerated schemes.<br><br>Defaults to `[]`. | `[]` |
283+
| <a id="xcschemes.autogeneration.run-pre_actions"></a>pre_actions | Build and run pre-actions for autogenerated schemes.<br><br>Defaults to `[]`. | `[]` |
284+
| <a id="xcschemes.autogeneration.run-run_build_post_actions_on_failure"></a>run_build_post_actions_on_failure | Whether autogenerated build post-actions should run even when the build fails. | `False` |
285+
286+
**RETURNS**
287+
288+
An opaque value for the
289+
[`run`](user-content-xcschemes.autogeneration_config-run)
290+
argument of `xcschemes.autogeneration_config`.
291+
292+
238293
<a id="xcschemes.autogeneration.test"></a>
239294

240295
## xcschemes.autogeneration.test
241296

242297
<pre>
243298
load("@rules_xcodeproj//xcodeproj/internal/docs:xcschemes.bzl", "xcschemes")
244299

245-
xcschemes.autogeneration.test(*, <a href="#xcschemes.autogeneration.test-options">options</a>)
300+
xcschemes.autogeneration.test(*, <a href="#xcschemes.autogeneration.test-options">options</a>, <a href="#xcschemes.autogeneration.test-post_actions">post_actions</a>, <a href="#xcschemes.autogeneration.test-pre_actions">pre_actions</a>)
246301
</pre>
247302

248303
Creates a value for the `test` argument of `xcschemes.autogeneration_config`.
@@ -253,6 +308,8 @@ Creates a value for the `test` argument of `xcschemes.autogeneration_config`.
253308
| Name | Description | Default Value |
254309
| :------------- | :------------- | :------------- |
255310
| <a id="xcschemes.autogeneration.test-options"></a>options | Test options for autogeneration.<br><br>Defaults to `None`. | `None` |
311+
| <a id="xcschemes.autogeneration.test-post_actions"></a>post_actions | Test post-actions for autogenerated schemes.<br><br>Defaults to `[]`. | `[]` |
312+
| <a id="xcschemes.autogeneration.test-pre_actions"></a>pre_actions | Test pre-actions for autogenerated schemes.<br><br>Defaults to `[]`. | `[]` |
256313

257314
**RETURNS**
258315

@@ -268,7 +325,7 @@ An opaque value for the
268325
<pre>
269326
load("@rules_xcodeproj//xcodeproj/internal/docs:xcschemes.bzl", "xcschemes")
270327

271-
xcschemes.autogeneration_config(*, <a href="#xcschemes.autogeneration_config-scheme_name_exclude_patterns">scheme_name_exclude_patterns</a>, <a href="#xcschemes.autogeneration_config-test">test</a>)
328+
xcschemes.autogeneration_config(*, <a href="#xcschemes.autogeneration_config-profile">profile</a>, <a href="#xcschemes.autogeneration_config-run">run</a>, <a href="#xcschemes.autogeneration_config-scheme_name_exclude_patterns">scheme_name_exclude_patterns</a>, <a href="#xcschemes.autogeneration_config-test">test</a>)
272329
</pre>
273330

274331
Creates a value for the [`scheme_autogeneration_config`](xcodeproj-scheme_autogeneration_config) attribute of `xcodeproj`.
@@ -278,6 +335,8 @@ Creates a value for the [`scheme_autogeneration_config`](xcodeproj-scheme_autoge
278335

279336
| Name | Description | Default Value |
280337
| :------------- | :------------- | :------------- |
338+
| <a id="xcschemes.autogeneration_config-profile"></a>profile | Options to use for the profile action.<br><br>Example:<br><br><pre><code class="language-starlark">xcodeproj(&#10; ...&#10; scheme_autogeneration_config = xcschemes.autogeneration_config(&#10; profile = xcschemes.autogeneration.profile(&#10; pre_actions = [&#10; xcschemes.pre_post_actions.launch_script(&#10; title = "Profile Start",&#10; script_text = "echo profile",&#10; ),&#10; ],&#10; ),&#10; ),&#10;)</code></pre> | `None` |
339+
| <a id="xcschemes.autogeneration_config-run"></a>run | Options to use for the build and run actions.<br><br>Example:<br><br><pre><code class="language-starlark">xcodeproj(&#10; ...&#10; scheme_autogeneration_config = xcschemes.autogeneration_config(&#10; run = xcschemes.autogeneration.run(&#10; pre_actions = [&#10; xcschemes.pre_post_actions.build_script(&#10; title = "Build Start",&#10; script_text = "echo build start",&#10; ),&#10; xcschemes.pre_post_actions.launch_script(&#10; title = "Run Start",&#10; script_text = "echo run",&#10; ),&#10; ],&#10; ),&#10; ),&#10;)</code></pre> | `None` |
281340
| <a id="xcschemes.autogeneration_config-scheme_name_exclude_patterns"></a>scheme_name_exclude_patterns | A `list` of regex patterns used to skip creating matching autogenerated schemes.<br><br>Example:<br><br><pre><code class="language-starlark">xcodeproj(&#10; ...&#10; scheme_name_exclude_patterns = xcschemes.autogeneration_config(&#10; scheme_name_exclude_patterns = [&#10; ".*somePattern.*",&#10; "^AnotherPattern.*",&#10; ],&#10; ),&#10;)</code></pre> | `None` |
282341
| <a id="xcschemes.autogeneration_config-test"></a>test | Options to use for the test action.<br><br>Example:<br><br><pre><code class="language-starlark">xcodeproj(&#10; ...&#10; scheme_autogeneration_config = xcschemes.autogeneration_config(&#10; test = xcschemes.autogeneration.test(&#10; options = xcschemes.test_options(&#10; app_language = "en",&#10; app_region = "US",&#10; code_coverage = False,&#10; )&#10; )&#10; )&#10;)</code></pre> | `None` |
283342

@@ -496,7 +555,7 @@ Defines the Profile action.
496555
load("@rules_xcodeproj//xcodeproj/internal/docs:xcschemes.bzl", "xcschemes")
497556

498557
xcschemes.run(*, <a href="#xcschemes.run-args">args</a>, <a href="#xcschemes.run-build_targets">build_targets</a>, <a href="#xcschemes.run-diagnostics">diagnostics</a>, <a href="#xcschemes.run-env">env</a>, <a href="#xcschemes.run-env_include_defaults">env_include_defaults</a>, <a href="#xcschemes.run-launch_target">launch_target</a>,
499-
<a href="#xcschemes.run-storekit_configuration">storekit_configuration</a>, <a href="#xcschemes.run-xcode_configuration">xcode_configuration</a>)
558+
<a href="#xcschemes.run-run_build_post_actions_on_failure">run_build_post_actions_on_failure</a>, <a href="#xcschemes.run-storekit_configuration">storekit_configuration</a>, <a href="#xcschemes.run-xcode_configuration">xcode_configuration</a>)
500559
</pre>
501560

502561
Defines the Run action.
@@ -512,6 +571,7 @@ Defines the Run action.
512571
| <a id="xcschemes.run-env"></a>env | Environment variables to use when running the launch target.<br><br>If set to `"inherit"`, then the environment variables will be supplied by the launch target (e.g. [`cc_binary.env`](https://bazel.build/reference/be/common-definitions#binary.env)). Otherwise, the `dict` of environment variables will be set as provided, and `None` or `{}` will result in no environment variables.<br><br>Each value of the `dict` can either be a string or a value returned by [`xcschemes.env_value`](#xcschemes.env_value). If a value is a string, it will be transformed into `xcschemes.env_value(value)`. For example, <pre><code>xcschemes.run(&#10; env = {&#10; "VAR1": "value 1",&#10; "VAR 2": xcschemes.env_value("value2", enabled = False),&#10; },&#10;)</code></pre> will be transformed into: <pre><code>xcschemes.run(&#10; env = {&#10; "VAR1": xcschemes.env_value("value 1"),&#10; "VAR 2": xcschemes.env_value("value2", enabled = False),&#10; },&#10;)</code></pre> | `"inherit"` |
513572
| <a id="xcschemes.run-env_include_defaults"></a>env_include_defaults | Whether to include the rules_xcodeproj provided default Bazel environment variables (e.g. `BUILD_WORKING_DIRECTORY` and `BUILD_WORKSPACE_DIRECTORY`), in addition to any set by [`env`](#xcschemes.run-env). This does not apply to [`xcschemes.launch_path`](#xcschemes.launch_path)s. | `True` |
514573
| <a id="xcschemes.run-launch_target"></a>launch_target | The target to launch when running.<br><br>Can be `None`, a label string, a value returned by [`xcschemes.launch_target`](#xcschemes.launch_target), or a value returned by [`xcschemes.launch_path`](#xcschemes.launch_path). If a label string, `xcschemes.launch_target(label_str)` will be used. If `None`, `xcschemes.launch_target()` will be used, which means no launch target will be set (i.e. the `Executable` dropdown will be set to `None`). | `None` |
574+
| <a id="xcschemes.run-run_build_post_actions_on_failure"></a>run_build_post_actions_on_failure | Whether build post-actions should run even when the scheme's `BuildAction` fails. | `False` |
515575
| <a id="xcschemes.run-storekit_configuration"></a>storekit_configuration | A StoreKit configuration file for use with [StoreKit Testing](https://developer.apple.com/documentation/xcode/setting-up-storekit-testing-in-xcode).<br><br>Can be `None`, or a label string referring to a single configuration file. | `None` |
516576
| <a id="xcschemes.run-xcode_configuration"></a>xcode_configuration | The name of the Xcode configuration to use to build the targets referenced in the Run action (i.e in the [`build_targets`](#xcschemes.run-build_targets) and [`launch_target`](#xcschemes.run-launch_target) attributes).<br><br>If not set, the value of [`xcodeproj.default_xcode_configuration`](#xcodeproj-default_xcode_configuration) is used. | `None` |
517577

0 commit comments

Comments
 (0)