-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
116 lines (96 loc) · 2.95 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
/*
* Copyright 2015-2016 Patrick Jungermann
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
group 'com.github.pjungermann.config'
version '1.0-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'findbugs'
apply plugin: 'pmd'
apply plugin: 'jacoco'
apply plugin: 'com.github.johnrengelman.shadow'
//noinspection GroovyUnusedAssignment
sourceCompatibility = 1.8
//noinspection GroovyUnusedAssignment
targetCompatibility = 1.8
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
}
}
allprojects {
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}
repositories {
mavenCentral()
}
dependencies {
// logging
compile 'org.slf4j:slf4j-log4j12:1.7.25'
// data policies
compile 'com.intellij:annotations:12.0'
// dependency injection
compile 'javax.inject:javax.inject:1'
// framework for dependency injection
// (easier to plugin extensions)
// + message bundle handling
compile 'org.springframework:spring-context:4.3.8.RELEASE'
// config utils
compile 'org.apache.commons:commons-lang3:3.5'
// groovy config
// + constraints
// + Groovy based DSL
compile 'org.codehaus.groovy:groovy-all:2.4.11'
// json config
compile 'com.fasterxml.jackson.core:jackson-databind:2.8.8.1'
// INI config
compile 'org.ini4j:ini4j:0.5.4'
// Yaml config
compile 'org.yaml:snakeyaml:1.18'
// config specification core
compile 'commons-validator:commons-validator:1.6'
// application CLI
compile 'commons-cli:commons-cli:1.4'
testCompile 'junit:junit:4.12'
// bean creation test to check compatibility with guice
testCompile 'com.google.inject:guice:4.1.0'
testCompile 'com.google.inject.extensions:guice-multibindings:4.1.0'
}
// ensure to build only acceptable versions
jacocoTestReport.dependsOn test
check.dependsOn findbugsMain, findbugsTest, pmdMain, pmdTest, jacocoTestReport
jar.dependsOn check
shadowJar.dependsOn check
build.dependsOn shadowJar
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
}
}
// report format settings
tasks.withType(FindBugs) {
ignoreFailures = false
reports {
html.enabled = Boolean.parseBoolean(System.getProperty('gradle.reports.html', 'false'))
xml.enabled = !html.isEnabled()
}
}