-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
70 lines (54 loc) · 1.23 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
plugins {
id 'java'
id 'eclipse'
id 'maven'
id 'jacoco'
id 'pmd'
}
/*
* Gets the version name from the latest Git tag of the form V-X.Y where X and Y are version numbers
*/
def getVersionName = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'describe', '--tags', '--match', 'V-*.*'
standardOutput = stdout
}
def v = stdout.toString().trim() =~ /V-(\d+)\.(\d+)(?:-(\d+)-)?/
return v[0][1] + "." + v[0][2] + "." + (v[0][3] == null ? 0 : v[0][3])
}
group = 'ch.kerbtier.hops-db'
version = getVersionName()
sourceCompatibility = 1.7
targetCompatibility = 1.7
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
compile 'com.mchange:c3p0:0.9.5.1'
compile 'com.google.guava:guava:18.0'
compile 'org.apache.commons:commons-lang3:3.4'
compile 'ch.kerbtier.struwwel:struwwel:0.1.0'
testCompile 'org.testng:testng:6.9.6'
testCompile 'com.h2database:h2:1.4.187'
}
test {
useTestNG()
testLogging {
exceptionFormat = 'full'
}
maxHeapSize = '8m'
}
jar {
baseName = 'hops-db'
version = version
manifest {
attributes 'Implementation-Title': 'hops-db', 'Implementation-Version': version
}
}
jacocoTestReport {
reports {
html.enabled true
}
}