-
Notifications
You must be signed in to change notification settings - Fork 71
/
build.gradle.kts
35 lines (31 loc) · 1.14 KB
/
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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
// Plugins declared here instead of settings.gradle.kts because otherwise I get an error saying the kotlin plugin was
// applied multiple times.
plugins {
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.kotlin.jvm) apply false
`kotlin-dsl` apply false
alias(libs.plugins.kotlinx.serialization) apply false
}
subprojects {
repositories {
mavenCentral()
google()
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") {
content {
includeGroup("com.varabyte.truthish")
}
}
}
// Require Java 11 for a few APIs. A very important one is ProcessHandle, used for detecting if a
// server is running in a cross-platform way.
val jvmTarget = JvmTarget.JVM_11
tasks.withType<JavaCompile>().configureEach {
sourceCompatibility = jvmTarget.target
targetCompatibility = jvmTarget.target
}
tasks.withType<KotlinCompile>().configureEach {
compilerOptions.jvmTarget.set(jvmTarget)
}
}