title: Gradle executing curl doesn't upload files
body: <p>I have a Gradle task <code>publish</code> to upload my application using <code>curl</code>:</p>
  
  <pre><code>task publish(dependsOn: assembleRelease) &lt;&lt; {
      def apkName = group + "-" + revision + "-" + android.defaultConfig.versionName + "-release";
      println "Publishing $project.buildDir/apk/" + apkName + ".apk to mobileappstore.com";
      exec {
          executable "/bin/sh"
          args "-c", "curl -k -u 'CD:w2'" +
                  " -F upload=@$project.buildDir/apk/" + apkName +
                  ".apk -F tags=" + apkName + " http://mobileappstore.com/AE/Build/Upload";
      }
  }
  </code></pre>
  
  <p>However, there is an error. The output is:</p>
  
  <pre><code>Publishing [...]/main/build/apk/null-1.0-release.apk to mobileappstore.com
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  curl: (26) failed creating formpost data
  :main:publish FAILED
  
  FAILURE: Build failed with an exception.
  
  * Where:
  Build file '[...]/main/build.gradle' line: 103
  
  * What went wrong:
  Execution failed for task ':main:publish'.
  &gt; Process 'command '/bin/sh'' finished with non-zero exit value 26
  </code></pre>
  
  <p>Another approach I tried:</p>
  
  <pre><code>task publish(dependsOn: assembleRelease) &lt;&lt; {
      def apkName = android.defaultConfig.versionName + "-release";
      println "Publishing $project.buildDir/apk/" + apkName + ".apk to mobileappstore.com";
      exec {
          executable "/bin/sh"
          args "-c", "curl -k -u ", "-F upload=@$project.buildDir/apk/Ae-0.0.1-test.apk", "-F tags=AutoBuild" "https://mobileappstore.com/AE/Build/Upload";
      }
  }
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>* What went wrong:
  Execution failed for task ':main:publish'.
  &gt; No such property: https://mobileapptore.com/AE/Build/Upload for class:       org.gradle.process.internal.DefaultExecAction_Decorated
  </code></pre>