plugins { kotlin("jvm") version "1.9.22" id("com.google.protobuf") version "0.9.4" kotlin("plugin.serialization") version "1.9.22" id("io.ktor.plugin") version "2.3.8" } group = "dev.usbharu" version = "1.0.0" application { mainClass.set("io.ktor.server.netty.EngineMain") val isDevelopment: Boolean = project.ext.has("development") applicationDefaultJvmArgs = listOf("-Dio.ktor.development=$isDevelopment") } repositories { mavenCentral() } dependencies { implementation("io.grpc:grpc-kotlin-stub:1.4.1") implementation("io.grpc:grpc-protobuf:1.61.1") implementation("com.google.protobuf:protobuf-kotlin:3.25.3") implementation("io.grpc:grpc-netty:1.61.1") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0") protobuf(files("../unos-proto/src/main/proto/watchdog")) testImplementation("org.jetbrains.kotlin:kotlin-test") implementation("org.mongodb:mongodb-driver-kotlin-coroutine:5.0.0") implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.6.3") implementation("org.mongodb:bson-kotlinx:5.0.0") implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.5.0") implementation("dev.usbharu.unos:utils") implementation("io.ktor:ktor-server-core-jvm") implementation("io.ktor:ktor-server-content-negotiation-jvm") implementation("io.ktor:ktor-serialization-kotlinx-json-jvm") implementation("io.ktor:ktor-server-netty-jvm") implementation("io.ktor:ktor-server-cors") implementation("io.ktor:ktor-server-call-logging") implementation("ch.qos.logback:logback-classic:1.5.3") } tasks.test { useJUnitPlatform() } kotlin { jvmToolchain(17) } protobuf { protoc { artifact = "com.google.protobuf:protoc:3.25.3" } plugins { create("grpc") { artifact = "io.grpc:protoc-gen-grpc-java:1.61.1" } create("grpckt") { artifact = "io.grpc:protoc-gen-grpc-kotlin:1.4.1:jdk8@jar" } } generateProtoTasks { all().forEach { it.plugins { create("grpc") create("grpckt") } it.builtins { create("kotlin") } } } } jib { if (System.getProperty("os.name").toLowerCase().contains("windows")) { dockerClient.environment = mapOf( "DOCKER_HOST" to "localhost:2375" ) } } ktor { docker { localImageName.set("watchdog-be") this.imageTag = version.toString() } }