Skip to content

Latest commit

 

History

History
executable file
·
618 lines (419 loc) · 53.1 KB

bazel.md

File metadata and controls

executable file
·
618 lines (419 loc) · 53.1 KB

Bazel rules and macros

Usage

To use these rules and macros in your BUILD files, load them from xcodeproj/defs.bzl.

For example, to use the xcodeproj rule, you would need to use this load statement:

load("@rules_xcodeproj//xcodeproj:defs.bzl", "xcodeproj")

Index

Core

xcodeproj

xcodeproj(name, adjust_schemes_for_swiftui_previews, archived_bundles_allowed,
          associated_extra_files, bazel_path, build_mode, config, default_xcode_configuration,
          extra_files, focused_targets, install_directory, ios_device_cpus, ios_simulator_cpus,
          minimum_xcode_version, post_build, pre_build, project_name, project_options,
          scheme_autogeneration_mode, schemes, temporary_directory, top_level_targets,
          tvos_device_cpus, tvos_simulator_cpus, unfocused_targets, watchos_device_cpus,
          watchos_simulator_cpus, xcode_configurations, kwargs)

Creates an .xcodeproj file in the workspace when run.

This is a wrapper macro for the actual xcodeproj rule, which can't be used directly. All public API is documented below. The kwargs argument will pass forward values for globally available attributes (e.g. visibility, features, etc.) to the underlying rule.

EXAMPLE

xcodeproj(
    name = "xcodeproj",
    project_name = "App",
    tags = ["manual"],
    top_level_targets = [
        top_level_target(":App", target_environments = ["device", "simulator"]),
        ":Tests",
    ],
)

PARAMETERS

Name Description Default Value
name A unique name for this target. none
adjust_schemes_for_swiftui_previews Optional. Whether to adjust schemes in BwB mode to explicitly include transitive dependencies that are able to run SwiftUI Previews. For example, this changes a scheme for an single application target to also include any app clip, app extension, framework, or watchOS app dependencies. Defaults to True. True
archived_bundles_allowed This argument is deprecated and is now a no-op. It will be removed in a future release. Adjust the setting of --define=apple.experimental.tree_artifact_outputs on build:rules_xcodeproj in your .bazelrc or xcodeproj.bazelrc file. None
associated_extra_files Optional. A dict of files to be added to the project. The key is a string value representing the label of the target the files should be associated with, and the value is a list of Files. These files won't be added to the project if the target is unfocused. {}
bazel_path Optional. The path the bazel binary or wrapper script. If the path is relative it will be resolved using the PATH environment variable (which is set to /opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin in Xcode). If you want to specify a path to a workspace-relative binary, you must prepend the path with ./ (e.g. "./bazelw"). "bazel"
build_mode Optional. The build mode the generated project should use.

If this is set to "xcode", the project will use the Xcode build system to build targets. Generated files and unfocused targets (see the focused_targets and unfocused_targets arguments) will be built with Bazel.

If this is set to "bazel", the project will use Bazel to build targets, inside of Xcode. The Xcode build system still unavoidably orchestrates some things at a high level.
"bazel"
config Optional. The Bazel config to use when generating the project or invoking bazel inside of Xcode. This is the basename of multiple configs. For example, if this is set to "projectx_xcodeproj", then the following configs will be available for you to adjust in your .bazelrc file: projectx_xcodeproj, projectx_xcodeproj_generator, projectx_xcodeproj_indexbuild, and projectx_xcodeproj_swiftuipreviews.

