Skip to content

jquave/gradle-xcodePlugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChannelPoint Usage

In build.gradle

buildscript {
  repositories {
    mavenCentral()
    // Look at ~/.m2 for dependencies
    mavenLocal()
  }
  dependencies {
    // This is a custom built version of this to add tvOS support for us
    
    // Local dev repo (for making changes)
    //classpath "org.openbakery:xcode-plugin:0.12.4-CHANNELPOINT"
    
    // Remote github repo (if you don't need changes)
    classpath('org.openbakery:xcode-plugin:0.12.4-CHANNELPOINT').ext.git = 'https://github.com/jquave/gradle-xcodePlugin.git'
    
  }
}

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

xcodebuild {
  scheme = 'TVApp'
  target = 'TVApp'
  destination {
    // Simulator
    platform = "tvOS Simulator"
    name = "Apple TV 1080p"
    os = "9.0"
  }
  destination {
    // Device
    platform = "tvOS"
    name = "Apple TV"
    os = "9.*"
  }
}

gradle-xcodePlugin

Build Status

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:

Note

With version 0.12 the sdk parameter was removed and was replaced by the new type and simulator parameter

Here a table of the values for the migration to 0.12:

sdk (old) type (new) simulator (new)
iphonesimulator iOS true
iphoneos iOS false
macosx OSX (this value is ignored)

Requirements

  • Xcode 6 or greater
  • Gradle 2.0 or greater
  • Java 1.6 or greater

tvOS version is 0.12.4-CHANNELPOINT

0.12.x supports Xcode 6.+ and Xcode 7.+

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:

plugins {
  id "org.openbakery.xcode-plugin" version "0.12.4-CHANNELPOINT"
}

xcodebuild {
  scheme = 'MY-SCHEMA'
  target = 'MY-TARGET'
}

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:

  • Build with gradle xcodebuild
  • Run the unit tests with gradle test
  • 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).

Collaborate

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

  • Use the develop branch for pull requests, because all the new stuff is implemented in the develop branch and also pull requests are always merge into develop
  • Use Tabs instead of spaces.
  • Make sure that all unit tests are working before you send the pull request. Just run 'gradle test'
  • I urge you to write unit tests.
  • For unit test please use the spock framework for mocking. I want to remove the old gmock framework and port the old tests to use spock.
  • If a pull request does not contain any unit tests, I always think twice if I should merge it at all.

About

gradle xcodePlugin to build tvOS Apps

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Groovy 94.6%
  • Objective-C 3.9%
  • Other 1.5%