TursomServer/build.gradle.kts

57 lines
1.1 KiB
Plaintext
Raw Normal View History

2021-04-11 18:15:58 +08:00
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
2022-04-05 14:24:11 +08:00
kotlin("jvm") version "1.6.20"
2021-07-10 12:04:11 +08:00
`maven-publish`
2021-08-23 15:52:10 +08:00
id("ts-gradle")
2021-04-11 18:15:58 +08:00
}
allprojects {
2021-07-10 12:04:11 +08:00
group = "cn.tursom"
2021-08-14 01:48:22 +08:00
version = "1.0-SNAPSHOT"
2021-04-11 18:15:58 +08:00
2021-07-10 12:04:11 +08:00
repositories {
2021-08-25 16:53:26 +08:00
//mavenCentral()
2021-08-14 00:17:16 +08:00
maven {
url = uri("https://nvm.tursom.cn/repository/maven-public/")
}
2021-07-10 12:04:11 +08:00
}
2021-04-11 18:15:58 +08:00
2021-07-10 12:04:11 +08:00
tasks.withType<JavaCompile> {
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
2021-04-11 18:15:58 +08:00
}
2021-04-19 16:19:35 +08:00
2021-07-10 12:04:11 +08:00
if (project.gradle.startParameter.taskNames.firstOrNull { taskName ->
taskName.endsWith(":test")
} == null) {
tasks.withType<Test> {
enabled = false
}
2021-04-19 16:19:35 +08:00
}
2021-07-10 12:04:11 +08:00
}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
//kotlinOptions.useIR = true
}
2021-04-11 18:15:58 +08:00
}
2021-08-23 15:52:10 +08:00
2021-04-11 18:15:58 +08:00
dependencies {
2021-08-23 15:52:10 +08:00
api(kotlin("stdlib-jdk8"))
api(kotlin("reflect"))
testApi(group = "junit", name = "junit", version = "4.13.2")
2021-04-11 18:15:58 +08:00
}
2021-04-11 18:48:18 +08:00
2021-04-19 16:19:35 +08:00
artifacts {
2021-07-10 12:04:11 +08:00
archives(tasks["kotlinSourcesJar"])
2021-04-19 16:19:35 +08:00
}
2021-08-25 16:53:26 +08:00
publishing {
publish(this)
}