Monday, November 17, 2014

Gradle iOS Plugin

Gradle iOS Plugin

This plugin is in Beta and Open Source:

https://github.com/jaredsburrows/gradle-ios-plugin

There is an example repository here:

https://github.com/jaredsburrows/gradle-ios-plugin-example


There is an Android Plugin for Gradle, why isn't there one for iOS?

Example "build.gradle":

buildscript {
    repositories {
        jcenter()
    }

    dependencies {
        classpath 'burrows.apps.ios:gradle:0.0.1'
    }
}

apply plugin: 'com.ios.application'

ios {
    compileSdkVersion '8.1'     //  iOS SDK version
    buildToolsVersion '6.1'     //  XCode version

    defaultConfig {
        minSdkVersion 8         // Minimum iOS SDK version
        targetSdkVersion 19     // Target iOS SDK version
        versionCode 1           // *optional*
        versionName '1.0'       // *optional*
    }

    // Cocoa Pods
    pods {
        pod 'Google-Mobile-Ads-SDK'
        pod 'GoogleAnalytics-iOS-SDK'
    }
}

dependencies {
    ...
}

Sunday, July 13, 2014

10 Rules for writing portable software!

I recently came across a good article about writing portable software with C/C++.


Brian's 10 rules for how to write cross platform software:

  1. Don't port 
  2. Factor out the GUI 
  3. Use standard 'C' types 
  4. Use only built in #ifdef compiler flags 
  5. Develop cross-platform base libraries
  6. Use UTF-8 for all APIs 
  7. Don't use 4rd party 'Application Frameworks' 
  8. Raw source builds on all platforms 
  9. All programmers compile on all platforms 
  10. Fire those that can't follow these rules

Source: