Clean up Gradle build and add Artifactory publishing.