-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
137 lines (114 loc) · 3.41 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
buildscript {
repositories {
jcenter()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/"}
maven { url 'http://repo.spring.io/snapshot' }
maven { url 'http://repo.spring.io/milestone' }
}
ext {
springBootVersion = '2.0.0.M7'
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
classpath 'com.bmuschko:gradle-cargo-plugin:2.2.3'
classpath 'gradle.plugin.com.gorylenko.gradle-git-properties:gradle-git-properties:1.4.17'
classpath "gradle.plugin.at.comm_unity.gradle.plugins:jpamodelgen-plugin:1.1.4"
}
}
description 'the::bookproject'
allprojects {
apply plugin: 'java'
apply plugin: 'jacoco'
repositories {
jcenter()
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
group 'bookproject'
version '0.0.1'
}
apply plugin: 'com.bmuschko.cargo'
cargo {
containerId = 'tomcat8x'
port = 8080
remote {
hostname = 'thalia.fraglab.net'
username = 'tomcat'
password = 'tomcat'
}
deployable {
file = file('app/build/libs/bookproject.war')
}
}
subprojects {
apply plugin: 'checkstyle'
apply plugin: 'findbugs'
apply plugin: 'pmd'
apply plugin: 'project-report'
apply plugin: 'build-dashboard'
apply plugin: "io.spring.dependency-management"
sourceCompatibility = 1.8
targetCompatibility = 1.8
test {
ignoreFailures = true
reports.html.enabled = false
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.warnings = true
options.compilerArgs = ['-Xlint', '-Xlint:-processing']
}
checkstyle {
toolVersion "8.4"
configFile file("${rootProject.projectDir}/config/checkstyle/checkstyle.xml")
}
pmd {
toolVersion "5.8.1"
}
findbugs {
toolVersion "3.0.1"
effort "max"
reportLevel "low"
ignoreFailures true
}
tasks.withType(FindBugs) {
reports {
xml.enabled = true
html.enabled = false
}
}
jacoco {
toolVersion = "0.7.9"
}
test.jacoco.excludes = ['com/steadystate/**']
dependencies {
compileOnly 'org.projectlombok:lombok:1.16.18'
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'org.assertj', name: 'assertj-core', version: '3.8.0'
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.7.22'
}
}
task alljavadoc(type: Javadoc) {
options.encoding = 'UTF-8'
source = subprojects*.sourceSets.main.allJava
classpath = files(subprojects*.sourceSets.main.compileClasspath)
destinationDir = file("${buildDir}/docs/javadoc")
}
task testReport(type: TestReport) {
destinationDir = file("${buildDir}/reports/tests")
reportOn subprojects*.test
}
dependencies {
def cargoVersion = '1.4.5'
cargo "org.codehaus.cargo:cargo-core-uberjar:$cargoVersion",
"org.codehaus.cargo:cargo-ant:$cargoVersion"
}
task jacocoMerge(type: JacocoMerge) {
destinationFile file("${buildDir}/jacoco/test.exec")
def execFiles = subprojects.findResults {
new File("${it.buildDir}/jacoco/test.exec").exists()?"${it.buildDir}/jacoco/test.exec":null
}
executionData files(execFiles)
}