modularize sdk (#208)
* Modularize SDK: migrated client and server implementations to separate modules. Removed old configuration files and reorganized the source code structure * add support native targets and update js/wasm configurations * Refactor sample projects: add samples as composite builds, replace hardcoded dependencies with version catalog, remove obsolete gradle wrapper files * Update .gitignore: exclude SWE agent directories (.claude/ and .junie/) * Refine CodeQL workflow: update Kotlin build steps to target individual modules separately instead of building all at once
This commit is contained in:
parent
641df74f5d
commit
8698b96dd2
1 changed files with 979 additions and 2003 deletions
66
buildSrc/src/main/kotlin/mcp.publishing.gradle.kts
Normal file
66
buildSrc/src/main/kotlin/mcp.publishing.gradle.kts
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
plugins {
|
||||
`maven-publish`
|
||||
signing
|
||||
}
|
||||
|
||||
val javadocJar by tasks.registering(Jar::class) {
|
||||
archiveClassifier.set("javadoc")
|
||||
}
|
||||
|
||||
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"
|
||||
}
|
||||
}
|
||||
|
||||
developers {
|
||||
developer {
|
||||
id = "Anthropic"
|
||||
name = "Anthropic Team"
|
||||
organization = "Anthropic"
|
||||
organizationUrl = "https://www.anthropic.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"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
signing {
|
||||
val gpgKeyName = "GPG_SIGNING_KEY"
|
||||
val gpgPassphraseName = "SIGNING_PASSPHRASE"
|
||||
val signingKey = providers.environmentVariable(gpgKeyName)
|
||||
.orElse(providers.gradleProperty(gpgKeyName))
|
||||
val signingPassphrase = providers.environmentVariable(gpgPassphraseName)
|
||||
.orElse(providers.gradleProperty(gpgPassphraseName))
|
||||
|
||||
if (signingKey.isPresent) {
|
||||
useInMemoryPgpKeys(signingKey.get(), signingPassphrase.get())
|
||||
sign(publishing.publications)
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue