gradle-xcodePlugin makes it easier to build Mac and iOS 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 gradle-xcodePlugin uses the Apple command line tools (like xcodebuild) to perform the build.
Here a brief overview of the features:
- Build iOS and Mac projects
- Override sign settings for iOS builds
- Perform unit tests
- Support for multiple Xcodes (on one machine)
- Cocoapods support
- Appledoc support
- Code coverage support (using gcovr
- Hockeykit, HockeyApp, DeployGate , TestFlight (new Apple Testflight is not supported yet, but on the todo list)
- Sparkle
- Xcode 5 or greater
- Gradle 1.4 or greater
- Java
Current stable version is 0.9.15
0.9.15 supports Xcode 5, Xcode 6 and Xcode 6.1
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('http://openbakery.org/repository/')
}
mavenCentral()
}
dependencies {
classpath group: 'org.openbakery', name: 'xcodePlugin', version: '0.9.+'
}
}
apply plugin: 'xcode'
xcodebuild {
target = 'MY-TARGET'
}
You find an example project in example/Example/ with a working build.gradle file.
After you have fetched the example go to the example/Example
directory and you build the project different targets:
- Build with
gradle build
- Run the unit tests with
gradle test
orgradle continuous
- Perform a device build and upload it to hockeyapp with
gradle integration
. Here you need to specify your sign settings first (see Signing ). Open the build.gradle file an follow the instructions. - Perform an appstore build with
gradle appstore
. (Also the sign settings are needed).