This repository has been archived by the owner on Sep 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathbuild.gradle
243 lines (215 loc) · 8.11 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
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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
configurations {
jaxb
ktlint
all {
exclude group: 'log4j', module: 'log4j'
exclude module: 'spring-boot-starter-tomcat'
exclude group: 'org.apache.tomcat'
}
}
buildscript {
ext {
kotlinVersion = '1.3.50'
springBootVersion = '2.0.9.RELEASE'
}
repositories {
mavenCentral()
maven {
url = "https://maven.taktik.be/content/groups/public"
}
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath('io.spring.gradle:dependency-management-plugin:1.0.6.RELEASE')
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
classpath('com.taktik.gradle:gradle-plugin-docker-java:1.2.0')
classpath('com.taktik.gradle:gradle-plugin-git-version:2.0.1')
classpath('com.github.ben-manes:gradle-versions-plugin:0.17.0') // version 0.18.0 is incompatible with Spring Boot (see https://github.com/spring-gradle-plugins/spring-build-conventions/issues/44)
}
}
apply plugin: 'git-version'
group = 'org.taktik'
version = gitVersion
apply plugin: 'io.spring.dependency-management'
apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply plugin: 'org.springframework.boot'
apply plugin: 'docker-java'
dockerJava.imageGroup = 'icure'
ext {
name = 'freehealth-connector'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
bootJar {
manifest {
attributes(
'Built-By' : System.getProperties()["user.name"],
'Build-Revision' : gitVersion,
'Created-By' : "Gradle ${gradle.gradleVersion}",
'Build-Jdk' : "${System.getProperties()["java.version"]} (${System.getProperties()["java.vendor"]} ${System.getProperties()["java.vm.version"]})",
'Build-OS' : "${System.getProperties()["os.name"]} ${System.getProperties()["os.arch"]} ${System.getProperties()["os.version"]}"
)
}
}
jar {
manifest {
attributes(
'Built-By' : System.getProperties()["user.name"],
'Build-Revision' : gitVersion,
'Created-By' : "Gradle ${gradle.gradleVersion}",
'Build-Jdk' : "${System.getProperties()["java.version"]} (${System.getProperties()["java.vendor"]} ${System.getProperties()["java.vm.version"]})",
'Build-OS' : "${System.getProperties()["os.name"]} ${System.getProperties()["os.arch"]} ${System.getProperties()["os.version"]}"
)
}
}
repositories {
mavenCentral()
jcenter()
maven {
url = "https://maven.taktik.be/content/groups/public"
}
flatDir {
dirs 'libs'
}
}
// tag::wsdl[]
//TODO: Generate all jaxb classes from wsdls
task genJaxb {
ext.sourcesDir = "${buildDir}/generated-sources/jaxb"
ext.classesDir = "${buildDir}/classes/jaxb"
ext.schema = "src/resources/WSDL/sts_v1.wsdl"
outputs.dir classesDir
doLast() {
project.ant {
taskdef name: "xjc", classname: "com.sun.tools.xjc.XJCTask",
classpath: configurations.jaxb.asPath
mkdir(dir: sourcesDir)
mkdir(dir: classesDir)
xjc(destdir: sourcesDir, schema: schema) {
arg(value: "-wsdl")
produces(dir: sourcesDir, includes: "**/*.java")
}
javac(destdir: classesDir, source: 1.8, target: 1.8, debug: true,
debugLevel: "lines,vars,source",
classpath: configurations.jaxb.asPath) {
src(path: sourcesDir)
include(name: "**/*.java")
include(name: "*.java")
}
copy(todir: classesDir) {
fileset(dir: sourcesDir, erroronmissingdir: false) {
exclude(name: "**/*.java")
}
}
}
}
}
// end::wsdl[]
dependencies {
ktlint "com.github.shyiko:ktlint:0.22.0"
compile("com.taktik.boot:spring-boot-starter-micrometer:2.1-90-gcc5c980239")
compile('org.springframework.boot:spring-boot-starter-jetty')
compile('org.springframework.boot:spring-boot-starter-web'){
exclude module: "spring-boot-starter-tomcat"
}
compile('org.springframework.boot:spring-boot-starter-websocket') {
exclude module: "spring-boot-starter-tomcat"
}
compile('org.springframework.boot:spring-boot-starter-security')
compile("org.springframework.ws:spring-ws-core")
compile("org.springframework.ws:spring-ws-security")
compile("org.springframework:spring-orm")
compile("com.nimbusds:nimbus-jose-jwt:9.7")
compile("com.nimbusds:oauth2-oidc-sdk:9.2.1")
compile('com.taktik.boot:spring-boot-starter-hazelcast:2.1-0-g4d5d84ad53') {
exclude module: "kotlin-runtime"
}
compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlinVersion}")
compile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
compile group: 'org.bouncycastle', name: 'bcmail-jdk15on', version: '1.54'
compile group: 'org.bouncycastle', name: 'bcpkix-jdk15on', version: '1.54'
compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.54'
compile('be.fedict.commons-eid:commons-eid-client:0.6.6')
compile('be.fedict.commons-eid:commons-eid-jca:0.6.6')
compile('be.fgov.ehealth.etee:etee-crypto-lib:2.1.1')
compile('org.apache.commons:commons-text:1.1')
compile('org.apache.commons:commons-collections4:4.0')
compile('org.apache.commons:commons-compress:1.10')
compile('org.apache.ws.security:wss4j:1.6.18')
compile('org.apache.wss4j:wss4j-ws-security-common:2.0.10')
compile('org.apache.wss4j:wss4j-ws-security-dom:2.0.10')
compile('net.sf.jsignature.io-tools:easystream:1.2.12')
compile('uk.org.lidalia:sysout-over-slf4j:1.0.2') //WTF... This must go away
compile('commons-lang:commons-lang:2.6')
compile('org.apache.velocity:velocity:1.7') //WTF... This must go away
compile('commons-io:commons-io:2.5')
compile('commons-codec:commons-codec:1.10')
compile('joda-time:joda-time:2.9')
compile group: 'com.sun.xml.messaging.saaj', name: 'saaj-impl', version: '1.3.28'
compile('com.sun.xml.wss:xws-security:3.0')
compile('com.google.code.gson:gson:2.7')
compile('net.sf.dozer:dozer:5.5.1') //WTF... This must go away
compile group: 'ma.glasnost.orika', name: 'orika-core', version: '1.4.6'
compile('io.springfox:springfox-swagger2:2.6.1')
//Saxon
compile group: 'net.sf.saxon', name: 'Saxon-HE', version: '9.9.1-5'
compile group: 'org.bitbucket.b_c', name: 'jose4j', version: '0.7.2'
compile group: 'com.fasterxml.jackson.module', name:'jackson-module-kotlin', version:'2.9.8'
implementation 'org.webjars:webjars-locator-core'
implementation 'org.webjars:sockjs-client:1.0.2'
implementation 'org.webjars:stomp-websocket:2.3.3'
implementation 'org.webjars:bootstrap:3.3.7'
implementation 'org.webjars:jquery:3.1.1-1'
//Hibernate
compile group:'org.hibernate', name: 'hibernate-core', version: '4.3.10.Final'
compile group:'com.h2database', name: 'h2', version: '1.4.187'
//Lucene
compile('org.apache.lucene:lucene-analyzers-common:4.10.4')
compile('org.apache.lucene:lucene-core:4.10.4')
compile('org.apache.lucene:lucene-highlighter:4.10.4')
compile('org.apache.lucene:lucene-memory:4.10.4')
compile('org.apache.lucene:lucene-queries:4.10.4')
compile('org.apache.lucene:lucene-queryparser:4.10.4')
compile('org.apache.lucene:lucene-sandbox:4.10.4')
compile('org.apache.lucene:lucene-suggest:4.10.4')
//Compat
compile('org.slf4j:log4j-over-slf4j:1.7.25')
compile('org.jdom:jdom-legacy:1.1.3')
compile('com.taktik.boot:spring-boot-starter-gke-logging:2.1.174-0f038f8004')
//jaxb "com.sun.xml.bind:jaxb-xjc:2.1.7"
//compile(files(genJaxb.classesDir).builtBy(genJaxb))
//compile 'org.mapstruct:mapstruct-jdk8:1.2.0.Final'
//kapt 'org.mapstruct:mapstruct-processor:1.2.0.Final'
testCompile('org.springframework.boot:spring-boot-starter-test')
}
task ktlint(type: JavaExec, group: "verification") {
description = "Check Kotlin code style."
classpath = configurations.ktlint
main = "com.github.shyiko.ktlint.Main"
args "src/**/*.kt"
// to generate report in checkstyle format prepend following args:
// "--reporter=plain", "--reporter=checkstyle,output=${buildDir}/ktlint.xml"
// see https://github.com/shyiko/ktlint#usage for more
}
//check.dependsOn ktlint
task ktlintFormat(type: JavaExec, group: "formatting") {
description = "Fix Kotlin code style deviations."
classpath = configurations.ktlint
main = "com.github.shyiko.ktlint.Main"
args "-F", "src/**/*.kt"
}
apply plugin: 'idea'
idea {
module {
downloadJavadoc = true // defaults to false
downloadSources = true
}
}