Refactor build.gradle to prep for publishing