This repository has been archived by the owner on Sep 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
build.gradle
78 lines (63 loc) · 2.02 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
apply plugin: 'war'
apply plugin: 'org.akhikhl.gretty'
apply plugin: 'eclipse-wtp'
version = "2.2.1"
import org.gradle.internal.os.OperatingSystem;
war {
archiveName 'irma_api_server.war'
}
buildscript {
repositories {
mavenLocal()
jcenter()
mavenCentral()
}
dependencies {
classpath 'org.akhikhl.gretty:gretty:1.2.4'
}
}
repositories {
mavenLocal()
maven {
url "https://credentials.github.io/repos/maven2/"
}
mavenCentral()
}
dependencies {
compile 'org.irmacard.api:irma_api_common:1.2.2'
compile 'foundation.privacybydesign.common:irma_server_common:0.3.4'
compile 'org.glassfish.jersey.core:jersey-server:2.19'
compile 'org.glassfish.jersey.containers:jersey-container-servlet:2.19'
compile 'ch.qos.logback:logback-classic:1.1.7'
compile 'org.apache.httpcomponents:httpclient:4.5.3'
runtime 'org.codehaus.groovy:groovy:2.4.15'
providedCompile 'javax.servlet:javax.servlet-api:3.1.0'
testCompile "junit:junit:4.11"
testCompile 'org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-jetty:2.19'
}
task preTest(type: Exec) {
// If we run on Windows then it might have (ba)sh through cygwin, but probably
// not openssl (on which keygen.sh depends on which preparetest.sh depends).
if (!OperatingSystem.current().isWindows()) {
commandLine 'sh', './utils/preparetest.sh'
}
}
task compileGo(type: Exec) {
commandLine './src/main/go/build.sh'
ignoreExitValue = true // Without this the task is aborted before printing the output below in case of error
errorOutput = new ByteArrayOutputStream()
doLast {
if (execResult.exitValue != 0) {
throw new GradleException('Go compilation failed: ' + errorOutput.toString())
}
}
}
processTestResources.dependsOn preTest
gretty {
contextConfigFile = file('src/test/resources/jetty-env.xml')
scanInterval = 10
inplaceMode = "hard"
httpsEnabled = true
httpPort = 8088
httpsPort = 8444
}