Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade maven publish plugin to 0.21.0 and restore publishing (#773)
Without this change, the recent Gradle upgrade (#743) resulted in the following error while trying to publish to maven central: ``` > Task :jar-infer:jar-infer-cli:publishShadowPublicationToLocalRepository FAILED FAILURE: Build failed with an exception. * What went wrong: Some problems were found with the configuration of task ':jar-infer:jar-infer-cli:publishShadowPublicationToLocalRepository' (type 'PublishToMavenRepository'). - Gradle detected a problem with the following location: '/Users/lazaro/Uber/NullAway/jar-infer/jar-infer-cli/build/libs/jar-infer-cli-0.10.11.jar.asc'. Reason: Task ':jar-infer:jar-infer-cli:publishShadowPublicationToLocalRepository' uses this output of task ':jar-infer:jar-infer-cli:signMavenPublication' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Possible solutions: 1. Declare task ':jar-infer:jar-infer-cli:signMavenPublication' as an input of ':jar-infer:jar-infer-cli:publishShadowPublicationToLocalRepository'. 2. Declare an explicit dependency on ':jar-infer:jar-infer-cli:signMavenPublication' from ':jar-infer:jar-infer-cli:publishShadowPublicationToLocalRepository' using Task#dependsOn. 3. Declare an explicit dependency on ':jar-infer:jar-infer-cli:signMavenPublication' from ':jar-infer:jar-infer-cli:publishShadowPublicationToLocalRepository' using Task#mustRunAfter. ``` This change fixes that issue and also upgrades `com.vanniktech:gradle-maven-publish-plugin` to 0.21.0, the latest compatible version (versions from 0.23.0 onwards don't seem to be compatible with JDK8, and 0.22.0 gives a separate error). Long term, we need to update the CI testing flow for publishing we added in #768 to also cover jar signing workflows.
- Loading branch information