-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
156 lines (135 loc) · 4.08 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
buildscript {
ext {
springBootVersion = '2.0.8.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'checkstyle'
apply plugin: 'groovy'
apply plugin: 'eclipse'
apply plugin: 'jacoco'
apply plugin: 'findbugs'
apply plugin: 'war'
checkstyle {
toolVersion '8.17'
configFile file("config/checkstyle/checkstyle.xml")
}
checkstyleMain {
source ='src/main/java'
}
checkstyleTest {
source ='src/test/java'
}
group = 'groupthree'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
repositories {
mavenCentral()
}
ext {
jasperVersion = '9.0.10'
groovyVersion = '2.4.15'
spockVersion = '1.1-groovy-2.4'
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-web'
runtimeOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'com.h2database:h2'
runtimeOnly 'mysql:mysql-connector-java'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
//OAuth2
implementation 'org.springframework.security:spring-security-oauth2-client'
implementation 'org.springframework.security:spring-security-oauth2-jose'
compile 'org.springframework.security:spring-security-core'
compile group: 'org.springframework.security.oauth', name: 'spring-security-oauth2', version: '2.3.5.RELEASE'
//JSP
compile("javax.servlet:jstl:1.2")
compile("org.apache.tomcat.embed:tomcat-embed-jasper:$jasperVersion")
//Persistence
compile("javax.xml.bind:jaxb-api:2.3.0")
compile("org.springframework.boot:spring-boot-starter-data-jpa:${springBootVersion}")
runtime("mysql:mysql-connector-java")
testCompile("com.h2database:h2")
// Spring
testCompile("org.springframework.boot:spring-boot-starter-test:${springBootVersion}")
// Groovy
testCompile("org.codehaus.groovy:groovy-all:$groovyVersion")
// Spock
testCompile("junit:junit:4.12")
testCompile("org.spockframework:spock-core:$spockVersion")
testCompile "org.spockframework:spock-spring:$spockVersion"
testCompile("org.hamcrest:hamcrest-core:1.3")
testCompile("org.hamcrest:hamcrest-library:1.3")
// Spock-reports
testCompile( 'com.athaydes:spock-reports:1.3.1' ) {
transitive = false // this avoids affecting your version of Groovy/Spock
}
// Markdown
compile 'com.atlassian.commonmark:commonmark:0.12.1'
// Encryption
compile group: 'com.github.ulisesbocchio', name: 'jasypt-spring-boot-starter', version: '2.1.0'
// JSON
compile group: 'org.json', name: 'json', version: '20180813'
}
jacocoTestCoverageVerification {
afterEvaluate {
classDirectories = files(classDirectories.files.collect {
fileTree(dir: it, exclude: [
'**/*GitrulerApplication**',
'**/groupthree/gitruler/security/**',
'**/groupthree/gitruler/controller/*ExerciseController**',
'**/groupthree/gitruler/domain/**'
])
})
}
violationRules {
rule {
limit {
minimum = 0.6
}
}
}
}
jacocoTestReport {
reports {
html.enabled true
}
afterEvaluate {
classDirectories = files(classDirectories.files.collect {
fileTree(dir: it, exclude: [
'**/*GitrulerApplication**',
'**/groupthree/gitruler/security/**',
'**/groupthree/gitruler/controller/*ExerciseController**',
'**/groupthree/gitruler/domain/**'
])
})
}
}
check.dependsOn jacocoTestCoverageVerification
test.finalizedBy(project.tasks.jacocoTestReport)
task checkWithoutJacoco {
dependsOn check
}
gradle.taskGraph.whenReady { graph ->
if (graph.hasTask(checkWithoutJacoco)) {
jacocoTestCoverageVerification.enabled = false
jacocoTestReport.enabled = false
}
}
findbugs{ findbugsTest.enabled=false }
tasks.withType(FindBugs) {
reports {
xml.enabled = false
html.enabled = true
}
}