forked from line/kotlin-jdsl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
73 lines (60 loc) · 1.86 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
import org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
jacoco
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.kotlin.noarg)
alias(libs.plugins.kotlin.allopen)
}
allprojects {
group = "com.linecorp.kotlin-jdsl"
version = "2.0.5.RELEASE"
repositories {
mavenCentral()
}
}
rootProject {
apply<JacocoExtensionPlugin>()
}
subprojects {
apply(plugin = "jacoco")
apply(plugin = "kotlin")
apply(plugin = "kotlin-noarg")
apply(plugin = "kotlin-allopen")
apply<LocalPropertiesPlugin>()
val jdk11Required = name.contains("hibernate-reactive")
val javaVersion = if (jdk11Required) JavaVersion.VERSION_11 else JavaVersion.VERSION_1_8
java.sourceCompatibility = javaVersion
java.targetCompatibility = javaVersion
dependencies {
implementation(rootProject.libs.koltin)
}
allOpen {
annotation("org.springframework.context.annotation.Configuration")
annotation("javax.persistence.Entity")
annotation("javax.persistence.Embeddable")
}
noArg {
annotation("org.springframework.context.annotation.Configuration")
annotation("javax.persistence.Entity")
annotation("javax.persistence.Embeddable")
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict", "-Xjvm-default=all")
jvmTarget = if (jdk11Required) "11" else "1.8"
}
}
tasks.withType<Test> {
useJUnitPlatform()
testLogging {
showExceptions = true
exceptionFormat = FULL
showCauses = true
showStackTraces = true
events = setOf(FAILED)
}
}
}