-
Notifications
You must be signed in to change notification settings - Fork 40
/
build.gradle
171 lines (145 loc) · 4.89 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
buildscript {
ext {
javaVersion = "1.8"
vavrVersion = "0.9.2"
kotlinVersion = "1.3.11"
springBootVersion = "2.1.1.RELEASE"
springCloudVersion = "Finchley.M6"
hibernateCoreVersion = "4.2.18.Final"
junitPlatformVersion = "1.0.2"
junitJupiterVersion = "5.0.2"
}
repositories {
mavenLocal()
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
classpath("org.junit.platform:junit-platform-gradle-plugin:$junitPlatformVersion")
}
}
plugins {
id "idea"
id "java"
id "maven"
id "eclipse"
id "org.jetbrains.kotlin.jvm" version "1.3.11"
id "com.avast.gradle.docker-compose" version "0.6.13"
id "org.jetbrains.kotlin.plugin.noarg" version "1.3.11"
id "org.jetbrains.kotlin.plugin.spring" version "1.3.11"
id "org.jetbrains.kotlin.plugin.allopen" version "1.3.11"
id "io.spring.dependency-management" version "1.0.6.RELEASE"
}
apply plugin: "org.springframework.boot"
apply plugin: "org.junit.platform.gradle.plugin"
group = "daggerok"
version = "0.0.1"
sourceCompatibility = targetCompatibility = "$javaVersion"
compileKotlin {
incremental = true
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = "$javaVersion"
}
}
compileTestKotlin {
incremental = true
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = "$javaVersion"
}
}
allOpen {
annotation("javax.persistence.Entity")
}
noArg {
annotation("javax.persistence.Entity")
}
defaultTasks "clean", "build"
repositories {
mavenLocal()
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
dependencies {
// https://mvnrepository.com/artifact/org.mapdb/mapdb
compile group: 'org.mapdb', name: 'mapdb', version: '3.0.5'
// spring-boot
compile("org.springframework.boot:spring-boot-starter-webflux")
compile("org.springframework.boot:spring-boot-starter-actuator")
testCompile("org.springframework.boot:spring-boot-starter-test")
testCompile("io.projectreactor:reactor-test")
//runtime("org.springframework.boot:spring-boot-devtools")
//compileOnly("org.springframework.boot:spring-boot-configuration-processor")
//// JPA (+embedded)
//runtime("com.h2database:h2")
//compile("org.springframework.boot:spring-boot-starter-data-jpa")
//compile("org.springframework.boot:spring-boot-starter-data-rest")
//// @Id UUID
//compile("org.hibernate:hibernate-core:$hibernateCoreVersion")
//// Mongo (+embedded)
//compile("org.springframework.boot:spring-boot-starter-data-mongodb-reactive")
//compile("de.flapdoodle.embed:de.flapdoodle.embed.mongo")
//// Kafka (+embedded)
//compile("org.springframework.cloud:spring-cloud-stream")
//compile("org.springframework.cloud:spring-cloud-stream-binder-kafka")
//compile("org.springframework.kafka:spring-kafka")
//compile("org.springframework.kafka:spring-kafka-test")
//testCompile("org.springframework.cloud:spring-cloud-stream-test-support")
// In java we trust...
compile("io.vavr:vavr:$vavrVersion")
compileOnly("org.projectlombok:lombok")
testCompileOnly("org.projectlombok:lombok")
//// Kotlin
compile("com.fasterxml.jackson.module:jackson-module-kotlin")
compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion")
compile("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
// junit 4
testCompile "junit:junit:4.12"
// junit 5
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion")
// hamcrest asserts, like: assertThat
testImplementation("org.hamcrest:hamcrest-core:1.3")
testRuntime("org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion")
testRuntime("org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion")
testRuntime("org.junit.vintage:junit-vintage-engine:4.12.3")
// IDEA (older bundle):
testRuntime("org.junit.platform:junit-platform-launcher:$junitPlatformVersion")
testCompileOnly('org.apiguardian:apiguardian-api:1.0.0')
}
dependencyManagement {
imports {
mavenBom "org.springframework.boot:spring-boot-dependencies:$springBootVersion"
mavenBom "org.springframework.cloud:spring-cloud-dependencies:$springCloudVersion"
}
}
bootJar {
launchScript()
}
def profile = project.hasProperty("profile") ? project.getProperty("profile") : "gradle"
dockerCompose {
useComposeFiles = [project.file("docker-compose-${profile}.yaml")]
// captureContainersOutput = true
captureContainersOutput = false
stopContainers = true
removeContainers = true
removeImages = "Local"
removeVolumes = true
removeOrphans = true
forceRecreate = true
waitForTcpPorts = false
projectName = project.name
}
composeUp.dependsOn assemble
/*
task wrapper(type: Wrapper) {
gradleVersion = "4.10.2"
distributionType = 'BIN'
}
*/
test {
systemProperties "property": "value"
}