Read versionName from build.gradle in bash
<p>Is there a way to read the value <code>versionName</code> from the <code>build.gradle</code> file of an Android project to use it in bash?</p>

<p>More precisely: How can I read this value from the file and use it in a Travis-CI script? I'll use it like</p>

<pre><code># ANDROID_VERSION=???
export GIT_TAG=build-$ANDROID_VERSION
</code></pre>

<p>I set up a Travis-CI like described in this post <a href="https://stackoverflow.com/a/28230711/1700776">https://stackoverflow.com/a/28230711/1700776</a>.</p>

<p>My build.gradle: <a href="http://pastebin.com/uiJ0LCSk" rel="noreferrer">http://pastebin.com/uiJ0LCSk</a></p>