Skip to content

palaniraja/XcodeMigrate

 
 

Repository files navigation

XcodeMigrate

Generate Bazel BUILD files from Xcode projects.

Long term plans:

This project is still in its early stages. It is not yet ready for production use. If you have any questions or ideas, please feel free to open a discussion.

Why XcodeMigrate?

Over nearly ten years of my personal experience of Apple development, I strongly believe that developers should be able to keep focused on creative things rather than wasting time on compile time.

Bazel is designed for this purpose.

However, migrating existing (large) Xcode project to Bazel is not easy. It requires a lot of manual work. BazelMigrate is created to help developers to migrate existing Xcode projects to Bazel with minimal manual work.

Goals

  • Ready to use out of the box, minimal configuration for most projects
  • Full support rules_xcodeproj
  • Mixed language target (Objective-C/Swift) generation using rules_ios

Usage

mint install XcodeMigrate/XcodeMigrate
mint run xcode-migrate generate -p /path/to/your.xcodeproj

At current stage, xcode-migrate only supports generating Bazel files for iOS projects with Swift only frameworks. You can try the testing project under fixtures directory. There is an example in .github/workflows/swift.yml.

Design

  • End-to-end testing with Xcode projects generated by Tuist
  • Decoupling Xcode project parser and generator
XcodeMigrate
 |--XcodeParser - Parsing layer
 |   `--XcodeProj
 |--XcodeAbstraction - Modeling layer (without any dependency to XcodeProj)
 |--BazelGenerator
 |--Common - Shared logic such as logging
 |--FoundationExtension - Extensions to Foundation
 `--TestSupport - Test helpers

(Created by Diagon)

Attributions

This tool is powered by:

Inspired by:

Contributing to XcodeMigrate

We'd love to accept your patches and contributions to this project. Please feel free to open a pull request, an issue, or a discussion.

Get Started

Requirements

  • Xcode 14.0 or later (Swift 5.7 or later)

Run the project

swift run XcodeMigrate

License

XcodeMigrate is released under the MIT license. See LICENSE for details.

About

Covert existing Xcode projects to Bazel (WIP)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 99.5%
  • Makefile 0.5%