openbakery / gradle-xcodePlugin

gradle plugin for building Xcode Projects for iOS, watchOS, macOS or tvOS
Apache License 2.0
458 stars 130 forks source link
build-automation gradle ios xcode

gradle-xcodePlugin

The gradle xcode plugin (gxp) makes it easier to build Xcode projects by specifying the build settings in a single configuration file. The goal is to keep the build file as simple as possible, but also enable a great flexibility for the build.

The gxp uses the Apple command line tools (like xcodebuild) to perform the build.

Here a brief overview of the features:

Requirements

Xcode 12 or greater

Current stable version is 0.24.6

Parameters Documentation

Usage

Create a build.gradle file and place it in the same directory where xcodeproj file lies.

Here the minimal content you need in your build.gradle file:

buildscript {
  repositories {
    maven {
      url('https://openbakery.org/repository/')
    }
  mavenCentral()
  }

  dependencies {
    classpath "org.openbakery:xcode-plugin:0.24.+"
  }
}

apply plugin: "org.openbakery.xcode-plugin"

Current develop version

When using the openbakery.org repository you can also get the latest develop version by including develop into the version pattern. e.g.:

classpath "org.openbakery:xcode-plugin:0.24.5.develop.+"

The develop version contains all the changes from the develop branch, where all the fixes and feature are implemented. The development version is deployed automatically when all the projects unit tests are successful, and also the if the example projects build.

Example

You find example projects in example/ with a working build.gradle file. After you have fetched the example go to the example/iOS/Example directory and you build the project different targets:

Need help?

If you need help you can create an issue here on GitHub, you can send me a mail or ask on twitter.

Collaborate

I'm always happy to receive pull requests with new features and if you send a pull request please consider the following things:

License

This project is licensed under the terms of the Apache license. See the LICENSE file.