Do not publish stale signature files This commit fixes the publication of stale signature files: prior to this change it was possible that a signature generated in a previous build for a different artifact was uploaded even if no signature was generated during the build, which would lead to inconsistent publications.
In addition, it makes it an error to publish something which doesn't have the main artifact created (or, at least up-to-date) in this build. In other words, if the task which generates the main artifact is disabled, it's an error to publish.
Allow the services required by a given class to be queried prior to creating any instances of that class. Use this to allow `ArtifactTransformDependencies` to be injected into artifact transforms using any of the service injection patterns (that is, via a constructor or a getter).