-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
93 lines (76 loc) · 2.66 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_1_8
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.gradle.api.tasks.testing.logging.TestExceptionFormat.*
import org.gradle.api.tasks.testing.logging.TestLogEvent.*
plugins {
// Plugins version management
alias(libs.plugins.kotlin.jvm).apply(false)
alias(libs.plugins.kotlin.spring).apply(false)
alias(libs.plugins.spring.boot).apply(false)
alias(libs.plugins.spring.dependency.management).apply(false)
alias(libs.plugins.cucumber).apply(false)
alias(libs.plugins.pact).apply(false)
// Applied plugins
alias(libs.plugins.taskinfo).apply(true)
}
val catalog = libs // Workaround: Don't know why you can't use libs (version catalog) inside subproject block
subprojects {
group = "clean.the.forest"
version = "0.0.1-SNAPSHOT"
apply {
// Common plugin for all modules
plugin("groovy")
plugin(catalog.plugins.kotlin.jvm.get().pluginId)
plugin(catalog.plugins.kotlin.spring.get().pluginId)
plugin(catalog.plugins.spring.dependency.management.get().pluginId)
plugin(catalog.plugins.taskinfo.get().pluginId)
plugin("project-report")
}
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
val implementation by configurations
catalog.bundles.kotlin.get().forEach { implementation(it) }
}
tasks.withType<JavaCompile> {
sourceCompatibility = JavaVersion.VERSION_17.toString()
targetCompatibility = JavaVersion.VERSION_17.toString()
}
tasks.withType<GroovyCompile> {
sourceCompatibility = JavaVersion.VERSION_17.toString()
targetCompatibility = JavaVersion.VERSION_17.toString()
}
tasks.withType<KotlinCompile> {
compilerOptions {
apiVersion.set(KOTLIN_1_8)
languageVersion.set(KOTLIN_1_8)
jvmTarget.set(JvmTarget.JVM_17)
freeCompilerArgs.set(listOf("-Xjsr305=strict"))
}
}
tasks.withType<Test> {
testLogging {
exceptionFormat = FULL
showExceptions = true
showStandardStreams = true
events(PASSED, FAILED, SKIPPED, STANDARD_ERROR)
}
}
// Task info plugin configuration
taskinfo {
isClipped = false
isColor = true
isShowTaskTypes = true
isInternal = false
}
}
configurations {
all {
// Globally exclude JUnit4 from classpath in favor of JUnit5
exclude(group = "junit", module = "junit")
exclude(group = "org.junit.vintage", module = "junit-vintage-engine")
}
}