-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
44 lines (33 loc) · 1002 Bytes
/
build.gradle.kts
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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
`kotlin-dsl`
}
dependencies {
implementation(libs.gradlePlugin.kotlin)
implementation(libs.gradlePlugin.kotlinxSerialization)
implementation(libs.gradlePlugin.gitVersioning)
implementation(libs.kotlin.dokkaCore)
implementation(libs.gradlePlugin.dokkatoo)
// https://github.com/gradle/gradle/issues/15383#issuecomment-779893192
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
}
val gradleJvmTarget = "11"
val gradleJvmVersion = "11"
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = gradleJvmTarget
}
kotlinOptions.freeCompilerArgs += listOf(
"-opt-in=kotlin.RequiresOptIn",
"-opt-in=kotlin.ExperimentalStdlibApi",
"-opt-in=kotlin.time.ExperimentalTime",
)
}
kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(gradleJvmVersion))
}
kotlinDslPluginOptions {
jvmTarget.set(gradleJvmTarget)
}
}