-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
119 lines (99 loc) · 3.9 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
buildscript {
ext {
springBootVersion = '2.3.4.RELEASE'
kotlinVersion = '1.4.10'
reactorVersion = '3.3.10.RELEASE'
reactorExtraVersion = '3.3.4.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
}
}
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.4.10'
id 'org.jetbrains.kotlin.plugin.spring' version '1.4.10'
id 'org.jetbrains.kotlin.plugin.allopen' version '1.4.10'
}
apply plugin: 'groovy'
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply plugin: 'jacoco'
ext {
versions = [
spock : '1.3-groovy-2.5',
kotlin : '1.4.10',
jackson: '2.11.3',
]
}
group = 'pro.tuscan'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
repositories {
mavenCentral()
}
compileKotlin {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11
}
}
dependencies {
// spring boot
compile group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version: "${springBootVersion}"
compile group: 'org.springframework.boot', name: 'spring-boot-starter-webflux', version: "${springBootVersion}"
compile group: 'org.springframework.boot', name: 'spring-boot-starter-validation', version: "${springBootVersion}"
compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-mongodb-reactive', version: "${springBootVersion}"
compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-mongodb', version: "${springBootVersion}"
// other
compile group: 'io.micrometer', name: 'micrometer-registry-graphite', version: '1.3.5'
compile group: 'io.projectreactor', name: 'reactor-core', version: "${reactorVersion}"
compile group: 'io.projectreactor.addons', name: 'reactor-extra', version: "${reactorExtraVersion}"
// kotlin
compile group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8', version: versions.kotlin
compile group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: versions.kotlin
// jackson
compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: versions.jackson
compile group: 'com.fasterxml.jackson.module', name: 'jackson-module-afterburner', version: versions.jackson
compile group: 'com.fasterxml.jackson.module', name: 'jackson-module-kotlin', version: versions.jackson
// tests
testCompile group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: "${springBootVersion}"
testCompile group: 'org.spockframework', name: 'spock-core', version: "$versions.spock"
testCompile group: 'org.spockframework', name: 'spock-spring', version: "$versions.spock"
testCompile group: 'cglib', name: 'cglib-nodep', version: '3.2.5'
testCompile group: 'com.github.tomakehurst', name: 'wiremock', version: '2.26.0'
testCompile group: 'io.projectreactor', name: 'reactor-test', version: "${reactorVersion}"
testCompile group: 'org.testcontainers', name: 'spock', version: '1.15.3'
testCompile group: 'org.testcontainers', name: 'mongodb', version: '1.15.3'
}
task runDocker(type: Exec) {
commandLine './run-docker-services.sh'
}
tasks.bootRun.dependsOn(tasks.runDocker)
jacocoTestReport {
reports {
xml.enabled true
html.enabled true
}
}
bootJar {
mainClassName = 'pro.tuscan.TuscanApplication'
}
tasks.test {
finalizedBy(tasks.jacocoTestReport)
}
wrapper {
gradleVersion = '6.7'
}