-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
202 lines (170 loc) · 6.91 KB
/
build.gradle
File metadata and controls
202 lines (170 loc) · 6.91 KB
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
buildscript {
repositories {
mavenCentral()
}
}
plugins {
id "net.ltgt.apt-eclipse" version "0.21"
id "com.github.johnrengelman.shadow" version "5.2.0"
id "application"
id 'org.liquibase.gradle' version '2.0.1'
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
version "0.1"
group "com.kf.touchbase"
ext {
lombokVersion = '1.18.12'
mapstructVersion = '1.2.0.Final'
}
if (!project.ext.properties.containsKey('changeLogFile')) {
project.ext.properties.changeLogFile = ''
}
if (!project.ext.properties.runList) {
project.ext.runList = 'none'
}
repositories {
mavenCentral()
maven { url "https://jcenter.bintray.com" }
}
configurations {
// for dependencies that are needed for development only
developmentOnly
}
dependencies {
compileOnly "org.projectlombok:lombok:$lombokVersion"
annotationProcessor "org.projectlombok:lombok:${lombokVersion}"
compileOnly "org.mapstruct:mapstruct:$mapstructVersion"
annotationProcessor "org.mapstruct:mapstruct-processor:$mapstructVersion"
annotationProcessor "io.micronaut:micronaut-inject-java"
implementation "io.micronaut:micronaut-inject"
annotationProcessor platform("io.micronaut:micronaut-bom:$micronautVersion")
implementation platform("io.micronaut:micronaut-bom:$micronautVersion")
annotationProcessor "io.micronaut:micronaut-security-annotations:1.4.0"
implementation "io.micronaut:micronaut-security:1.4.0"
implementation "io.micronaut:micronaut-security-jwt:1.4.0"
annotationProcessor("io.micronaut.configuration:micronaut-openapi:1.5.0")
implementation "io.swagger.core.v3:swagger-annotations"
annotationProcessor "io.micronaut:micronaut-validation"
implementation "io.micronaut:micronaut-validation"
implementation "io.micronaut:micronaut-runtime"
implementation "io.micronaut:micronaut-http-client"
implementation 'io.micronaut:micronaut-http-server-netty'
implementation 'com.agorapulse:micronaut-aws-sdk-sns:1.3.7.1'
implementation 'com.agorapulse:micronaut-aws-sdk-sqs:1.3.7.1'
implementation 'com.agorapulse:micronaut-aws-sdk-s3:1.3.7.1'
implementation("io.micronaut.kafka:micronaut-kafka")
annotationProcessor "javax.persistence:javax.persistence-api:2.2"
implementation group: 'org.postgresql', name: 'postgresql', version: '42.2.14'
annotationProcessor "io.micronaut.data:micronaut-data-processor:1.1.3"
implementation "io.micronaut.data:micronaut-data-hibernate-jpa:1.1.3"
implementation "io.micronaut.liquibase:micronaut-liquibase"
implementation group: 'com.vladmihalcea', name: 'hibernate-types-52', version: '2.9.13'
implementation 'io.micronaut.sql:micronaut-jdbc-hikari'
implementation 'com.kinoroy.expo.push:expo-push-sdk:0.1.4'
implementation "org.apache.commons:commons-lang3:3.10"
implementation "javax.annotation:javax.annotation-api"
runtimeOnly "ch.qos.logback:logback-classic:1.2.3"
runtimeOnly("com.h2database:h2")
testCompileOnly "org.projectlombok:lombok:$lombokVersion"
testImplementation 'org.assertj:assertj-core:3.17.1'
testAnnotationProcessor "org.projectlombok:lombok:$lombokVersion"
testAnnotationProcessor platform("io.micronaut:micronaut-bom:$micronautVersion")
testAnnotationProcessor "io.micronaut:micronaut-inject-java"
testImplementation platform("io.micronaut:micronaut-bom:$micronautVersion")
testImplementation "org.junit.jupiter:junit-jupiter-api"
testImplementation 'org.mockito:mockito-core:3.4.6'
testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.4.6'
testImplementation "io.micronaut.test:micronaut-test-junit5"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine"
testImplementation 'org.apache.kafka:kafka-clients:2.3.1:test'
testImplementation 'org.apache.kafka:kafka_2.12:2.3.1'
testImplementation 'org.apache.kafka:kafka_2.12:2.3.1:test'
}
test.classpath += configurations.developmentOnly
mainClassName = "com.kf.touchbase.Application"
// use JUnit 5 platform
test {
environment "MICRONAUT_ENVIRONMENTS", "test"
useJUnitPlatform()
minHeapSize = "128m"
maxHeapSize = "1024m"
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.compilerArgs.add('-parameters')
}
shadowJar {
mergeServiceFiles()
}
liquibase {
activities {
diffLocalDb {
changeLogFile project.ext.properties.changeLogFile
url 'jdbc:postgresql://localhost:5432/touchbase'
username 'sa'
password 'pw123'
referenceUrl 'jdbc:file:./generatedb'
referencePassword 'postgres'
referenceUsername 'pw123'
}
migrateLocalDb {
changeLogFile project.ext.properties.changeLogFile
url 'jdbc:postgresql://localhost:5432/touchbasegen'
username 'postgres'
password 'pw123'
}
none {}
}
runList = project.ext.runList
}
tasks.withType(JavaExec) {
classpath += configurations.developmentOnly
jvmArgs('-noverify', '-XX:TieredStopAtLevel=1', '-Dcom.sun.management.jmxremote')
}
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
tasks.withType(Test) {
testLogging {
// set options for log level LIFECYCLE
events TestLogEvent.FAILED,
TestLogEvent.PASSED,
TestLogEvent.SKIPPED,
TestLogEvent.STANDARD_OUT
exceptionFormat TestExceptionFormat.FULL
showExceptions true
showCauses true
showStackTraces true
// set options for log level DEBUG and INFO
debug {
events TestLogEvent.STARTED,
TestLogEvent.FAILED,
TestLogEvent.PASSED,
TestLogEvent.SKIPPED,
TestLogEvent.STANDARD_ERROR,
TestLogEvent.STANDARD_OUT
exceptionFormat TestExceptionFormat.FULL
}
info.events = debug.events
info.exceptionFormat = debug.exceptionFormat
afterSuite { desc, result ->
if (!desc.parent) { // will match the outermost suite
def output = "Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} passed, ${result.failedTestCount} failed, ${result.skippedTestCount} skipped)"
def startItem = '| ', endItem = ' |'
def repeatLength = startItem.length() + output.length() + endItem.length()
println('\n' + ('-' * repeatLength) + '\n' + startItem + output + endItem + '\n' + ('-' * repeatLength))
}
}
}
}
task getDeps(type: Copy) {
from sourceSets.main.runtimeClasspath
into 'runtime/'
}
task generatedb(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
main = 'com.kf.touchbase.Application'
jvmArgs '-Dmicronaut.environments=generatedb'
}