Fix isApplicationRelease() in Gradle build