New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deprecate old mavenPublish extension #340
Conversation
@@ -30,6 +30,9 @@ uses Gradle properties. It's generally recommended to set them in your `gradle.p | |||
file. | |||
|
|||
```properties | |||
SONATYPE_HOST=DEFAULT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don't like that you have to specify this, why can't we do default
always and only if you want to change it, you have to declare it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general there are 2 reasons for this
- I think it's generally safer to not add something by default, this way you won't accidentally publish something internal by just running
publish
- From the plugin perspective we can avoid a lot of edge cases by having less
afterEvaluate
blocks, we won't be able to get rid of all of them (like when detecting which plugins are applied to the build) but at least some.
With properties we can still offer easy, low overhead configuration without the cost of afterEvaluate. If you want to publish to maven central you need to add the other properties anyways so it doesn't really increase the setup cost.
The reason for not using default
as the value when no property is present is that it won't work well with the DSL. We would then call publishToMavenCentral(DEFAULT)
immediately and users wouldn't be able to call publishToMavenCentral(S01)
if the prefer to use the DSL over properties.
@@ -30,6 +30,9 @@ uses Gradle properties. It's generally recommended to set them in your `gradle.p | |||
file. | |||
|
|||
```properties | |||
SONATYPE_HOST=DEFAULT | |||
RELEASE_SIGNING_ENABLED=true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here as above
plugin/src/main/kotlin/com/vanniktech/maven/publish/MavenPublishPluginExtension.kt
Outdated
Show resolved
Hide resolved
…shPluginExtension.kt
This deprecates the old
sonatypeHost
andreleaseSigningEnabled
properties on the DSL. It also prepares for the following release to not add maven central as a default publishing target and not to enable release signing by default anymore.Everyone currently publishing through maven central or signing releases without explicitly configuring it will get a warning. To get rid of the warning and prepare for the new behavior
(
SONATYPE_HOST=S01
if s01.sonatype.org is used) needs to be added to the Gradle properties. Alternatively it's possible to use the new extension:Those 2 methods are now also not incubating anymore.
I've already updated the README because the properties are already fully supported.