0.8: Bazel configurability
What’s Changed
⚠️ Breaking Changes ⚠️
device_and_simulator
has been deprecated. Use the newtop_level_target.target_environments
argument instead: #965xcode_provisioning_profile
has moved fromxcodeproj/experimental.bzl
toxcodeproj/xcodeproj.bzl
: #1069xcodeproj.build_mode
now defaults to"bazel"
: #1022- It is now an error to list non-top-level targets in
top_level_targets
: #1104
New
- The project generator is now run inside a runner script, and allows for configuration via Bazel configs: #911, #950, #952, #990, #1061, #1062, and #1075
- This means that most command-line flags you pass to
bazel run //:xcodeproj
are ignored - To adjust the project generation, use the newly available Bazel configs
- This means that most command-line flags you pass to
- Bazel-built Swift now uses index-while-building: #1040, #1043, #1096, and #1098
- Added support for custom working directory in custom scheme launch actions: #1051, #1074, and #1076
- Added support for custom Swift toolchains: #1027
- Added support for adding extra files to the project: #1080
- Added support for custom scheme pre and post actions: #1047
Fixes and Improvements
- Test issues now navigate to their source location in BwB mode: #961
- Test targets now use their non-internal name: #980 and #1044
- All versions of Info.plist for a given target are now generated when building: #985
- Added support for the "Compile File" command: #976
- Fixed handling of missing
AppleBinaryInfo.infoplist
: #1002 - (Mostly) fixed handling of
apple_universal_binary
targets: #1003, #1004, and #1034 - The generator is now a universal target with a set minimum OS: #1008
- Extracted
bazel_build.sh
to a script: #1009 and #1016 - Fixed quoting of single-file build settings: #1045
- Improved handling of
top_level_cache_buster
: #1050 and #1103 - Index Build's bazel outputs are now stored inside a directory of the normal Bazel output: #1053
- Binary rules are now codesigned, fixing the Memory Graph Debugger: #1058
- Fixed edge-case building of unfocused dependencies: #1093
- Bazel now uses the correct Xcode version when compiling: #1099, #1100, and #1102
- Merged library targets are now automatically focused when their destination target is focused: #1108
Full Changelog: 0.7.1...0.8.0
Contributors
First PRs
- @chiragramani made their first contribution in #1047
Workspace Snippet
Please use the release asset (release.tar.gz
) from your Bazel WORKSPACE
instead of GitHub's source asset to reduce download size and improve reproducibility.
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "com_github_buildbuddy_io_rules_xcodeproj",
sha256 = "663bf83d8725f39694125d790eacd373e4c063bf80be4e6b5daa0a5dbe74df1f",
url = "https://github.com/buildbuddy-io/rules_xcodeproj/releases/download/0.8.0/release.tar.gz",
)
load(
"@com_github_buildbuddy_io_rules_xcodeproj//xcodeproj:repositories.bzl",
"xcodeproj_rules_dependencies",
)
xcodeproj_rules_dependencies()
load(
"@build_bazel_rules_apple//apple:repositories.bzl",
"apple_rules_dependencies",
)
apple_rules_dependencies()
load(
"@build_bazel_rules_swift//swift:repositories.bzl",
"swift_rules_dependencies",
)
swift_rules_dependencies()
load(
"@build_bazel_rules_swift//swift:extras.bzl",
"swift_rules_extra_dependencies",
)
swift_rules_extra_dependencies()
load(
"@build_bazel_apple_support//lib:repositories.bzl",
"apple_support_dependencies",
)
apple_support_dependencies()