-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle.kts
45 lines (42 loc) · 1.4 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
36
37
38
39
40
41
42
43
44
45
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm").version("1.7.20").apply(false)
kotlin("plugin.serialization").version("1.7.20").apply(false)
id("com.github.johnrengelman.shadow").version("7.1.0").apply(false)
}
subprojects {
repositories {
mavenCentral()
maven("https://packages.jetbrains.team/maven/p/skija/maven")
}
tasks {
withType<JavaCompile> {
options.release.set(11)
}
withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "11"
freeCompilerArgs = freeCompilerArgs + listOf(
"-opt-in=kotlin.RequiresOptIn",
)
}
}
withType<Jar> {
// Workaround for https://stackoverflow.com/q/42174572/750510
archiveBaseName.set(rootProject.name + "-" + this.project.path.removePrefix(":").replace(":", "-"))
}
withType<Test> {
useJUnitPlatform {
excludeTags("db", "it")
}
testLogging {
showStandardStreams = true
}
}
withType<ShadowJar> {
transform(Log4j2PluginsCacheFileTransformer::class.java)
}
}
}