-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathbuild.gradle
More file actions
88 lines (73 loc) · 2.06 KB
/
build.gradle
File metadata and controls
88 lines (73 loc) · 2.06 KB
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
/*
* This build file was auto generated by running the Gradle 'init' task
* by 'jabed' at '11/14/15 7:37 PM' with Gradle 2.8
*
*/
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'application'
mainClassName = 'hello.HelloWorld'
repositories {
mavenCentral()
}
jar {
baseName = 'jb-hello-world'
version = '0.1.0'
}
/* 1.8 means Java 8 or above */
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compile "joda-time:joda-time:2.2"
testCompile('org.junit.jupiter:junit-jupiter-api:5.3.1')
testCompile('org.junit.jupiter:junit-jupiter-params:5.3.1')
testRuntime('org.junit.jupiter:junit-jupiter-engine:5.3.1')
// The following is a work around to fix the warning:
// warning: unknown enum constant Status.STABLE
testCompile "org.apiguardian:apiguardian-api:1.0.0"
}
// ****** Comment this out on the remote repository so that Travis CI will build ******
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}
task dist {
description "Generate the dist(s) into the dist folder need to fix this."
}
task distSetup {
description "Generate the dist folder."
delete "${projectDir}/dist"
copy {
from "${buildDir}/build/distributions"
into "${projectDir}/dist/executables"
}
copy {
from "${projectDir}/build/reports"
into "${projectDir}/dist/test_reports"
}
}
task zipDist(type: Zip, dependsOn: distSetup) {
from "${projectDir}/dist/executables"
from "${projectDir}/Readme.md"
destinationDir = file("${projectDir}/dist")
version = "${version}"
appendix = "Main"
doLast {
println "Created ${zipDist.archiveName}"
}
}
task zipTest(type: Zip, dependsOn: distSetup) {
from "${projectDir}/dist/test_reports"
from "${projectDir}/Readme.md"
destinationDir = file("${projectDir}/dist")
version = "${version}"
appendix = "Test Output"
doLast{
println "Created ${zipTest.archiveName}"
}
}
distSetup.dependsOn(build)
dist.dependsOn(zipDist)
dist.dependsOn(zipTest)