TursomServer/ts-core/build.gradle.kts
2021-04-11 18:48:18 +08:00

33 lines
680 B
Plaintext

plugins {
kotlin("jvm")
`maven-publish`
}
dependencies {
api(project(":"))
compileOnly(group = "com.google.code.gson", name = "gson", version = "2.8.6")
}
@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["sourcesJar"])
} catch (e: Exception) {
}
}
}
}