-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
128 lines (117 loc) · 4.15 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
val detektVersion: String by project
val ktlintVersion: String by project
val kotlinLoggingVersion: String by project
val testcontainersVersion: String by project
val kotestVersion: String by project
val springCloudVersion: String by project
val telegramBotsVersion: String by project
val jsoupVersion: String by project
val mockkVersion: String by project
val exposedVersion: String by project
val jacocoVersion: String by project
plugins {
jacoco
id("org.springframework.boot")
id("io.spring.dependency-management")
id("io.gitlab.arturbosch.detekt")
id("org.jlleitschuh.gradle.ktlint")
id("com.google.cloud.tools.jib")
id("com.github.ben-manes.versions")
id("com.gorylenko.gradle-git-properties")
kotlin("jvm")
kotlin("plugin.spring")
}
tasks {
detekt {
toolVersion = detektVersion
input = files("src/main/kotlin")
config = files("detekt.yml")
reports {
html {
enabled = true
destination = file("detekt-report.html")
}
}
}
ktlint {
version.set(ktlintVersion)
verbose.set(true)
coloredOutput.set(true)
}
compileKotlin {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict", "-opt-in=kotlin.RequiresOptIn")
jvmTarget = "11"
}
}
compileTestKotlin {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict", "-opt-in=kotlin.RequiresOptIn")
jvmTarget = "11"
}
}
test {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed", "standard_out", "standard_error")
showStandardStreams = true
setExceptionFormat("full")
}
setFinalizedBy(setOf(jacocoTestReport))
}
jacocoTestReport {
classDirectories.setFrom(
sourceSets.main.get().output.asFileTree.matching {
val excludes = listOf(
"com/hometech/**/configuration/**",
"com/hometech/**/*Application.kt",
"com/hometech/**/extensions/**"
)
this.exclude(excludes)
}
)
reports {
xml.required.set(true)
html.required.set(true)
}
dependsOn(test)
}
}
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter-webflux")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("io.projectreactor.kotlin:reactor-kotlin-extensions")
implementation("org.flywaydb:flyway-core")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
implementation("org.jetbrains.exposed:exposed-spring-boot-starter:$exposedVersion")
implementation("org.jetbrains.exposed:exposed-dao:$exposedVersion")
implementation("org.jetbrains.exposed:exposed-java-time:$exposedVersion")
implementation("org.postgresql:postgresql")
implementation("io.github.microutils:kotlin-logging:$kotlinLoggingVersion")
implementation("org.telegram:telegrambots-spring-boot-starter:$telegramBotsVersion")
implementation("org.jsoup:jsoup:$jsoupVersion")
developmentOnly("org.springframework.boot:spring-boot-devtools")
testImplementation("org.springframework.boot:spring-boot-starter-test") {
exclude(group = "org.junit.vintage", module = "junit-vintage-engine")
exclude(group = "com.vaadin.external.google", module = "android-json")
exclude(module = "mockito-core")
}
testImplementation("com.ninja-squad:springmockk:$mockkVersion")
testImplementation("io.kotest:kotest-runner-junit5-jvm:$kotestVersion")
testImplementation("org.testcontainers:postgresql:$testcontainersVersion")
testImplementation("org.springframework.cloud:spring-cloud-contract-wiremock")
}
dependencyManagement {
imports {
mavenBom("org.springframework.cloud:spring-cloud-dependencies:$springCloudVersion")
}
}
jacoco {
toolVersion = jacocoVersion
}