-
Notifications
You must be signed in to change notification settings - Fork 751
chore: Migrate to Vanniktech Maven Publish plugin #2552
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
Conversation
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.
Pull Request Overview
This PR migrates the project’s publishing setup to use the Vanniktech Maven Publish plugin, removing custom publication logic and updating the version catalog and buildSrc accordingly.
- Added the Vanniktech plugin version and alias to the version catalog (
libs.versions.toml) - Removed legacy publishing helpers and module-specific publishing blocks in favor of the central plugin
- Updated
buildSrcto depend on the new plugin
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| gradle/libs.versions.toml | Added version entry and library/plugin alias for Vanniktech Maven Publish |
| exposed-bom/build.gradle.kts | Removed manual publishing block but still applies core maven-publish |
| buildSrc/src/main/kotlin/org/jetbrains/exposed/gradle/Publishing.kt | Removed now-unneeded custom publishing functions |
| buildSrc/build.gradle.kts | Added implementation dependency on the new Maven Publish plugin |
Comments suppressed due to low confidence (1)
exposed-bom/build.gradle.kts:3
- If the intent is to use the Vanniktech plugin, replace the core
maven-publishplugin with the Vanniktech plugin alias (e.g.alias(libs.plugins.mavenPublish)orid("com.vanniktech.maven.publish")).
`maven-publish`
| implementation(libs.jvm) | ||
| implementation(libs.docker.compose) | ||
| implementation(libs.detekt) | ||
| implementation(libs.maven.publish) |
Copilot
AI
Jul 10, 2025
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.
This reference (libs.maven.publish) does not match the declared alias maven-publish; it should be accessed as libs.mavenPublish or, for the plugin, libs.plugins.mavenPublish.
| implementation(libs.maven.publish) | |
| implementation(libs.mavenPublish) |
| maven-publish = "0.33.0" | ||
|
|
||
| [libraries] | ||
| jvm = { group = "org.jetbrains.kotlin.jvm", name = "org.jetbrains.kotlin.jvm.gradle.plugin", version.ref = "kotlin" } | ||
| docker-compose = { group = "com.avast.gradle", name = "gradle-docker-compose-plugin", version.ref = "docker-compose" } | ||
| detekt = { group = "io.gitlab.arturbosch.detekt", name = "detekt-gradle-plugin", version.ref = "detekt" } | ||
| detekt-formatting = { group = "io.gitlab.arturbosch.detekt", name = "detekt-formatting", version.ref = "detekt" } | ||
|
|
||
| maven-publish = { group = "com.vanniktech", name = "gradle-maven-publish-plugin", version.ref = "maven-publish" } |
Copilot
AI
Jul 10, 2025
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.
[nitpick] The key maven-publish is used both for the version entry and as the library/plugin alias, which may cause confusion; consider a more descriptive version alias (e.g. vanniktech-maven-publish-version).
df70166 to
71118d9
Compare
| allprojects { | ||
| if (this.name != "exposed-tests" && this.name != "exposed-bom" && this.name != "exposed-r2dbc-tests" && this != rootProject) { | ||
| configurePublishing() | ||
| if (this.name != "exposed-tests" && this.name != "exposed-r2dbc-tests" && this != rootProject) { |
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.
Should we also exclude exposed-bom as before?
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.
nope, it is configured as regular module now
Description
Summary of the change: Migrate to Vanniktech Maven Publish plugin to support the new Maven Central publication scheme.
According to docs (https://vanniktech.github.io/gradle-maven-publish-plugin/central/#secrets) we also need to update CI with the following env variables: