-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
109 lines (91 loc) · 3.2 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
buildscript {
ext {
hawaiiFrameworkVersion = "3.0.0.M23"
javaVersion = "11"
oauthSpringBootVersion = "2.1.0.RELEASE"
springFrameworkVersion = "5.1.2.RELEASE"
springRestDocsVersion = '2.0.2.RELEASE'
springAutoRestDocsVersion = '2.0.4'
}
}
plugins {
id "checkstyle"
id "com.github.spotbugs" version "1.6.6"
id "java"
id "maven-publish"
id "pmd"
}
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
version = "1.0.0.M9-SNAPSHOT"
group = "org.hawaiiframework"
dependencies {
compileOnly("net.ttddyy:datasource-proxy:1.4.2")
compileOnly("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.9")
compileOnly("com.google.code.findbugs:jsr305:3.0.2")
compileOnly("org.hibernate:hibernate-validator:6.0.17.Final")
compile("javax.validation:validation-api:2.0.1.Final")
// <rest autodoc>
compileOnly("com.kjetland:mbknor-jackson-jsonschema_2.11:1.0.29")
compileOnly("org.springframework.restdocs:spring-restdocs-mockmvc:${springRestDocsVersion}")
compileOnly(group: 'capital.scalable', name: 'spring-auto-restdocs-core', version: "${springAutoRestDocsVersion}")
// </rest autodoc>
// Library for IO
compileOnly("commons-io:commons-io:2.5")
compileOnly("org.springframework.boot:spring-boot:2.2.5.RELEASE")
compileOnly("org.springframework:spring-jdbc:${springFrameworkVersion}")
compileOnly("org.springframework.data:spring-data-redis:2.1.9.RELEASE")
compileOnly("org.hawaiiframework:hawaii-async:${hawaiiFrameworkVersion}")
runtime("org.apache.commons:commons-lang3:3.8.1")
// <test_dependencies>
testCompileOnly("org.junit.jupiter:junit-jupiter-api:5.4.0")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.4.0")
// https://mvnrepository.com/artifact/org.mockito/mockito-core
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.10.0'
// </test_dependencies>
}
checkstyle {
configDir = file("${rootProject.projectDir}/src/quality/config/checkstyle")
ignoreFailures = false
sourceSets = [sourceSets.main]
toolVersion = "8.15"
}
pmd {
ignoreFailures = false
consoleOutput = true
ruleSetFiles = files("${rootProject.projectDir}/src/quality/config/pmd/pmd.xml")
ruleSets = [] // https://github.com/pmd/pmd/issues/876
sourceSets = [sourceSets.main]
toolVersion = "6.10.0"
}
spotbugs {
excludeFilter = file("${rootProject.projectDir}/src/quality/config/spotbugs/exclude.xml")
ignoreFailures = false
sourceSets = [sourceSets.main]
toolVersion = "3.1.9"
}
tasks.withType(JavaCompile) {
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
options.deprecation = true
options.encoding = "UTF-8"
// add Xlint to our compiler options (but disable processing because of Spring warnings in code)
// and make warnings be treated like errors
options.compilerArgs += ["-Xlint:all", "-Xlint:-processing", "-Werror"]
}
tasks.withType(com.github.spotbugs.SpotBugsTask) {
reports {
xml.enabled = false
html.enabled = true
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}