Gradle fixes (disable signing if not publishing)

To prevent signing errors I applied the same predicate to the `signArchives` as to the `uploadArchives` task. Now it's possible to build without having the sonatype credentials, keys etc.