Add support for rules_swift targets.

Requires bazelbuild/rules_apple 0.5.0 or higher.

This updates the Tulsi aspect to support the legacy SwiftInfo provider from
rules_apple and the new SwiftInfo provider from rules_swift. The legacy rule
and its support will eventually be removed.

This change also uses the new-style `apple_common.Objc` provider anywhere
that the Objc provider of a Swift target is retrieved. This is safer,
because the new Swift rules *only* propagate it using the new-style
syntax, but providers propagated the old way should still be found using
this form.

PiperOrigin-RevId: 201018964
11 files changed
tree: 9dc526a438093ca5499ebd8da2226dee616670f1
  1. site/
  2. src/
  3. Tulsi.tulsiproj/
  4. .gitignore
  5. AUTHORS
  6. BUILD
  7. CONTRIBUTING.md
  8. CONTRIBUTORS
  9. LICENSE
  10. README.md
  11. version.bzl
  12. WORKSPACE
README.md

Tulsi - an Xcode Project Generator For Bazel

Building and installing

  1. Open src/Tulsi.xcodeproj, and within Xcode, build the TulsiApp.

  2. Run the TulsiApp.

Notes

Tulsi-generated Xcode projects use Bazel to build, not Xcode via xcbuild. This means that many common components of an Xcode project are handled differently than you may be used to. Notable differences:

  • BUILD files are the source of truth; most changes made to your Xcode project won't affect the build.
    • Adding new sources to the Xcode project won't include them in your app; they must be added to BUILD files.
    • Changes made to your BUILD files, such as adding new library dependencies, are incorporated automatically when building your generated project. The only time you need to re-run Tulsi is if you want to add additional build targets or have new source files show up in Xcode for editing.
    • The Info.plist file is governed entirely by BUILD rules in Bazel and is not displayed in the Xcode UI.
    • Changes to compilation flags (i.e. -DHELLO) should be made in the BUILD files in order to affect the build; changes made to compilation settings in the Xcode UI will only affect indexing. You may want to regenerate your project using Tulsi after modifying compilation flags.