Go to file
Kas a3684c66d6
Add linting for mismatching build configurations in a workspace (#474)
Resolves https://github.com/tuist/tuist/issues/467

- All projects' build configurations are now validated against the top level projects
- In the event any are missing or are mismatching (e.g. have a mismatching variant) the linter will now flag them

Example:

```
$ tuist generate
The following issues have been found:
  - The project 'Framework2' has missing or mismatching configurations. It has [Debug (debug), Release (release)], other projects have  [Beta (release), Debug (debug), Release (release)].
```

Test Plan:

- Run `tuist generate` within `fixtures/ios_app_with_multi_configs`
- Comment out any of the build configurations defined in `App`, `Framework1` or `Framework2`
- Re-run `tuist generate`
- Verify a lint warning is displayed
2019-08-04 10:01:57 +01:00
.circleci Set up the Galaxy frontend's stack (#433) 2019-07-03 13:41:08 +02:00
.github Add issue template for RFCs (#418) 2019-06-22 20:04:17 +02:00
.vscode Set up the Galaxy frontend's stack (#433) 2019-07-03 13:41:08 +02:00
Sources Add linting for mismatching build configurations in a workspace (#474) 2019-08-04 10:01:57 +01:00
Tests Add linting for mismatching build configurations in a workspace (#474) 2019-08-04 10:01:57 +01:00
assets Rename logo 2018-11-04 22:53:22 -05:00
design Add sketch file 2019-07-02 19:12:10 +02:00
docs Bump lodash from 4.17.11 to 4.17.14 in /docs (#470) 2019-08-02 13:24:39 -04:00
features Allow specifying multiple configurations within project manifests (#451) 2019-07-31 20:44:11 +01:00
fixtures Allow specifying multiple configurations within project manifests (#451) 2019-07-31 20:44:11 +01:00
galaxy Bump lodash.template from 4.4.0 to 4.5.0 in /galaxy (#471) 2019-08-02 13:24:28 -04:00
install Create a symlink, swift-project pointing to /usr/local/bin/tuist (#447) 2019-07-18 15:48:45 +02:00
script Improve script output 2018-09-20 11:15:24 +02:00
.editorconfig Add some badges 2018-04-17 10:14:48 +02:00
.gitattributes Add Danger (#186) 2018-12-21 20:01:04 +01:00
.gitignore Set up the Galaxy frontend's stack (#433) 2019-07-03 13:41:08 +02:00
.jazzy.yaml Bump Swift version 2019-04-28 22:49:35 +02:00
.prettierrc Add some badges 2018-04-17 10:14:48 +02:00
.rubocop.yml Merge galaxy into the Tuist repository (#428) 2019-07-01 17:28:58 +02:00
.ruby-gemset Add `.ruby-gemset` 2019-03-10 05:51:48 +00:00
.ruby-version Ruby 2.6.3 2019-07-01 17:52:59 +02:00
.swift-version Bump Swift version 2019-04-28 22:49:35 +02:00
.swiftformat Remove App Delegate Warning (#291) 2019-03-17 12:50:56 +01:00
.swiftformat-version Re-enable swiftformat (#405) 2019-06-11 15:59:08 +01:00
.swiftlint.yml Add swiftlint (#245) 2019-02-27 08:45:56 -05:00
.whitesource Initial WhiteSource configuration file 2019-05-23 13:44:49 +00:00
CHANGELOG.md Add linting for mismatching build configurations in a workspace (#474) 2019-08-04 10:01:57 +01:00
Dangerfile Re-enable swiftformat (#405) 2019-06-11 15:59:08 +01:00
Gemfile Bump rubocop from 0.73.0 to 0.74.0 (#469) 2019-08-02 10:34:03 -04:00
Gemfile.lock Bump rubocop from 0.73.0 to 0.74.0 (#469) 2019-08-02 10:34:03 -04:00
LICENSE.md Add LICENSE 2018-06-28 15:00:33 +02:00
Package.resolved Upgrade XcodeProj to 7.0.0 (#421) 2019-06-26 11:41:28 +02:00
Package.swift Generate a dot graph from the project graph (#382) 2019-06-29 08:48:24 +02:00
README.md Adding ability to re-generate individual projects (#457) 2019-07-24 11:39:04 +01:00
RELEASE.md Package and upload Tuist on every commit build (#403) 2019-06-20 22:25:50 +02:00
Rakefile Package and upload Tuist on every commit build (#403) 2019-06-20 22:25:50 +02:00
netlify.toml Remove node_modules before installing 2019-04-22 07:18:45 +02:00
secrets.ejson Package and upload Tuist on every commit build (#403) 2019-06-20 22:25:50 +02:00

README.md

code style: prettier CircleCI codecov Slack

What's Tuist 🕺

Tuist is a command line tool that helps you generate, maintain and interact with Xcode projects.

It's open source and written in Swift.

Defining your projects 💼

With Tuist, projects are defined in a Project.swift, also known as manifest. The manifest format abstracts you from the implementation details of Xcode projects. In your manifest you can define which targets your project has, which sources and resources belong to them, as well as the dependencies with targets in the same and other projects. The advantages of defining the projects in a manifest are:

  • It can catch misconfigurations and fail early. For example, if a target has an invalid dependency, itll let you know before you start compiling the app.
  • Since the manifest doesnt include Xcode implementation details, the likelihood of having git conflicts is significantly lower.
  • It makes the configuration easier. The decision on how the project looks is on you. Tuist processes it and manages the complexity for you. One example of that complexity is setting up dependencies between targets.

The example below shows how projects are defined with Tuist:

import ProjectDescription

let project = Project(name: "App",
                      targets: [
                        Target(name: "App",
                               platform: .iOS,
                               product: .app,
                               bundleId: "io.tuist.App",
                               infoPlist: "Info.plist",
                               sources: ["Sources/**", "OtherSources/**"],
                               dependencies: [
                                    /* Target dependencies can be defined here */
                                    /* .framework(path: "framework") */
                                ]),
                        Target(name: "AppTests",
                               platform: .iOS,
                               product: .unitTests,
                               bundleId: "io.tuist.AppTests",
                               infoPlist: "Tests.plist",
                               sources: "Tests/**",
                               dependencies: [
                                    .target(name: "App")
                               ])
                      ])

Interacting with your projects 🙇‍♀️

Tuist leverages project generation to provide a simple and convenient set of commands, standard across all the projects. The commands infer most of the necessary information from your projects, requiring you to pass only the arguments that are strictly necessary.

Having a standard command line interface makes it easier to jump between projects since theres an interaction language everyone in the team is familiar with.

  • 👩‍💻 Init: Bootstraps a new project. You can specify the platform and the type of project and itll generate all the necessary artifacts (Info.plist, AppDelegate, Project.swift, Playgrounds…).
  • 💫 Generate: Generates the Xcode workspace and projects to work on a particular project.
  • 📦 Build: (Not available yet) Builds the project in the current directory. It supports all the arguments that xcodebuild supports.
  • Test: (Not available yet) Test the project in the current directory. It supports all the arguments that xcodebuild supports.
  • 📱 Run: (Not available yet) Runs the project. If the project needs a device to run on, itll prompt you to select one.
  • 🚀 Release: (Not available yet) Builds and publishes your project on iTunes Connect.

The list of actions will likely grow as we get feedback from you.

Install ⬇️

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/tuist/tuist/master/install/install)"

Bootstrap your first project 🌀

tuist init --platform ios --product application
tuist generate # Generates Xcode project & workspace

Check out the project "Getting Started" guide to learn more about Tuist and all its features.

Documentation 📝

Do you want to know more about what Tuist can offer you? Or perhaps want to contribute to the project and you need a starting point? You can check out the project documentation.

Setup for development 👩‍💻

  1. Git clone: git clone git@github.com:tuist/tuist.git
  2. Generate Xcode project with swift package generate-xcodeproj.
  3. Open tuist.xcodeproj.
  4. Have fun 🤖

Testing

Unit tests

Tuist has a suite of unit tests for its various target that can be run via Swift Packager Manager by invoking:

swift test

Acceptance tests

Additionally, Tuist has a few high level acceptance tests written in cucumber and ruby which can be run by invoking:

rake features

Shield

If your project uses Tuist, you can add the following badge to your project README:

Tuist Badge

[![Tuist Badge](https://img.shields.io/badge/powered%20by-Tuist-green.svg?longCache=true)](https://github.com/tuist)

Open source

Tuist is a proud supporter of the Software Freedom Conservacy

Become a Conservancy Supporter!

License

FOSSA Status