migration from jreleaser to mavenPublish plugin (#277)

#152 

## Motivation and Context
To simplify publishing, use the [recommended
plugin](https://www.jetbrains.com/help/kotlin-multiplatform-dev/multiplatform-publish-libraries.html#set-up-the-publishing-plugin)

## Breaking Changes
no

## Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update

## Checklist
- [x] I have read the [MCP
Documentation](https://modelcontextprotocol.io)
- [x] My code follows the repository's style guidelines
- [x] New and existing tests pass locally
- [ ] I have added appropriate error handling
- [ ] I have added or updated documentation as needed
This commit is contained in:
Pavel Gorgulov 2025-09-17 13:07:07 +02:00 • committed by GitHub
commit d909835025
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,58 +1,51 @@
plugins {
`maven-publish`
id("com.vanniktech.maven.publish")
signing
}
val javadocJar by tasks.registering(Jar::class) {
archiveClassifier.set("javadoc")
mavenPublishing {
signAllPublications()
publishToMavenCentral(automaticRelease = true)
pom {
name = project.name
description = "Kotlin implementation of the Model Context Protocol (MCP)"
url = "https://github.com/modelcontextprotocol/kotlin-sdk"
licenses {
license {
name = "MIT License"
url = "https://github.com/modelcontextprotocol/kotlin-sdk/blob/main/LICENSE"
distribution = "repo"
}
}
organization {
name = "Anthropic"
url = "https://www.anthropic.com"
}
developers {
developer {
id = "JetBrains"
name = "JetBrains Team"
organization = "JetBrains"
organizationUrl = "https://www.jetbrains.com"
}
}
scm {
url = "https://github.com/modelcontextprotocol/kotlin-sdk"
connection = "scm:git:git://github.com/modelcontextprotocol/kotlin-sdk.git"
developerConnection = "scm:git:git@github.com:modelcontextprotocol/kotlin-sdk.git"
}
}
}
publishing {
publications.withType<MavenPublication>().configureEach {
if (name.contains("jvm", ignoreCase = true)) {
artifact(javadocJar)
}
pom {
name = project.name
description = "Kotlin implementation of the Model Context Protocol (MCP)"
url = "https://github.com/modelcontextprotocol/kotlin-sdk"
licenses {
license {
name = "MIT License"
url = "https://github.com/modelcontextprotocol/kotlin-sdk/blob/main/LICENSE"
distribution = "repo"
}
}
organization {
name = "Anthropic"
url = "https://www.anthropic.com"
}
developers {
developer {
id = "JetBrains"
name = "JetBrains Team"
organization = "JetBrains"
organizationUrl = "https://www.jetbrains.com"
}
}
scm {
url = "https://github.com/modelcontextprotocol/kotlin-sdk"
connection = "scm:git:git://github.com/modelcontextprotocol/kotlin-sdk.git"
developerConnection = "scm:git:git@github.com:modelcontextprotocol/kotlin-sdk.git"
}
}
}
repositories {
maven {
name = "staging"
url = uri(layout.buildDirectory.dir("staging-deploy"))
}
mavenLocal()
}
}
@ -68,4 +61,4 @@ signing {
useInMemoryPgpKeys(signingKey.get(), signingPassphrase.get())
sign(publishing.publications)
}
}
}