-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
49 lines (38 loc) · 1.14 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
apply plugin: 'java'
tasks.withType(JavaCompile) {
options.encoding = "utf-8"
}
repositories {
mavenCentral()
}
dependencies {
compile (
[group: 'org.xerial', name: 'sqlite-jdbc', version: '3.8.7'],
[group: 'commons-cli', name: 'commons-cli', version: '1.3.1'],
[group: 'org.glassfish', name: 'javax.json', version: '1.0.4']
)
testCompile (
[group: 'junit', name: 'junit', version: '4.12'],
[group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3'],
[group: 'org.mockito', name: 'mockito-all', version: '1.10.19'],
[fileTree (dir: "src/test/lib", include: "*.jar")]
)
}
jar {
manifest {
attributes(
'Main-Class': 'install.StartEnd',
'Class-Path':
configurations.compile.collect { it.getName() }.join(' ')
)
}
}
task createTestDB(dependsOn: compileTestJava) << {
if (!file('src/test/resources/test.db').exists()) {
javaexec {
classpath = sourceSets.test.runtimeClasspath
main = 'persistence.CreateInitialTestTables'
}
}
}
test.dependsOn createTestDB