-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
77 lines (64 loc) · 2.36 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
configurations {
schema
}
sourceSets {
main {
java.srcDirs = ['src/main/java', 'build/generated-sources']
resources.srcDirs = ['src/main/resources']
}
}
dependencies {
compile project(':common-db')
compile project(':common-verifier')
// DB layer tests use HSQLDB with in-memory tables
testCompile 'org.hsqldb:hsqldb:2.5.0'
testCompile project(':common-db')
testCompile project(':common-test')
testCompile "org.hibernate:hibernate-hikaricp:$hibernateVersion"
schema project(':common-util')
schema "org.hibernate:hibernate-hikaricp:$hibernateVersion"
schema "org.hibernate:hibernate-tools:$hibernateVersion"
schema 'commons-collections:commons-collections:3.2.2'
schema 'ch.qos.logback:logback-classic:1.2.3'
schema 'org.hsqldb:hsqldb:2.5.0'
}
task schemaExport () {
doLast {
ant.taskdef(name: 'schemaExport', classname: 'org.hibernate.tool.ant.HibernateToolTask', classpath: configurations.schema.asPath)
ant.schemaExport(destdir: 'build') {
configuration(
configurationfile: 'src/main/resources/serverconf.hibernate.cfg.xml',
propertyFile: 'src/test/resources/hibernate-schema.properties'
)
hbm2ddl(
export: false,
outputfilename: 'schema-export.sql',
delimiter: ';',
format: 'true')
classpath {
pathelement(path: configurations.schema.asPath)
pathelement(path: 'src/main/resources')
pathelement(path: 'src/test/resources')
pathelement(path: 'build/classes/java/main')
}
}
}
}
task runServerConfCRUDTest (type: JavaExec) {
jvmArgs '-Dlogback.configurationFile=src/test/resources/logback-crudtest.xml'
main = 'ee.ria.xroad.proxy.conf.ServerConfCRUDTest'
classpath = sourceSets.test.runtimeClasspath
standardInput = System.in;
}
schemaExport.dependsOn compileJava
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