Or `sdk ?: System.env.ANDROID_HOME` instead of lines 26 to 30.
Elvis to the rescue: http://mrhaki.blogspot.de/2009/08/groovy-goodness-elvis-operator.html