Updated build.gradle

fixed not publishing based on param passed in