-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
147 lines (116 loc) · 4.45 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
plugins {
id 'com.github.johnrengelman.shadow' version '4.0.4'
}
dependencies {
compile project(':serverconf')
compile project(':signer-protocol')
compile project(':common-messagelog')
compile project(':common-op-monitoring')
compile "org.eclipse.jetty:jetty-xml:$jettyVersion"
testCompile project(':common-test')
testCompile 'org.hsqldb:hsqldb:2.5.0'
testCompile "com.typesafe.akka:akka-testkit_$akkaVersion"
testCompile 'org.powermock:powermock-api-mockito:1.6.6'
testCompile 'org.powermock:powermock-module-junit4:1.6.6'
testCompile 'io.rest-assured:rest-assured:3.3.0'
testCompile 'wsdl4j:wsdl4j:1.6.3'
testCompile files(this.project(':common-util').sourceSets.test.output)
testCompile files(this.project(':common-util').sourceSets.test.runtimeClasspath)
testCompile project(':common-verifier').sourceSets.test.output
}
jar {
manifest {
attributes('Main-Class':'ee.ria.xroad.proxy.ProxyMain')
}
}
shadowJar {
classifier = ''
append('reference.conf')
from rootProject.file("LICENSE.txt")
}
testJar.enabled = true
jar.enabled = false
build.dependsOn shadowJar
buildall.dependsOn shadowJar
task licenseFormatJava(type:nl.javadude.gradle.plugins.license.License) {
source = fileTree('src/main/java')
}
task licenseTestJava(type:nl.javadude.gradle.plugins.license.License) {
source = fileTree('src/main/java')
check = true
}
licenseFormatMain.enabled = false
licenseMain.enabled = false
licenseFormat.dependsOn licenseFormatJava
licenseTest.dependsOn licenseTestJava
task runProxyMain(type: JavaExec) {
jvmArgs '-Dxroad.proxy.sslEnabled=false',
'-Dxroad.proxy.globalConfDistributor.enabled=false',
'-Dxroad.proxy.ocspCachePath=build/ocsp-cache',
'-Dxroad.tempFiles.path=build/attach-tmp',
'-Dxroad.proxy.globalConfFile=../systemtest/conf/local_test/globalconf.xml',
'-Dxroad.proxy.configurationFile=../systemtest/conf/local_test/serverconf_consumer.xml',
'-Dxroad.key.configurationFile=../systemtest/conf/local_test/keyconf.xml',
'-Dxroad.appLog.path=log',
'-Dlogback.configurationFile=src/test/resources/logback-test.xml'
//main = 'ee.ria.xroad.proxy.ProxyMain'
main = 'ee.ria.xroad.proxy.TestProxyMain'
classpath = sourceSets.main.runtimeClasspath
classpath += sourceSets.test.runtimeClasspath
classpath += files('src/test/resources')
}
apply plugin: "jacoco"
test {
useJUnit {
excludeCategories 'ee.ria.xroad.proxy.testutil.IntegrationTest'
}
}
task integrationTest(type: Test) {
description = 'Runs integration tests.'
group = 'verification'
shouldRunAfter test
useJUnit {
includeCategories 'ee.ria.xroad.proxy.testutil.IntegrationTest'
}
}
task runProxyTest(type: JavaExec) {
group = "verification"
shouldRunAfter integrationTest
jvmArgs '-Xmx2g',
'-Dxroad.proxy.ocspCachePath=build/ocsp-cache',
'-Dxroad.tempFiles.path=build/attach-tmp',
'-Dxroad.proxy.jetty-serverproxy-configuration-file=src/test/serverproxy.xml',
'-Dxroad.proxy.jetty-ocsp-responder-configuration-file=src/test/ocsp-responder.xml',
'-Dxroad.proxy.jetty-clientproxy-configuration-file=src/test/clientproxy.xml',
'-Dxroad.proxy.client-connector-so-linger=-1',
'-Dxroad.proxy.client-httpclient-so-linger=-1',
'-Dxroad.proxy.server-connector-so-linger=-1',
'-Dlogback.configurationFile=src/test/logback-proxytest.xml',
'-Dproxy.akka.loglevel=DEBUG'
'-Dproxy.akka.remote.artery.canonical.port=0'
// '-Djava.security.properties==src/main/resources/java.security'
main = 'ee.ria.xroad.proxy.testsuite.ProxyTestSuite'
classpath = sourceSets.test.runtimeClasspath
}
jacoco {
applyTo runProxyTest
}
runProxyTest.jacoco.append=false
task mergedJacoco(dependsOn: 'runProxyTest', type: JacocoMerge) {
// merge jacoco results from normal tests and runProxyTest
destinationFile = file("$buildDir/jacoco/test.exec")
executionData test, integrationTest, runProxyTest
}
runProxyTest.doLast {
tasks.mergedJacoco.execute()
}
task mergedCoverageReport(type:JacocoReport){
executionData = files("$buildDir/jacoco/test.exec")
sourceSets sourceSets.main
}
task runBatchSigner(type: JavaExec) {
jvmArgs '-Dlogback.configurationFile=src/test/logback-batchsigner.xml'
main = 'ee.ria.xroad.common.signature.BatchSigner'
classpath = sourceSets.test.runtimeClasspath
}
check.dependsOn integrationTest