-
Notifications
You must be signed in to change notification settings - Fork 36
/
build.gradle
113 lines (90 loc) · 2.85 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
group "com.github.izhangzhihao"
version "1.0-SNAPSHOT"
apply plugin: "java"
apply plugin: "jacoco"
apply plugin: "idea"
sourceCompatibility = 1.8
targetCompatibility = 1.8
def SpringVersion = "4.3.3.RELEASE"
def POIVersion = "3.15-beta2"
repositories {
mavenLocal()
maven { url "http://maven.aliyun.com/nexus/content/groups/public/" }
jcenter()
mavenCentral()
maven { url "http://repo.spring.io/release" }
maven { url "https://repo.spring.io/libs-snapshot" }
}
dependencies {
compile(
// spring framework
"org.springframework:spring-beans:$SpringVersion",
"org.springframework:spring-aop:$SpringVersion",
"org.springframework:spring-aspects:$SpringVersion",
"org.springframework:spring-core:$SpringVersion",
"javax.servlet:javax.servlet-api:3.1.0",
//apache
"commons-fileupload:commons-fileupload:1.3.2",
"org.apache.commons:commons-lang3:3.4",//深拷贝
//jUnit
"junit:junit:4.12",
//@NotNull
"org.jetbrains:annotations:15.0",
//Lombok
"org.projectlombok:lombok:1.16.10",
//POI
"org.apache.poi:poi:$POIVersion",
"org.apache.poi:poi-ooxml:$POIVersion",
"org.apache.poi:poi-scratchpad:$POIVersion",
"org.apache.poi:poi-ooxml-schemas:$POIVersion",
"org.apache.xmlbeans:xmlbeans:2.6.0",
"org.apache.poi:poi-excelant:$POIVersion",
//
//"com.lowagie:itext:2.1.7",
//"com.lowagie:itext-rtf:2.1.7",
"org.docx4j:docx4j:3.3.1",
"org.docx4j:docx4j-export-fo:3.3.1",
"org.codehaus.groovy:groovy:2.4.7",
//slf4j
"org.slf4j:jcl-over-slf4j:1.7.21",
"ch.qos.logback:logback-core:1.1.7",
"ch.qos.logback:logback-classic:1.1.7",
)
testCompile(
//jUnit
"junit:junit:4.12",
)
}
task copyJars(type: Copy) {
from configurations.runtime
into "lib" //复制到lib目录
}
//让gradle支持中文
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
test {
useJUnit()
// listen to events in the test execution lifecycle
beforeTest { descriptor ->
logger.lifecycle("Running test: " + descriptor)
}
// listen to standard out and standard error of the test JVM(s)
onOutput { descriptor, event ->
logger.lifecycle("Test: " + descriptor + " produced standard out/err: " + event.message)
}
jacoco {
destinationFile = file("$buildDir/jacoco/test.exec")
}
}
jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.destination "${buildDir}/jacocoHtml"
}
}
build.dependsOn jacocoTestReport
task integrationTest(type: Test) {
include "test/java/**"
}