0

I am trying to automatice the versions uploading to hockey app. Recently I found a gradle plugin for xCode (http://openbakery.org/gradle.php) but I can't make it work... This is my build.gradle file:

buildscript {
  repositories {
    maven {
      url('http://openbakery.org/repository/')
    }
    mavenLocal()
    mavenCentral()
  }
  dependencies {
    classpath 'de.felixschulze.gradle:gradle-cocoapods-plugin:0.3.1'
    classpath group: 'org.openbakery', name: 'xcodePlugin', version: '0.9+'
  }
}

apply plugin: 'xcode'

xcodebuild {

    scheme = 'scheme_name'
    additionalParameters = ['-workspace',  'project.xcworkspace', 'ONLY_ACTIVE_ARCH=NO']
    arch = 'i386 armv7 armv7s'
    sdk = 'iphoneos'
    target = 'target_name'
    signing {
        signIdentity = 'iPhone Developer: name(******)'
        certificateUri = 'file_cert.p12'
        certificatePassword = '*******'
        mobileProvisionURI = 'file_provisioning.mobileprovision'
    }

}

hockeyapp {
    apiToken = "API_TOKEN"
}

when I excute gradle hockeyapp it give me back:

Caused by: java.lang.IllegalStateException: file upload failed: 422 Unprocessable Entity

Trying gradle hockeyapp-prepare and uploading myself project_name.app.dSYM.zip to hockeyapp webpage works.

Thanks!

Edited

Now, gradle works for me. I've been talking with its developer and there was an issue. It needs the appId params (https://github.com/openbakery/gradle-xcodePlugin/commit/2e51aaabf63c6396fdad01ec565279b14874b567). So adding 'appId= "APP_ID"' to hockeyapp and don't use --stacktrace param.

Andrés Brun
  • 185
  • 9
  • Alternative: Use the Mac app for uploading: http://hockeyapp.net/releases/mac/ Also includes a command line tool that you can use as a post archive action to automate. – Kerni Feb 10 '14 at 12:15

1 Answers1

0

I received the "422 Unprocessable Entity" response from HockeyApp while an HTTP debugging proxy was in use:

$ gradle uploadreleaseToHockeyApp -Dhttp.proxyHost=localhost -Dhttp.proxyPort=8888

Removing the proxy settings from the gradle command fixed this issue for me:

$ gradle uploadreleaseToHockeyApp
Nathan
  • 5,272
  • 2
  • 26
  • 28