See the usage guide for more information on adjusting Bazel configs.
"rules_xcodeproj"
default_xcode_configuration Optional. The name of the the Xcode configuration to use when building, if not overridden by custom schemes. If not set, the first Xcode configuration alphabetically will be used. Use xcode_configurations to adjust Xcode configurations. None
extra_files Optional. A list of extra Files to be added to the project. []
focused_targets Optional. A list of target labels as string values. If specified, only these targets will be included in the generated project; all other targets will be excluded, as if they were listed explicitly in the unfocused_targets argument. The labels must match transitive dependencies of the targets specified in the top_level_targets argument. []
install_directory Optional. The directory where the generated project will be written to. The path is relative to the workspace root. Defaults to the directory that the xcodeproj target is declared in (e.g. if the xcodeproj target is declared in //foo/bar:BUILD then the default value is "foo/bar"). Use "" to have the project generated in the workspace root. None
ios_device_cpus Optional. The value to use for --ios_multi_cpus when building the transitive dependencies of the targets specified in the top_level_targets argument with the "device" target_environment.

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 iOS targets.
"arm64"
ios_simulator_cpus Optional. The value to use for --ios_multi_cpus when building the transitive dependencies of the targets specified in the top_level_targets argument with the "simulator" target_environment.

If no value is specified, it defaults to the simulator cpu that goes with --host_cpu (i.e. sim_arm64 on Apple Silicon and x86_64 on Intel).

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 "simulator" target_environment, even if they aren't iOS targets.
None
minimum_xcode_version Optional. The minimum Xcode version that the generated project supports. Newer Xcode versions can support newer features, so setting this to the highest value you can will enable the most features. The value is the dot separated version number (e.g. "13.4.1", "14", "14.1"). Defaults to whichever version of Xcode that Bazel uses during project generation. None
post_build The text of a script that will be run after the build. For example: ./post-build.sh, "$SRCROOT/post-build.sh".

The script will be run in Bazel's execution root, so you probably want to change to the $SRCROOT directory in the script.

Currently this script will be run as part of Index Build. If you don't want that (which is probably the case), you should add a check to ensure $ACTION == build.
None
pre_build The text of a script that will be run before the build. For example: ./pre-build.sh, "$SRCROOT/pre-build.sh".

The script will be run in Bazel's execution root, so you probably want to change to the $SRCROOT directory in the script.

Currently this script will be run as part of Index Build. If you don't want that (which is probably the case), you should add a check to ensure $ACTION == build.
None
project_name Optional. The name to use for the .xcodeproj file. If not specified, the value of the name argument is used. None
project_options Optional. A value returned by project_options. None
scheme_autogeneration_mode Optional. Specifies how Xcode schemes are automatically generated.

- 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.

- none: No schemes are automatically generated.

- all: A scheme is generated for every buildable target even if custom schemes are provided.
"auto"
schemes Optional. A list of values returned by xcode_schemes.scheme. Target labels listed in the schemes need to be from the transitive dependencies of the targets specified in the top_level_targets argument. This and the scheme_autogeneration_mode argument together customize how schemes for those targets are generated. []
temporary_directory This argument is deprecated and is now a no-op. It will be removed in a future release. None
top_level_targets A list of a list of top-level targets. 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
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.

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"
tvos_simulator_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 "simulator" target_environment.

If no value is specified, it defaults to the simulator cpu that goes with --host_cpu (i.e. sim_arm64 on Apple Silicon and x86_64 on Intel).

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 "simulator" target_environment, even if they aren't tvOS targets.
None
unfocused_targets Optional. A list of target labels as string values. Any targets in the transitive dependencies of the targets specified in the top_level_targets argument with a matching label will be excluded from the generated project. This overrides any targets specified in the focused_targets argument. []
watchos_device_cpus Optional. The value to use for --watchos_cpus when building the transitive dependencies of the targets specified in the top_level_targets argument with the "device" target_environment.

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 watchOS targets.
"arm64_32"
watchos_simulator_cpus Optional. The value to use for --watchos_cpus when building the transitive dependencies of the targets specified in the top_level_targets argument with the "simulator" target_environment.

If no value is specified, it defaults to the simulator cpu that goes with --host_cpu (i.e. arm64 on Apple Silicon and x86_64 on Intel).

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 "simulator" target_environment, even if they aren't watchOS targets.
None
xcode_configurations Optional. A dict mapping Xcode configuration names to transition settings dictionaries. For example, {"Dev": {"//command_line_option:compilation_mode": "dbg"}, "AppStore": {"//command_line_option:compilation_mode": "opt"}}, would create the "Dev" and "AppStore" configurations, setting --compilation_mode to dbg and opt respectively.

Refer to the bazel documentation on how to define the transition settings dictionary.
{"Debug": {}}
kwargs Additional arguments to pass to the underlying xcodeproj rule specified by xcodeproj_rule. none

top_level_target

top_level_target(label, target_environments)

Constructs a top-level target for use in xcodeproj.top_level_targets.

PARAMETERS

Name Description Default Value
label A Label or label-like string for the target. none
target_environments Optional. A list of target environment strings (see @build_bazel_apple_support//constraints:target_environment; "catalyst" is not currently supported). The target will be configured for each environment.

If multiple environments are specified, then a single combined Xcode target will be created if possible. If the configured targets are the same for each environment (e.g. macOS for ["device", "simulator"]), they will appear as separate but similar Xcode targets. If no environments are specified, the "simulator" environment will be used.
["simulator"]

RETURNS

A struct containing fields for the provided arguments.

top_level_targets

top_level_targets(labels, target_environments)

Constructs a list of top-level target for use in xcodeproj.top_level_targets.

PARAMETERS

Name Description Default Value
labels A list of Label or label-like string for the targets. none
target_environments Optional. See top_level_target.target_environments. ["simulator"]

RETURNS

A list of values returned from top_level_target.

project_options

project_options(development_region, indent_width, organization_name, tab_width, uses_tabs)

Project options for use in xcodeproj.project_options.

PARAMETERS

Name Description Default Value
development_region Optional. The development region for the project. Defaults to "en". "en"
indent_width Optional. The number of spaces to use for indentation. None
organization_name Optional. Populates the ORGANIZATIONNAME attribute for the project. None
tab_width Optional. The number of spaces to use for tabs. None
uses_tabs Optional. Whether to use tabs for indentation. None

RETURNS

A struct containing fields for the provided arguments.

Custom Xcode schemes

To use these functions, load the xcode_schemes module from xcodeproj/defs.bzl:

load("@rules_xcodeproj//xcodeproj:defs.bzl", "xcode_schemes")

xcode_schemes.scheme

xcode_schemes.scheme(name, build_action, launch_action, profile_action, test_action)

Returns a struct representing an Xcode scheme.

PARAMETERS

Name Description Default Value
name The user-visible name for the scheme as a string. none
build_action Optional. A value returned by xcode_schemes.build_action. None
launch_action Optional. A value returned by xcode_schemes.launch_action. None
profile_action Optional. A value returned by xcode_schemes.profile_action. None
test_action Optional. A value returned by xcode_schemes.test_action. None

RETURNS

A struct representing an Xcode scheme.

xcode_schemes.build_action

xcode_schemes.build_action(targets, pre_actions, post_actions)

Constructs a build action for an Xcode scheme.

PARAMETERS

Name Description Default Value
targets A sequence of elements that are either struct values as created by xcode_schemes.build_target, or a target label as a string value. none
pre_actions A sequence of struct values as created by xcode_schemes.pre_action. []
post_actions A sequence of struct values as created by xcode_schemes.post_action. []

RETURNS

A struct representing a build action.

xcode_schemes.build_target

xcode_schemes.build_target(label, build_for)

Constructs a build target for an Xcode scheme's build action.

PARAMETERS

Name Description Default Value
label A target label as a string value. none
build_for Optional. The settings that dictate when Xcode will build the target. It is a value returned by xcode_schemes.build_for. None

RETURNS

A struct representing a build target.

xcode_schemes.build_for

xcode_schemes.build_for(running, testing, profiling, archiving, analyzing)

Construct a struct representing the settings that dictate when Xcode will build a target.

PARAMETERS

Name Description Default Value
running Optional. A bool specifying whether to build for the running phase. None
testing Optional. A bool specifying whether to build for the testing phase. None
profiling Optional. A bool specifying whether to build for the profiling phase. None
archiving Optional. A bool specifying whether to build for the archiving phase. None
analyzing Optional. A bool specifying whether to build for the analyzing phase. None

RETURNS

A struct.

xcode_schemes.launch_action

xcode_schemes.launch_action(target, args, build_configuration, diagnostics, env, working_directory)

Constructs a launch action for an Xcode scheme.

PARAMETERS

Name Description Default Value
target A target label as a string value. none
args Optional. A list of string arguments that should be passed to the target when executed. None
build_configuration Optional. The name of the Xcode configuration to use for this action. If not set, then the configuration determined by xcodeproj.default_xcode_configuration will be used. None
diagnostics Optional. A value returned by xcode_schemes.diagnostics. None
env Optional. A dict of string values that will be set as environment variables when the target is executed. None
working_directory Optional. A string that will be set as the custom working directory in the Xcode scheme's launch action. Relative paths will be relative to the value of target's BUILT_PRODUCTS_DIR, which is unique to it. None

RETURNS

A struct representing a launch action.

xcode_schemes.profile_action

xcode_schemes.profile_action(target, args, build_configuration, env, working_directory)

Constructs a profile action for an Xcode scheme.

PARAMETERS

Name Description Default Value
target A target label as a string value. none
args Optional. A list of string arguments that should be passed to the target when executed. If both this and env are None (not just empty), then the launch action's arguments will be inherited. None
build_configuration Optional. The name of the Xcode configuration to use for this action. If not set, then the configuration determined by xcodeproj.default_xcode_configuration will be used. None
env Optional. A dict of string values that will be set as environment variables when the target is executed. If both this and args are None (not just empty), then the launch action's environment variables will be inherited. None
working_directory Optional. A string that will be set as the custom working directory in the Xcode scheme's launch action. Relative paths will be relative to the value of target's BUILT_PRODUCTS_DIR, which is unique to it. None

RETURNS

A struct representing a profile action.

xcode_schemes.test_action

xcode_schemes.test_action(targets, args, build_configuration, diagnostics, env,
                          expand_variables_based_on, pre_actions, post_actions)

Constructs a test action for an Xcode scheme.

PARAMETERS

Name Description Default Value
targets A sequence of target labels as string values. none
args Optional. A list of string arguments that should be passed to the target when executed. If both this and env are None (not just empty), then the launch action's arguments will be inherited. None
build_configuration Optional. The name of the Xcode configuration to use for this action. If not set, then the configuration determined by xcodeproj.default_xcode_configuration will be used. None
diagnostics Optional. A value returned by xcode_schemes.diagnostics. None
env Optional. A dict of string values that will be set as environment variables when the target is executed. If both this and args are None (not just empty), then the launch action's environment variables will be inherited. None
expand_variables_based_on Optional. One of the specified test target labels. If no value is provided, one of the test targets will be selected. If no expansion context is desired, use the string value none. None
pre_actions Optional. A sequence of struct values as created by xcode_schemes.pre_post_action. []
post_actions Optional. A sequence of struct values as created by xcode_schemes.pre_post_action. []

RETURNS

A struct representing a test action.

xcode_schemes.diagnostics

xcode_schemes.diagnostics(sanitizers)

Constructs the scheme's diagnostics.

PARAMETERS

Name Description Default Value
sanitizers Optional. A struct value as created by xcode_schemes.sanitizers. None

RETURNS

A struct representing scheme's diagnostics.

xcode_schemes.sanitizers

xcode_schemes.sanitizers(address, thread, undefined_behavior)

Constructs the scheme's sanitizers' default state. The state can also be modified in Xcode.

PARAMETERS

Name Description Default Value
address Optional. A boolean value representing whether the address sanitizer should be enabled or not. False
thread Optional. A boolean value representing whether the thread sanitizer should be enabled or not. False
undefined_behavior Optional. A boolean value representing whether the undefined behavior sanitizer should be enabled or not. False

xcode_schemes.pre_post_action

xcode_schemes.pre_post_action(name, script, expand_variables_based_on)

Constructs a pre or post action for a step of the scheme.

PARAMETERS

Name Description Default Value
name Title of the script. "Run Script"
script The script text. none
expand_variables_based_on Optional. The label of the target that environment variables will expand based on. none

RETURNS

A struct representing a scheme's step pre or post action.

Xcode build settings

Rules that provide additional information to the xcodeproj rule, so that it can properly determine values for various Xcode build settings.

xcode_provisioning_profile

xcode_provisioning_profile(name, managed_by_xcode, profile_name, provisioning_profile, team_id)

This rule declares a target that you can pass to the provisioning_profile attribute of rules that require it. It wraps another provisioning profile target, either a File or a rule like rules_apple's local_provisioning_profile, and allows specifying additional information to adjust Xcode related build settings related to code signing.

If you are already using local_provisioning_profile, or another rule that returns the AppleProvisioningProfileInfo provider, you don't need to use this rule, unless you want to enable Xcode's "Automatic Code Signing" feature. If you are using a File, then this rule is needed in order to set the DEVELOPER_TEAM build setting via the team_id attribute.

EXAMPLE

ios_application(
   ...
   provisioning_profile = ":xcode_profile",
   ...
)

xcode_provisioning_profile(
   name = "xcode_profile",
   managed_by_xcode = True,
   provisioning_profile = ":provisioning_profile",
)

local_provisioning_profile(
    name = "provisioning_profile",
    profile_name = "iOS Team Provisioning Profile: com.example.app",
    team_id = "A12B3CDEFG",
)

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this target. Name required
managed_by_xcode Whether the provisioning profile is managed by Xcode. If True, "Automatic Code Signing" will be enabled in Xcode, and the profile name will be ignored. Xcode will add devices to profiles automatically via the currently logged in Apple Developer Account, and otherwise fully manage the profile. If False, "Manual Code Signing" will be enabled in Xcode, and the profile name will be used to determine which profile to use.

If xcodeproj.build_mode != "xcode", then Xcode will still manage the profile when this is True, but otherwise won't use it to actually sign the binary. Instead Bazel will perform the code signing with the file set to provisioning_profile. Using rules_apple's local_provisioning_profile as the target set to provisioning_profile will then allow Bazel to code sign with the Xcode managed profile.
Boolean required
profile_name When managed_by_xcode is False, the PROVISIONING_PROFILE_SPECIFIER Xcode build setting will be set to this value. If this is None (the default), and provisioning_profile returns the AppleProvisioningProfileInfo provider (as local_provisioning_profile does), then AppleProvisioningProfileInfo.profile_name will be used instead. String optional ""
provisioning_profile The File that Bazel will use when code signing. If the target returns the AppleProvisioningProfileInfo provider (as local_provisioning_profile does), then it will provide default values for profile_name and team_id.

When xcodeproj.build_mode = "xcode", the actual file isn't used directly by Xcode, but in order to satisfy Bazel constraints this can't be None.
Label required
team_id The DEVELOPER_TEAM Xcode build setting will be set to this value. If this is None (the default), and provisioning_profile returns the AppleProvisioningProfileInfo provider (as local_provisioning_profile does), then AppleProvisioningProfileInfo.team_id will be used instead. String optional ""

Providers

Providers that are used throughout the rules in this repository.

Most users will not need to use these providers to simply create Xcode projects, but if you want to write your own custom rules that interact with these rules, then you will use these providers to communicate between them.

XcodeProjAutomaticTargetProcessingInfo

XcodeProjAutomaticTargetProcessingInfo(all_attrs, alternate_icons, app_icons, args,
                                       bazel_build_mode_error, bundle_id, codesignopts, deps,
                                       entitlements, env, exported_symbols_lists, hdrs, infoplists,
                                       launchdplists, link_mnemonics, non_arc_srcs, pch,
                                       provisioning_profile, should_generate_target, srcs,
                                       target_type, xcode_targets)

Provides needed information about a target to allow rules_xcodeproj to automatically process it.

If you need more control over how a target or its dependencies are processed, return a XcodeProjInfo provider instance instead.

Warning: This provider currently has an unstable API and may change in the future. If you are using this provider, please let us know so we can prioritize stabilizing it.

FIELDS

Name Description
all_attrs -
alternate_icons An attribute name (or None) to collect the application alternate icons.
app_icons An attribute name (or None) to collect the application icons.
args A List (or None) representing the command line arguments that this target should execute or test with.
bazel_build_mode_error If build_mode = "bazel", then if this is non-None, it will be raised as an error during analysis.
bundle_id An attribute name (or None) to collect the bundle id string from.
codesignopts An attribute name (or None) to collect the codesignopts list from.
deps A sequence of attribute names to collect Targets from for deps-like attributes.
entitlements An attribute name (or None) to collect Files from for the entitlements-like attribute.
env A dict representing the environment variables that this target should execute or test with.
exported_symbols_lists A sequence of attribute names to collect Files from for the exported_symbols_lists-like attributes.
hdrs A sequence of attribute names to collect Files from for hdrs-like attributes.
infoplists A sequence of attribute names to collect Files from for the infoplists-like attributes.
launchdplists A sequence of attribute names to collect Files from for the launchdplists-like attributes.
link_mnemonics A sequence of mnemonic (action) names to gather link parameters. The first action that matches any of the mnemonics is used.
non_arc_srcs A sequence of attribute names to collect Files from for non_arc_srcs-like attributes.
pch An attribute name (or None) to collect Files from for the pch-like attribute.
provisioning_profile An attribute name (or None) to collect Files from for the provisioning_profile-like attribute.
should_generate_target Whether or an Xcode target should be generated for this target. Even if this value is False, setting values for the other attributes can cause inputs to be collected and shown in the Xcode project.
srcs A sequence of attribute names to collect Files from for srcs-like attributes.
target_type See XcodeProjInfo.target_type.
xcode_targets A dict mapping attribute names to target type strings (i.e. "resource" or "compile"). Only Xcode targets from the specified attributes with the specified target type are allowed to propagate.

XcodeProjInfo

XcodeProjInfo(args, compilation_providers, dependencies, envs, extension_infoplists, hosted_targets,
              inputs, is_top_level_target, label, lldb_context, potential_target_merges, outputs,
              replacement_labels, resource_bundle_informations, rule_kind, search_paths, target_type,
              transitive_dependencies, xcode_required_targets, xcode_target, xcode_targets)

Provides information needed to generate an Xcode project.

Warning: This provider currently has an unstable API and may change in the future. If you are using this provider, please let us know so we can prioritize stabilizing it.

FIELDS

Name Description
args A depset of structs with id and arg fields. The id field is the target id of the target and arg values for the target (if applicable).
compilation_providers A value returned from compilation_providers.collect_for_{non_,}top_level.
dependencies A depset of target ids (see the target struct) that this target directly depends on.
envs A depset of structs with id and env fields. The id field is the target id of the target and env values for the target (if applicable).
extension_infoplists A depset of structs with 'id' and 'infoplist' fields. The 'id' field is the target id of the application extension target. The 'infoplist' field is a File for the Info.plist for the target.
hosted_targets A depset of structs with 'host' and 'hosted' fields. The 'host' field is the target id of the hosting target. The 'hosted' field is the target id of the hosted target.
inputs A value returned from input_files.collect, that contains the input files for this target. It also includes the two extra fields that collect all of the generated Files and all of the Files that should be added to the Xcode project, but are not associated with any targets.
is_top_level_target Whether this target is a top-level target. Top-level targets are targets that are valid to be listed in the top_level_targets attribute of xcodeproj. In particular, this means that they aren't library targets, which when specified in top_level_targets cause duplicate mis-configured targets to be added to the project.
label The Label of the target.
lldb_context A value returned from lldb_context.collect.
potential_target_merges A depset of structs with 'src' and 'dest' fields. The 'src' field is the id of the target that can be merged into the target with the id of the 'dest' field.
outputs A value returned from output_files.collect, that contains information about the output files for this target and its transitive dependencies.
replacement_labels A depset of structs with id and label fields. The id field is the target id of the target that have its label (and name) be replaced with the label in the label field.
resource_bundle_informations A depset of structs with information used to generate resource bundles, which couldn't be collected from AppleResourceInfo alone.
rule_kind The ctx.rule.kind of the target.
search_paths A value returned from _process_search_paths, that contains the search paths needed by this target. These search paths should be added to the search paths of any target that depends on this target.
target_type A string that categorizes the type of the current target. This will be one of "compile", "resources", or None. Even if this target doesn't produce an Xcode target, it can still have a non-None value for this field.
transitive_dependencies A depset of target ids (see the target struct) that this target transitively depends on.
xcode_required_targets A depset of values returned from xcode_targets.make for targets that need to be in projects that have build_mode = "xcode". This means that they can't be unfocused in BwX mode, and if requested it will be ignored.
xcode_target An optional value returned from xcode_targets.make.
xcode_targets A depset of values returned from xcode_targets.make, which potentially will become targets in the Xcode project.