-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
166 lines (142 loc) · 6.22 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
import com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransformer
buildscript {
ext.kotlinVersion = "1.5.21"
ext.ktorVersion = "1.6.1"
ext.kotlinxCoroutinesVersion = "1.5.1"
ext.jacksonVersion = "2.13.0-rc1"
ext.prometheusVersion = "0.11.0"
ext.kotlinloggingVersion = "2.0.10"
ext.logstashEncoderVersion = "6.6"
ext.logbackVersion = "1.3.0-alpha5"
ext.konfigVersion = "1.6.10.0"
ext.benManesVersion = '0.39.0'
ext.shadowVersion = '7.0.0'
ext.kotlinterVersion = '3.4.5'
ext.wsdl2javaVersion = '3.0.0'
ext.jaxwsVersion = "2.3.1"
ext.jaxwsToolsVersion = "2.3.1"
ext.javaxActivationVersion = "1.1.1"
ext.cxf_version = "3.4.1"
ext.unboundidVersion = "6.0.0"
ext.tjenestespesifikasjonerVersion = "1.2019.09.25-00.21-49b69f0625e0"
ext.wiremockVersion = "2.27.2"
ext.swaggerVersion = "3.6.1"
// test dependencies
ext.kluentVersion = "1.68"
ext.spekVersion = "2.0.15"
ext.junitPlatformVersion = "1.7.0"
ext.generatedSourcesDir = "$buildDir/generated/wsdl"
ext.bootStrapClass = "no.nav.altinn.admin.BootstrapKt"
dependencies {
classpath 'javax.xml.bind:jaxb-api:2.4.0-b180830.0359'
classpath 'org.glassfish.jaxb:jaxb-runtime:2.4.0-b180830.0438'
classpath 'com.sun.activation:javax.activation:1.2.0'
classpath("com.sun.xml.ws:jaxws-tools:2.3.1") {
exclude group: "com.sun.xml.ws", module: "policy"
}
}
}
plugins {
id 'java'
id 'application'
id 'org.jetbrains.kotlin.jvm' version "$kotlinVersion"
id 'com.yupzip.wsdl2java' version "$wsdl2javaVersion"
id 'org.jmailen.kotlinter' version "$kotlinterVersion"
id 'com.github.ben-manes.versions' version "$benManesVersion"
id 'com.github.johnrengelman.shadow' version "$shadowVersion"
}
group = "no.nav"
version = "1.0.2-SNAPSHOT"
application {
mainClass.set("$bootStrapClass")
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
compileKotlin {
dependsOn 'wsdl2javaTask'
}
lintKotlinMain {
dependsOn 'wsdl2javaTask'
}
wsdl2java {
wsdlDir = file("src/main/resources")
wsdlsToGenerate = [
["-xjc", "-b", "$projectDir/src/main/xjb/binding.xml", "$projectDir/src/main/resources/wsdl/RegisterSRRAgencyExternalBasic.wsdl"],
["-xjc", "-b", "$projectDir/src/main/xjb/binding.xml", "$projectDir/src/main/resources/wsdl/ReceiptAgencyExternalBasic.wsdl"],
["-xjc", "-b", "$projectDir/src/main/xjb/binding.xml", "$projectDir/src/main/resources/wsdl/ServiceOwnerArchiveExternalBasic.wsdl"]
]
cxfVersion = cxf_version
cxfPluginVersion = cxf_version
}
shadowJar {
dependsOn 'distTar'
dependsOn 'distZip'
transform(ServiceFileTransformer) {
path = 'META-INF/cxf'
include 'bus-extensions.txt'
}
archiveClassifier.set('')
}
test {
testLogging.events("passed", "skipped", "failed")
useJUnitPlatform {
includeEngines 'spek2'
}
}
repositories {
maven { url "https://packages.confluent.io/maven/" }
maven { url "https://plugins.gradle.org/m2/" }
mavenCentral()
}
dependencies {
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion",
"com.fasterxml.jackson.core:jackson-annotations:$jacksonVersion",
"com.fasterxml.jackson.core:jackson-databind:$jacksonVersion",
"com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jacksonVersion",
"com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonVersion",
"io.ktor:ktor-server-netty:$ktorVersion",
"io.ktor:ktor-auth:$ktorVersion",
"io.ktor:ktor-jackson:$ktorVersion",
"io.ktor:ktor-client-core:$ktorVersion",
"io.ktor:ktor-client-apache:$ktorVersion",
"io.ktor:ktor-locations:$ktorVersion",
"io.prometheus:simpleclient_common:$prometheusVersion",
"io.prometheus:simpleclient_hotspot:$prometheusVersion",
"io.github.microutils:kotlin-logging:$kotlinloggingVersion",
"net.logstash.logback:logstash-logback-encoder:$logstashEncoderVersion",
"com.natpryce:konfig:$konfigVersion",
"javax.xml.ws:jaxws-api:$jaxwsVersion",
"org.jetbrains.kotlinx:kotlinx-coroutines-slf4j:$kotlinxCoroutinesVersion",
"no.nav.tjenestespesifikasjoner:altinn-download-queue-external:$tjenestespesifikasjonerVersion",
"no.nav.tjenestespesifikasjoner:altinn-correspondence-agency-external-basic:$tjenestespesifikasjonerVersion",
"no.nav.tjenestespesifikasjoner:altinn-pre-fill:$tjenestespesifikasjonerVersion",
"org.apache.cxf:cxf-rt-frontend-jaxws:$cxf_version",
"org.apache.cxf:cxf-rt-features-logging:$cxf_version",
"org.apache.cxf:cxf-rt-transports-http:$cxf_version",
"org.apache.cxf:cxf-rt-ws-security:$cxf_version",
"org.apache.ws.xmlschema:xmlschema-core:2.2.4" // Force newer version of XMLSchema to fix illegal reflective access warning
implementation("com.sun.xml.ws:jaxws-tools:$jaxwsToolsVersion") {
exclude group: 'com.sun.xml.ws', module: 'policy'
}
implementation("javax.activation:activation:$javaxActivationVersion")
implementation("org.webjars:swagger-ui:$swaggerVersion")
implementation("com.unboundid:unboundid-ldapsdk:$unboundidVersion")
runtimeOnly("ch.qos.logback:logback-classic:$logbackVersion")
runtimeOnly("com.papertrailapp:logback-syslog4j:1.0.0")
testImplementation("org.spekframework.spek2:spek-dsl-jvm:$spekVersion") {
exclude group: 'org.jetbrains.kotlin'
}
testRuntimeOnly ("org.spekframework.spek2:spek-runner-junit5:$spekVersion") {
exclude group: 'org.jetbrains.kotlin'
}
testImplementation 'org.jetbrains.kotlin:kotlin-test'
testImplementation("io.ktor:ktor-server-test-host:$ktorVersion") {
exclude group: "org.eclipse.jetty" // conflicts with WireMock
}
testImplementation("org.amshove.kluent:kluent:$kluentVersion")
testImplementation("org.junit.platform:junit-platform-runner:$junitPlatformVersion")
testRuntimeOnly("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
}
java {
sourceSets["main"].java.srcDirs("$generatedSourcesDir")
}