-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
82 lines (68 loc) · 1.92 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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
group = "com.github.attacktive"
version = "1.2.9"
java.sourceCompatibility = JavaVersion.VERSION_21
plugins {
val kotlinPluginVersion = "2.1.0"
id("org.springframework.boot") version "3.4.1"
id("io.spring.dependency-management") version "1.1.7"
kotlin("jvm") version kotlinPluginVersion
kotlin("plugin.spring") version kotlinPluginVersion
kotlin("plugin.jpa") version kotlinPluginVersion
jacoco
}
configurations {
compileOnly {
extendsFrom(configurations.annotationProcessor.get())
}
}
repositories {
mavenCentral()
}
dependencies {
val exposedVersion = "0.55.0"
implementation("org.springframework.boot", "spring-boot-starter-web")
implementation("com.fasterxml.jackson.module", "jackson-module-kotlin")
implementation("org.jetbrains.kotlin", "kotlin-stdlib-jdk8")
implementation("org.xerial", "sqlite-jdbc")
implementation("org.jetbrains.exposed", "exposed-core", exposedVersion)
implementation("org.jetbrains.exposed", "exposed-jdbc", exposedVersion)
implementation("org.jetbrains.exposed", "exposed-dao", exposedVersion)
annotationProcessor("org.springframework.boot", "spring-boot-configuration-processor")
testImplementation(kotlin("test"))
testImplementation("org.springframework.boot", "spring-boot-starter-test") {
exclude(module = "junit")
exclude(module = "junit-vintage-engine")
exclude(module = "mockito-core")
}
}
tasks.withType<KotlinCompile> {
compilerOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget.set(JvmTarget.JVM_21)
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
tasks.test {
useJUnitPlatform()
finalizedBy(tasks.jacocoTestReport)
}
tasks.jacocoTestReport {
dependsOn(tasks.test)
reports {
xml.required.set(true)
html.required.set(true)
}
}
tasks.jacocoTestCoverageVerification {
violationRules {
rule {
limit {
minimum = "0.5".toBigDecimal()
}
}
}
}