Skip to content

Conversation

@e5l
Copy link
Member

@e5l e5l commented Jul 10, 2025

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:

ORG_GRADLE_PROJECT_mavenCentralUsername=username
ORG_GRADLE_PROJECT_mavenCentralPassword=the_password

# see below for how to obtain this
ORG_GRADLE_PROJECT_signingInMemoryKey=exported_ascii_armored_key
# Optional
ORG_GRADLE_PROJECT_signingInMemoryKeyId=12345678
# If key was created with a password.
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword=some_password

@e5l e5l self-assigned this Jul 10, 2025
@e5l e5l requested review from Copilot and obabichevjb July 10, 2025 07:09
Copy link
Contributor

Copilot AI left a 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 buildSrc to 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-publish plugin with the Vanniktech plugin alias (e.g. alias(libs.plugins.mavenPublish) or id("com.vanniktech.maven.publish")).
    `maven-publish`

implementation(libs.jvm)
implementation(libs.docker.compose)
implementation(libs.detekt)
implementation(libs.maven.publish)
Copy link

Copilot AI Jul 10, 2025

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.

Suggested change
implementation(libs.maven.publish)
implementation(libs.mavenPublish)

Copilot uses AI. Check for mistakes.
Comment on lines +45 to +52
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" }
Copy link

Copilot AI Jul 10, 2025

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).

Copilot uses AI. Check for mistakes.
@e5l e5l requested a review from bog-walk July 10, 2025 07:15
@e5l e5l changed the title Migrate to Vanniktech Maven Publish plugin chore: Migrate to Vanniktech Maven Publish plugin Jul 10, 2025
@e5l e5l force-pushed the e5l/publishing-update branch from df70166 to 71118d9 Compare July 10, 2025 07:19
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) {
Copy link
Collaborator

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?

Copy link
Member Author

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

@e5l e5l merged commit ad98f40 into main Jul 23, 2025
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants