-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
208 lines (185 loc) · 6.02 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
buildscript {
ext {
springBootVersion = "2.0.1.RELEASE"
}
repositories {
jcenter()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
mavenLocal()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
}
}
apply plugin: "java"
apply plugin: "maven"
apply plugin: "checkstyle"
apply plugin: "jacoco"
apply plugin: "idea"
apply plugin: "org.springframework.boot"
apply plugin: "io.spring.dependency-management"
group = "de.communicode"
version = "0.17.2"
description = "A simple centralized, cross-platform credential manager using GPG encryption."
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
ext {
documentationUrl = "https://communicode.github.io/communikey-docs"
issueManagementSystem = "GitHub"
issueManagementUrl = "https://github.com/communicode/communikey-backend/issues"
licenseName = "GPL-3.0"
licenseUrl = "https://github.com/communicode/communikey-backend/blob/develop/LICENSE.md"
maintainerId = "communicode"
maintainerName = "communicode AG"
maintainerUrl = "https://communicode.de"
name = "communikey"
repositoryUrl = "https://github.com/communicode/communikey-backend.git"
repositoryUrlGit = "git://[email protected]:communicode/communikey-backend.git"
url = "https://communicode.github.io/communikey-backend"
}
def checkstyleVersion = "8.0"
def commonsLangVersion = "3.7"
def guavaVersion = "25.0-jre"
def hashidsVersion = "1.0.3"
def jfairyVersion = "0.5.9"
def restAssuredVersion = "3.1.0"
def sockjsClientVersion = "1.1.2"
def springSecurityOauth2Version = "2.3.2.RELEASE"
def springSecurityTestVersion = "5.0.4.RELEASE"
def stompWebsocketVersion = "2.3.3"
bootRun {
jvmArgs = ["-Dspring.profiles.active=dev"]
}
checkstyle {
configFile = file("config/checkstyle/communicode-style-guide-1.1.xml")
toolVersion = "$checkstyleVersion"
ignoreFailures = false
showViolations = true
}
configurations {
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
}
configurations.all {
/* Required to use log4j (prevents multiple SLF4J bindings). */
exclude group: "org.springframework.boot", module: "spring-boot-starter-logging"
}
dependencies {
compile("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml")
compile("com.google.guava:guava:$guavaVersion")
compile("org.apache.commons:commons-lang3:$commonsLangVersion")
compile("org.hashids:hashids:$hashidsVersion")
compile("org.springframework.boot:spring-boot-starter-data-jpa")
compile("org.springframework.boot:spring-boot-starter-json")
compile("org.springframework.boot:spring-boot-starter-log4j2")
compile("org.springframework.boot:spring-boot-starter-security")
compile("org.springframework.boot:spring-boot-starter-web")
compile("org.springframework.boot:spring-boot-starter-webflux")
compile("org.springframework.boot:spring-boot-starter-websocket")
compile("org.springframework.security:spring-security-messaging")
compile("org.springframework.security.oauth:spring-security-oauth2:$springSecurityOauth2Version")
compile("org.webjars:sockjs-client:$sockjsClientVersion")
compile("org.webjars:stomp-websocket:$stompWebsocketVersion")
compileOnly("org.springframework.boot:spring-boot-configuration-processor")
runtime("mysql:mysql-connector-java")
runtime("org.springframework.boot:spring-boot-devtools")
testCompile("org.springframework.boot:spring-boot-starter-test")
testCompile("io.projectreactor:reactor-test")
testCompile("org.springframework.security:spring-security-test:$springSecurityTestVersion")
testCompile("io.rest-assured:rest-assured:$restAssuredVersion")
testCompile("io.codearte.jfairy:jfairy:$jfairyVersion")
}
idea {
module {
downloadJavadoc = true
downloadSources = true
inheritOutputDirs = false
outputDir = file("build/classes/java/main")
testOutputDir = file("build/classes/java/test")
}
}
jar {
baseName "$rootProject.name"
version "$version"
}
javadoc {
failOnError = false
excludes = ["**/test/**", "**/integration-test/**"]
options {
setMemberLevel JavadocMemberLevel.PRIVATE
windowTitle = "$project.name $project.version API"
addStringOption("bottom", "Copyright © 2016-present $project.maintainerName")
addStringOption("doctitle", "$project.name $project.version API")
/* Reference: http://openjdk.java.net/jeps/8068562 */
tags = [
"apiNote:a:API Note:",
"implSpec:a:Implementation Specification:",
"implNote:a:Implementation Note:"
]
links("https://communicode.github.io/communikey-docs/$project.version/javadoc")
}
}
repositories {
jcenter()
mavenCentral()
mavenLocal()
}
sourceSets {
integrationTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir file("src/integration-test/java")
}
resources.srcDir file("src/integration-test/resources")
}
}
test {
testLogging {
showStandardStreams = true
events = ["passed", "skipped", "failed", "standardOut", "standardError"]
showExceptions = true
showCauses = true
showStackTraces = true
}
useJUnit {
excludeCategories "de.communicode.communikey.CommunikeyIntegrationTest"
}
reports {
junitXml.enabled = true
html.enabled = true
}
}
task integrationTest(type: Test) {
description = "Runs the API integration tests."
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
}
task jacocoReport(type: JacocoReport){
sourceSets sourceSets.main
executionData test, integrationTest
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = "javadoc"
from javadoc.destinationDir
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
}
task wrapper(type: Wrapper) {
gradleVersion = "4.7"
}
artifacts {
archives bootJar
archives sourcesJar
archives javadocJar
}
check.dependsOn integrationTest
integrationTest.mustRunAfter test