-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
82 lines (70 loc) · 2.22 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
plugins {
id 'java'
id 'jacoco'
id 'com.github.kt3k.coveralls' version '2.0.1'
id 'sonar-runner'
}
version = '1.1'
task fatJar(type: Jar, dependsOn: 'classes') {
archiveName 'TranslationHelper-all.jar'
destinationDir new File(project.rootDir, "dist")
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
manifest {
attributes 'Implementation-Title': 'Translation Helper',
'Implementation-Version': version,
'main-class': 'de.vogel612.helper.TranslationHelper'
}
with jar
}
task run(type: JavaExec, dependsOn: 'classes') {
classpath sourceSets.main.runtimeClasspath
main 'de.vogel612.helper.TranslationHelper'
}
repositories {
mavenCentral()
jcenter()
}
dependencies {
compile group: 'org.jdom', name: 'jdom2', version: '2.0.6'
// xPath dependency for jdom
compile group: 'jaxen', name: 'jaxen', version: '1.1.6'
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile 'org.mockito:mockito-core:2.0.2-beta'
testCompile 'org.testfx:testfx-core:4.0.1-alpha'
testCompile 'org.testfx:testfx-junit:4.0.1-alpha'
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
}
}
test {
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
afterSuite { desc, result ->
if (!desc.parent) { // will match the outermost suite
println "Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped)"
}
}
exceptionFormat = 'full'
}
}
// Workaround for IntelliJ classpath-problems
task copyTestResources(type: Copy) {
from "${projectDir}/src/test/resources"
from "${projectDir}/src/main/resources"
into "${buildDir}/classes/test"
}
processTestResources.dependsOn copyTestResources
// Workaround for IntelliJ classpath-problems
task copyResources(type: Copy) {
from "${projectDir}/src/main/resources"
into "${buildDir}/classes/main"
}
processResources.dependsOn copyResources
task wrapper(type: Wrapper) {
gradleVersion = '2.12'
}