-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
121 lines (103 loc) · 3.21 KB
/
build.gradle
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
buildscript {
ext {
kotlinVersion = '1.3.21'
springBootVersion = '2.1.2.RELEASE'
dockerVersion = '0.21.0'
}
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
classpath("org.jetbrains.kotlin:kotlin-noarg:${kotlinVersion}")
classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
classpath("gradle.plugin.com.palantir.gradle.docker:gradle-docker:${dockerVersion}")
}
}
allprojects {
apply plugin: 'idea'
}
subprojects {
apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply plugin: 'jacoco'
apply plugin: 'io.spring.dependency-management'
group = "org.burbridge.${rootProject.name}.${project.name}"
version = '0.0.7'
sourceCompatibility = 1.8
targetCompatibility = 1.8
ext {
springBootVersion = '2.1.3.RELEASE'
springCloudVersion = 'Finchley.RELEASE'
}
compileKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = "1.8"
}
}
repositories {
mavenCentral()
}
dependencies {
compile('org.jetbrains.kotlin:kotlin-stdlib-jdk8')
compile('org.jetbrains.kotlin:kotlin-reflect')
compile('io.github.microutils:kotlin-logging:1.6.22')
compile('com.fasterxml.jackson.module:jackson-module-kotlin')
testCompile('org.springframework.boot:spring-boot-starter-test') {
exclude module: 'junit'
}
testImplementation('org.junit.jupiter:junit-jupiter-api')
testRuntimeOnly('org.junit.jupiter:junit-jupiter-engine')
}
dependencyManagement {
imports {
mavenBom("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
}
}
test {
useJUnitPlatform {
exclude '**/*IntegrationTest.class'
}
}
task integrationTest(type: Test) {
useJUnitPlatform {
include '**/*IntegrationTest.class'
}
}
task jacocoMergeTest(type: JacocoMerge) {
destinationFile = file("$buildDir/jacoco/combinedTestCoverage.exec")
executionData = project.fileTree(dir: '.', include:'**/build/jacoco/*.exec')
}
jacocoTestReport {
dependsOn(jacocoMergeTest)
executionData = files(jacocoMergeTest.destinationFile)
reports {
xml.enabled = true
csv.enabled = false
html.destination file("${buildDir}/reports/tests/jacoco")
}
afterEvaluate {
classDirectories = files(project.fileTree(dir: "$buildDir/classes/kotlin/main", exclude: [
'**/dtos/**',
'**/config/**'
]))
}
}
idea {
module {
inheritOutputDirs = false
outputDir = file("$buildDir/classes/kotlin/main")
}
}
}