* 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
53 lines
1.2 KiB
Kotlin
53 lines
1.2 KiB
Kotlin
@file:OptIn(ExperimentalWasmDsl::class, ExperimentalKotlinGradlePluginApi::class)
|
|
|
|
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
|
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
|
|
|
|
plugins {
|
|
alias(libs.plugins.kotlin.multiplatform)
|
|
alias(libs.plugins.kotlin.serialization)
|
|
}
|
|
|
|
group = "org.example"
|
|
version = "0.1.0"
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
val jvmMainClass = "Main_jvmKt"
|
|
|
|
kotlin {
|
|
jvmToolchain(17)
|
|
jvm {
|
|
binaries {
|
|
executable {
|
|
mainClass.set(jvmMainClass)
|
|
}
|
|
}
|
|
val jvmJar by tasks.getting(org.gradle.jvm.tasks.Jar::class) {
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
doFirst {
|
|
manifest {
|
|
attributes["Main-Class"] = jvmMainClass
|
|
}
|
|
|
|
from(configurations["jvmRuntimeClasspath"].map { if (it.isDirectory) it else zipTree(it) })
|
|
}
|
|
}
|
|
}
|
|
wasmJs {
|
|
nodejs()
|
|
binaries.executable()
|
|
}
|
|
|
|
sourceSets {
|
|
commonMain.dependencies {
|
|
implementation(libs.mcp.kotlin)
|
|
}
|
|
jvmMain.dependencies {
|
|
implementation(libs.slf4j.simple)
|
|
}
|
|
wasmJsMain.dependencies {}
|
|
}
|
|
}
|