-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
132 lines (112 loc) · 3.51 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
allprojects {
group = 'deco2800-2017-potatoes'
version = '0.1'
}
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
}
configurations.all {
// check for updates every build
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
allprojects {
ext {
appName = "deco2800-2017-potatoes"
gdxVersion = '1.9.6'
roboVMVersion = '2.3.1'
box2DLightsVersion = '1.4'
ashleyVersion = '1.7.0'
aiVersion = '1.8.0'
}
}
subprojects {
apply plugin: 'java';
apply plugin: 'eclipse';
apply plugin: 'idea';
apply plugin: 'jacoco';
jacoco {
toolVersion = "0.7.7.201606060606"
}
test {
jacoco {
append = false
destinationFile = file("$buildDir/jacoco/jacocoTest.exec")
}
}
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
javadoc {
options.tags = ['require', 'ensure']
}
repositories {
mavenLocal()
mavenCentral()
maven { url 'http://deco2800-artifactory.uqcloud.net/artifactory/libs-release/' }
}
dependencies {
// Logging via Log4J 2.0 using the SLF4J API
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.12'
compile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.25'
compile group: 'org.apache.derby', name: 'derby', version: '10.9.1.0'
compile group: 'com.esotericsoftware', name: 'kryonet', version: '2.22.0-RC1'
// Unit testing with JUnit
testCompile group: 'org.hamcrest', name: 'hamcrest-core', version: '1.3'
testCompile group: 'junit', name: 'junit', version: '4.12', {
exclude group: "org.hamcrest", module: "hamcrest-core"
}
// Mocking with Mockito
testCompile group: 'org.mockito', name: 'mockito-all', version: '1.10.19'
testCompile group: 'org.powermock', name: 'powermock-api-mockito', version: '1.6.2'
testCompile group: 'org.powermock', name: 'powermock-module-junit4', version: '1.6.2'
// Headless gdx
testCompile "com.badlogicgames.gdx:gdx-backend-headless:$gdxVersion"
testCompile "com.badlogicgames.gdx:gdx:$gdxVersion"
// Reflections for testing
compile 'org.reflections:reflections:0.9.11'
// JNA
compile 'net.java.dev.jna:jna:4.5.0'
}
sourceSets {
main {
java {
srcDir 'src/main/java'
}
resources {
srcDir 'resources'
}
}
test {
java {
srcDir 'src/test/java'
}
resources {
srcDir 'resources'
}
}
}
test {
jvmArgs = [
"-Djava.awt.headless=true",
"-Dtestfx.robot=glass",
"-Dtestfx.headless=true",
"-Dprism.order=sw",
"-Dprism.text=t2K",
"-Dglass.platform=Monocle",
"-Dmonocle.platform=Headless",
"-Dprism.verbose=true",
"-Dprism.debugFonts=true"
]
/* This tells gradle to log tests to the console as they are running. Note that tests
are only executed if there are changes. To force gradle to run all tests, use
'gradlew cleanTest test'
*/
testLogging {
events "passed", "failed", "skipped", "standardOut", "standardError"
}
}
}