-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
99 lines (83 loc) · 2.67 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
val javaVersion = findProperty("java.version").toString().toInt()
val kotlinVersion = findProperty("kotlin.version")
val ktlintVersion = findProperty("ktlint.version")
val ktlintPluginVersion = findProperty("ktlint.plugin.version")
val logstashEncoderVersion = findProperty("logstash.encoder.version")
val openTracingVersion = findProperty("open.tracing.version")
val springBootVersion = findProperty("spring.boot.version")
val mockKVersion = findProperty("mockk.version")
java.sourceCompatibility = JavaVersion.toVersion(javaVersion)
plugins {
java
kotlin("jvm") version "1.4.10"
id("org.jetbrains.kotlin.plugin.allopen") version "1.4.10"
id("org.jlleitschuh.gradle.ktlint") version "9.4.1"
id("jacoco")
}
buildscript {
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
classpath("org.jetbrains.kotlin:kotlin-allopen")
}
}
repositories {
mavenCentral()
}
subprojects {
group = "com.company"
version = "2020.11.06"
apply(plugin = "kotlin")
apply(plugin = "kotlin-spring")
apply(plugin = "org.jlleitschuh.gradle.ktlint")
apply(plugin = "jacoco")
apply(plugin = "kotlin-allopen")
repositories {
mavenCentral()
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation(kotlin("reflect"))
implementation("com.pinterest.ktlint:ktlint-core:$ktlintVersion")
implementation("net.logstash.logback:logstash-logback-encoder:$logstashEncoderVersion")
implementation("io.opentracing:opentracing-util:$openTracingVersion")
testImplementation("org.springframework.boot:spring-boot-starter-test:$springBootVersion") {
exclude("mockito")
}
testImplementation("io.mockk:mockk:$mockKVersion")
}
sourceSets.main {
java.srcDirs("src/main/kotlin")
}
tasks {
compileKotlin {
kotlinOptions {
freeCompilerArgs = listOf("-Xjvm-default=enable")
allWarningsAsErrors = true
jvmTarget = "$javaVersion"
}
}
compileTestKotlin {
kotlinOptions.jvmTarget = "$javaVersion"
}
jacocoTestReport {
dependsOn(test)
reports {
xml.isEnabled = false
csv.isEnabled = false
html.destination = file("$buildDir/jacocoHtml")
}
}
}
ktlint {
debug.set(false)
outputToConsole.set(true)
ignoreFailures.set(false)
filter {
exclude("**/generated/**")
include("**/kotlin/**")
}
}
jacoco {
reportsDir = file("$buildDir/reports/jacoco")
}
}