-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
91 lines (70 loc) · 1.89 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
abstract class VersionInformationTask extends DefaultTask {
@Input
abstract String versionProperty
@Input
abstract File outputDir
@TaskAction
def write() {
if (!outputDir.exists()) {
outputDir.mkdirs()
}
new File(outputDir, "version.properties").text =
"""version=$versionProperty
"""
}
}
plugins {
id 'java'
id 'jacoco'
}
group 'com.github.chrisblutz'
version '0.0.1'
sourceCompatibility = 8
repositories {
mavenCentral()
flatDir {
dirs 'lib'
}
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
compile group: 'com.mchange', name: 'c3p0', version: '0.9.5.5'
compile group: 'mysql', name: 'mysql-connector-java', version: '8.0.17'
compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.1'
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.1'
compile group: 'org.apache.xmlbeans', name: 'xmlbeans', version: '2.6.0'
compile name: 'nasr-aixm'
}
task writeVersionInformation(type: VersionInformationTask) {
outputDir = sourceSets.main.output.resourcesDir
versionProperty = version
}
jar {
dependsOn writeVersionInformation
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
manifest {
attributes(
'Implementation-Title': 'Jetway',
'Implementation-Version': version,
'Main-Class': 'com.github.chrisblutz.jetway.Jetway'
)
}
}
tasks.withType(Jar) {
destinationDir = file('bin/')
}
test {
dependsOn writeVersionInformation
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
}
finalizedBy jacocoTestReport
}
jacocoTestReport {
dependsOn test
reports {
xml.enabled true
csv.enabled false
html.enabled false
}
}