title: How to create an OBB file using Gradle
body: <p>How do I create an OBB file for my application using Gradle with the android plugin? As of now, I have to either zip or use the jobb tool to create my OBB file. If there were a means of creating the OBB file entirely through Gradle it would simplify my build process and my life.</p>
  
  <p>MY current process involves creating a Gradle task that kicks of a shell script. Not totally desirable but it works. I am wondering however about zip support in Gradle. </p>
  
  <pre><code>task buildOBBOSX(type:Exec) {
      workingDir '.'
  
      //note: according to the docs, the version code used is that of the "first"
      // apk with which the expansion is associated with
      commandLine './buildOBB.sh'
  
      //store the output instead of printing to the console:
      standardOutput = new ByteArrayOutputStream()
  
      ext.output = {
          return standardOutput.toString()
      }
  }
  </code></pre>
  
  <p>Maybe this is the best solution? Possibly. If so, and nobody recommends better, I will add it as an answer.</p>