File size: 4,881 Bytes
ddd81fb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
plugins {
    kotlin("jvm") version "2.1.20"
    kotlin("plugin.serialization") version "2.1.20"
    application
}

application {
    mainClass.set("org.coralprotocol.coralserver.MainKt")
}

group = "org.coralprotocol"
version = "1.0-SNAPSHOT"

repositories {
    mavenCentral()
    maven {
        url = uri("https://central.sonatype.com/repository/maven-snapshots/")
        name = "sonatypeSnapshots"
    }

    maven("https://repo.repsy.io/mvn/chrynan/public")
    maven("https://github.com/CaelumF/schema-kenerator/raw/develop/maven-repo")
}


dependencies {
    testImplementation(kotlin("test"))
    implementation("io.modelcontextprotocol:kotlin-sdk:0.5.0")
    implementation("org.slf4j:slf4j-simple:2.0.9")
    implementation("io.github.oshai:kotlin-logging-jvm:7.0.3")
    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.1")
    implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.8.1")
    implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.1")
    implementation("com.charleskorn.kaml:kaml:0.78.0") // YAML serialization
    implementation("io.github.pdvrieze.xmlutil:core:0.91.0") // XML serialization
    implementation("io.github.pdvrieze.xmlutil:serialization:0.91.0")
    implementation("io.github.pdvrieze.xmlutil:core-jdk:0.91.0")
    implementation("io.github.pdvrieze.xmlutil:serialization-jvm:0.91.0")
    implementation("com.github.docker-java:docker-java:3.5.1")


    // Hoplite for configuration
    implementation("com.sksamuel.hoplite:hoplite-core:2.9.0")
    implementation("com.sksamuel.hoplite:hoplite-yaml:2.9.0")

    val ktorVersion = "3.0.2"
    implementation(enforcedPlatform("io.ktor:ktor-bom:$ktorVersion"))
    implementation("io.ktor:ktor-server-status-pages:${ktorVersion}")

    val uriVersion="0.5.0"
    implementation("com.chrynan.uri.core:uri-core:$uriVersion")
    implementation("com.chrynan.uri.core:uri-ktor-client:$uriVersion")

    // Ktor testing dependencies
    testImplementation("io.ktor:ktor-server-test-host")
    testImplementation("io.ktor:ktor-client-mock")
    val arcVersion = "0.126.0"
    // Arc agents for E2E tests
    testImplementation("org.eclipse.lmos:arc-agents:$arcVersion")
    testImplementation("org.eclipse.lmos:arc-mcp:$arcVersion")
    testImplementation("org.eclipse.lmos:arc-server:$arcVersion")
    testImplementation("org.eclipse.lmos:arc-azure-client:$arcVersion")
    testImplementation("org.eclipse.lmos:arc-langchain4j-client:$arcVersion")
    testImplementation("io.modelcontextprotocol.sdk:mcp:0.11.0-SNAPSHOT") // Override MCP Java client for Arc 0.126.0
    testImplementation("io.mockk:mockk:1.14.2")

    // kotest
    // TODO: Use kotest for some or all tests
//    val kotestVersion = "5.9.1"
//    testImplementation("io.kotest:kotest-runner-junit5:$kotestVersion")
//    testImplementation("io.kotest:kotest-assertions-core:$kotestVersion")
//    testImplementation("io.kotest:kotest-property:$kotestVersion")

    // Ktor client dependencies
    implementation("io.ktor:ktor-client-logging")
    implementation("io.ktor:ktor-client-content-negotiation")
    implementation("io.ktor:ktor-client-cio-jvm")
    implementation("io.ktor:ktor-serialization-kotlinx-json")
    implementation("io.ktor:ktor-client-plugins")

    implementation("net.pwall.json:json-kotlin-schema:0.56")

    // Ktor server dependencies
    implementation("io.ktor:ktor-server-core")
    implementation("io.ktor:ktor-server-cio")
    implementation("io.ktor:ktor-server-sse")
    implementation("io.ktor:ktor-server-html-builder")
    implementation("io.ktor:ktor-server-cors")
    implementation("io.ktor:ktor-server-content-negotiation")
    implementation("io.ktor:ktor-server-resources")
    testImplementation("io.ktor:ktor-server-core")
    testImplementation("io.ktor:ktor-server-cio")
    testImplementation("io.ktor:ktor-server-sse")

    // TOML serialization
    implementation("com.akuleshov7:ktoml-core:0.7.0")
    implementation("com.akuleshov7:ktoml-file:0.7.0")

    // OpenAPI
    val ktorToolsVersion = "5.2.0"
    implementation("io.github.smiley4:ktor-openapi:${ktorToolsVersion}")
    implementation("io.github.smiley4:ktor-redoc:${ktorToolsVersion}")

    val schemaVersion = "2.4.0.1"
    implementation("io.github.smiley4:schema-kenerator-core:${schemaVersion}")
    implementation("io.github.smiley4:schema-kenerator-serialization:${schemaVersion}")
    implementation("io.github.smiley4:schema-kenerator-swagger:${schemaVersion}")
}

tasks.test {
    useJUnitPlatform()
}

tasks.jar {
    manifest {
        attributes["Main-Class"] = "org.coralprotocol.coralserver.MainKt"
    }
    from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
    duplicatesStrategy = DuplicatesStrategy.EXCLUDE
    exclude("META-INF/*.RSA", "META-INF/*.SF", "META-INF/*.DSA")
}

kotlin {
    jvmToolchain(21)
}