Gradle -- execute multiple commands from task
<p>I have 2 separate apps (in one project) that require 2 separate builds (sencha cmd). I have been asked to create a gradle script that will do the builds for both apps. </p>

<p>I created a task that builds one app, but am having troubles using the same task to build the 2nd app.</p>

<p>This is what I have so far:</p>

<pre><code>task senchaCmdBuild (type: Exec) {
  workingDir 'src/main/app/MYAPP'
  commandLine 'cmd', 'c', 'sencha app build'
}
</code></pre>

<p>and this works fine.</p>

<p>When I add the following 2 lines to above task:</p>

<pre><code> workingDir 'src/main/app/MYOTHERAPP'
 commandLine 'cmd', 'c', 'sencha app build'
</code></pre>

<p>the first command is ignored and only the second command executes.</p>

<p>So is there anyway I can execute both commands with one task?</p>