further tidying up of build.gradle; added checks for empty arguments after more integration testing with gradle plugin