Update package name across the project (#2)

* Change package name

* Update publication

* Update docs

* Update settings.gradle.kts, README and CONTRIBUTING

* Cleanup leftovers
This commit is contained in:
Leonid Stashevsky 2024-12-17 07:28:51 +01:00 • committed by GitHub
commit 215effb7d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,7 +8,7 @@ plugins {
`maven-publish`
}
if (project.getSensitiveProperty("libs.sign.key.private") != null) {
if (project.getSensitiveProperty("SIGNING_KEY_PRIVATE") != null) {
apply(plugin = "signing")
}
@ -16,7 +16,7 @@ tasks.withType<PublishToMavenRepository>().configureEach {
dependsOn(tasks.withType<Sign>())
}
group = "org.jetbrains.kotlinx"
group = "io.modelcontextprotocol"
version = "0.1.0"
repositories {
@ -39,10 +39,10 @@ dependencies {
testImplementation(libs.kotlinx.coroutines.debug)
}
val spaceUsername = System.getenv("SPACE_PACKAGES_USERNAME")
val ossrhUsername = System.getenv("OSSRH_USERNAME")
?: project.findProperty("kotlin.mcp.sdk.packages.username") as String?
val spacePassword = System.getenv("SPACE_PACKAGES_PASSWORD")
val ossrhPassword = System.getenv("OSSRH_TOKEN")
?: project.findProperty("kotlin.mcp.sdk.packages.password") as String?
val sources = tasks.create<Jar>("sourcesJar") {
@ -53,11 +53,10 @@ val sources = tasks.create<Jar>("sourcesJar") {
publishing {
repositories {
maven {
url = uri("https://maven.pkg.jetbrains.space/public/p/kotlin-mcp-sdk/sdk")
name = "Space"
name = "OSSRH"
credentials {
username = spaceUsername
password = spacePassword
username = ossrhUsername
password = ossrhPassword
}
}
}
@ -85,29 +84,29 @@ publishing {
fun MavenPom.configureMavenCentralMetadata() {
name by project.name
description by "Kotlin implementation of the Model Context Protocol (MCP)"
url by "https://github.com/JetBrains/mcp-kotlin-sdk"
url by "https://github.com/modelcontextprotocol/kotlin-sdk"
licenses {
license {
name by "The Apache Software License, Version 2.0"
url by "https://www.apache.org/licenses/LICENSE-2.0.txt"
name by "MIT License"
url by "https://github.com/modelcontextprotocol/kotlin-sdk/blob/main/LICENSE"
distribution by "repo"
}
}
developers {
developer {
id by "JetBrains"
name by "JetBrains Team"
organization by "JetBrains"
organizationUrl by "https://www.jetbrains.com"
id by "Anthropic"
name by "Anthropic Team"
organization by "Anthropic"
organizationUrl by "https://www.anthropic.com"
}
}
scm {
url by "https://github.com/JetBrains/mcp-kotlin-sdk"
connection by "scm:git:git://github.com/JetBrains/mcp-kotlin-sdk.git"
developerConnection by "scm:git:git@github.com:JetBrains/mcp-kotlin-sdk.git"
url by "https://github.com/modelcontextprotocol/kotlin-sdk"
connection by "scm:git:git://github.com/modelcontextprotocol/kotlin-sdk.git"
developerConnection by "scm:git:git@github.com:modelcontextprotocol/kotlin-sdk.git"
}
}
@ -151,7 +150,7 @@ infix fun <T> Property<T>.by(value: T) {
tasks.create<Jar>("localJar") {
dependsOn(tasks.jar)
archiveFileName = "kotlinx-mcp-sdk.jar"
archiveFileName = "kotlin-sdk.jar"
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from(configurations.runtimeClasspath.map {
it.map { if (it.isDirectory) it else zipTree(it) }
@ -168,7 +167,7 @@ abstract class GenerateLibVersionTask @Inject constructor(
) : DefaultTask() {
@TaskAction
fun generate() {
val sourceFile = File(sourcesDir.resolve("org/jetbrains/kotlinx/mcp"), "LibVersion.kt")
val sourceFile = File(sourcesDir.resolve("io/modelcontextprotocol/kotlin/sdk"), "LibVersion.kt")
if (!sourceFile.exists()) {
sourceFile.parentFile.mkdirs()
@ -177,7 +176,7 @@ abstract class GenerateLibVersionTask @Inject constructor(
sourceFile.writeText(
"""
package org.jetbrains.kotlinx.mcp
package io.modelcontextprotocol.kotlin.sdk
public const val LIB_VERSION: String = "$libVersion"
@ -192,7 +191,7 @@ dokka {
dokkaSourceSets.main {
sourceLink {
localDirectory.set(file("src/main/kotlin"))
remoteUrl("https://github.com/JetBrains/mcp-kotlin-sdk")
remoteUrl("https://github.com/modelcontextprotocol/kotlin-sdk")
remoteLineSuffix.set("#L")
documentedVisibilities(VisibilityModifier.Public)
}