-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
99 lines (79 loc) · 2.95 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
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:4.7.1"
}
}
plugins {
id 'java'
id 'checkstyle'
id "com.github.spotbugs" version "4.7.1"
}
// need utf-8 to get text with non-standard chars e.g. curly apostrophes used correctly
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
configurations {
javaDoclet
}
dependencies {
testImplementation 'org.concordion:cubano-concordion:1.1.3'
testImplementation 'org.codejargon:fluentjdbc:1.8.6'
testImplementation group: 'mysql', name: 'mysql-connector-java', version: '8.0.25'
testImplementation group: 'org.hsqldb', name: 'hsqldb', version: '2.5.2'
testImplementation 'javax.xml.bind:jaxb-api:2.3.1'
testImplementation 'jakarta.xml.ws:jakarta.xml.ws-api:3.0.1'
runtimeOnly 'com.sun.xml.ws:jaxws-rt:3.0.1'
//Wiremock
testImplementation "com.github.tomakehurst:wiremock:2.27.2"
// JUnit
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.hamcrest:hamcrest-junit:2.0.0.0'
testImplementation 'org.mockito:mockito-core:3.11.2'
testImplementation 'com.github.stefanbirkner:system-rules:1.19.0'
}
checkstyle {
ignoreFailures = true
configDirectory = new File("${rootDir}/config/checkstyle")
}
spotbugs {
ignoreFailures = true
}
test {
// include '**/Example.*'
// Pass through all supplied system properties - excluding those containing '.' as some of these system properties introduce JNA incompatibility issues
// except for http. properties
System.properties.each { k, v->
if (!k.contains(".") || k.startsWith("http.")) {
println "Passing system property $k: $v"
systemProperty k, v
}
}
// need utf-8 to get text with non-standard chars e.g. apostrophes comparing successfully
systemProperty 'file.encoding', 'UTF-8'
// Logback Configuration
if (System.getProperty('logback.configurationFile') != null) systemProperty 'logback.configurationFile', System.getProperty('logback.configurationFile')
// Parallel Runner
if (System.getProperty('concordion.run.threadCount') != null) {
systemProperty 'concordion.extensions', 'org.concordion.ext.ParallelRunExtension'
systemProperty 'concordion.run.threadCount', System.getProperty('concordion.run.threadCount')
}
systemProperty 'concordion.output.dir', "$reporting.baseDir/spec"
outputs.upToDateWhen { false } // ensure the tests run each time, even if no changes to test code
testLogging.showStandardStreams = true
testLogging.showExceptions = true
// Added to assist with logging in travis.
testLogging {
events "failed"
exceptionFormat "full"
}
}