-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
116 lines (99 loc) · 2.74 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
apply plugin: "java"
apply plugin: "jacoco"
apply plugin: "eclipse"
// 変数定義
def javaVersion = "1.6"
def defaultEncoding = "UTF-8"
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
tasks.withType(AbstractCompile).each { it.options.encoding = defaultEncoding }
repositories {
mavenCentral()
maven {
url "http://maven.seasar.org/maven2"
}
}
sourceSets {
errorsTest {
java.srcDir file('src/test/java_errors')
}
mapperTest {
java.srcDir file('src/test/java_mappers')
output.classesDir = sourceSets.test.output.classesDir
}
}
configurations {
all*.exclude group: "commons-logging"
}
dependencies {
testCompile (
"junit:junit:4.12",
"org.seasar.aptina:aptina-unit:1.0.0",
)
mapperTestCompile sourceSets.test.output
mapperTestCompile "junit:junit:4.12"
}
compileTestJava {
options.failOnError = false
}
test {
dependsOn compileMapperTestJava
reports {
html {
enabled = true
destination = "${buildDir}/reports/tests"
}
junitXml {
enabled = true
destination = "${buildDir}/test-results/tests"
outputPerTestCase = false
}
}
}
jacocoTestReport {
reports {
sourceSets sourceSets.main
xml {
enabled = true
destination = "${buildDir}/test-results/jacoco/coverage.xml"
}
html {
enabled = true
destination = "${buildDir}/reports/jacoco"
}
}
}
check.dependsOn += jacocoTestReport
javadoc {
options {
encoding = defaultEncoding
docEncoding = defaultEncoding
charSet = defaultEncoding
}
}
eclipse {
project {
file {
withXml {
def resources = it.asNode().appendNode("filteredResources")
def random = new Random()
def create = { parent, type, arguments ->
def filter = parent.appendNode("filter")
filter.appendNode("id", System.currentTimeMillis() + random.nextInt())
filter.appendNode("type", type)
filter.appendNode("name", "")
def matcher = filter.appendNode("matcher")
matcher.appendNode("id", "org.eclipse.ui.ide.multiFilter")
matcher.appendNode("arguments", arguments)
}
create resources, 10, "1.0-name-matches-false-false-gradle"
create resources, 6, '1.0-name-matches-false-false-gradlew*'
}
}
}
}
eclipseClasspath.dependsOn += cleanEclipseClasspath
eclipseProject.dependsOn += cleanEclipseProject
task wrapper(type: Wrapper) {
gradleVersion = "2.12"
}