This repository has been archived by the owner on May 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
executable file
·91 lines (71 loc) · 2 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
apply plugin: 'java'
apply plugin: 'checkstyle'
apply plugin: 'jacoco'
apply from: 'build/vars.gradle'
sourceSets.main.java.srcDirs = ["$project.srcDir"]
sourceSets.main.output.classesDir = file("$project.binSrcClassesDir")
sourceSets.main.output.resourcesDir = "$project.binSrcClassesResourcesDir"
sourceSets.main.resources.srcDirs = ["$project.srcResourcesDir"]
sourceSets.test.java.srcDirs = ["$project.testsDir", "$project.testingDir"]
sourceSets.test.output.classesDir = file("$project.binTestsClassesDir")
sourceSets.test.output.resourcesDir = "$project.binTestsResourcesDir"
sourceSets.test.resources.srcDirs = ["$project.testsResourcesDir"]
task showProperties << {
println "$sourceSets.test.output.resourcesDir"
println "$project.checkstyle.configFile"
println "$project.configurations.checkstyle"
}
// Modifying tasks already defined by javaPlugin.
clean {
FileCollection toDelete = files(
"$project.binDir",
"$project.coverageDir",
"$project.docDir",
"$project.reportsDir",
"jacoco.exec")
delete(toDelete)
}
repositories {
mavenCentral()
}
dependencies {
compile(
fileTree("$project.libDir"))
testCompile 'junit:junit:4.11'
}
jar {
destinationDir = file("$project.binJarDir")
includeEmptyDirs = false
baseName = "smart-cli-parser"
appendix = "nightly"
version = "1.0"
manifest {
attributes 'Built-By': 'freshp',
'Implementation-Version': version
}
}
javadoc {
options.links "http://docs.oracle.com/javase/6/docs/api/"
}
test {
testLogging {
// Show that tests are run in the command-line output.
events 'passed', 'failed'
// Display more information when a test fails.
exceptionFormat 'full'
}
}
checkstyle {
configFile = file("build/style_checks.xml")
}
// Tasks related to code coverage calculation.
jacoco {
toolVersion = "0.7.2.201409121644"
}
jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.destination "${project.binDir}/coverage"
}
}