-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
63 lines (51 loc) · 1.32 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
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'findbugs'
apply plugin: 'eclipse'
apply plugin: 'application'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
mainClassName = 'jp.ac.kyoto_su.tamadalab.chabudai.Main'
[compileJava, compileTestJava]*.options*.encoding = 'utf-8'
repositories{
jcenter()
}
dependencies{
compile 'org.eclipse.jdt:org.eclipse.jdt.core:3.14.0'
testCompile 'junit:junit:4.12'
testCompile 'org.hamcrest:hamcrest-all:1.3'
}
jar{
manifest{
attributes 'Implementation-Title': 'chabudai'
attributes 'Implementation-Version': '1.0'
attributes 'Main-Class': 'jp.ac.kyoto_su.tamadalab.chabudai.Main'
}
from configurations.compile.collect { it.isDirectory()? it: zipTree(it) }
}
jacoco{
toolVersion = '0.7.9'
}
jacocoTestReport{
reports {
xml.enabled = true
html.enabled = true
}
}
findbugs{
ignoreFailures = true
}
test.doLast{
tasks.jacocoTestReport.execute()
}
tasks.withType(FindBugs) {
reports {
xml.enabled = false
html.enabled = true
}
}
run {
if (project.hasProperty('args')) { // "args" というプロパティが渡されていたら
args project.args.split('\\s+') // 空白文字で split して、 run タスクの args オプションにセットする
}
}