TursomServer/ts-core/build.gradle.kts
2021-07-04 18:52:06 +08:00

36 lines
902 B
Plaintext

plugins {
kotlin("jvm")
`maven-publish`
}
dependencies {
api(project(":"))
api(group = "org.slf4j", name = "slf4j-api", version = "1.7.29")
compileOnly("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0")
compileOnly(group = "com.google.code.gson", name = "gson", version = "2.8.6")
compileOnly(group = "io.netty", name = "netty-all", version = "4.1.43.Final")
}
@kotlin.Suppress("UNCHECKED_CAST")
(rootProject.ext["excludeTest"] as (Project, TaskContainer) -> Unit)(project, tasks)
tasks.register("install") {
finalizedBy(tasks["publishToMavenLocal"])
}
publishing {
publications {
create<MavenPublication>("maven") {
groupId = project.group.toString()
artifactId = project.name
version = project.version.toString()
from(components["java"])
try {
artifact(tasks["kotlinSourcesJar"])
} catch (e: Exception) {
}
}
}
}