Configure the build to only use credential properties if uploading.

The build now uses the project properties for Sonatype OSS credentials only if an upload is going to be attempted. This removes the need for releasers to modify the build script.

They should put this in their ~/.gradle/gradle.properties …

```
sonatypeOssUsername=«username»
sonatypeOssPassword=«password»
```

The build provides some instruction on this if the releaser doesn't have this set.