-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
81 lines (68 loc) · 2.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
plugins {
id "com.github.spotbugs" version "1.7.1"
// dependencyUpdates Task zum prüfen auf neue Versionen
id 'com.github.ben-manes.versions' version '0.21.0'
}
group 'de.inverso.workshop'
version '0.1'
allprojects {
repositories {
jcenter()
}
}
subprojects {
apply plugin: 'java'
// static analysis
apply plugin: 'jacoco'
// IDE support
apply plugin: 'eclipse'
sourceCompatibility = '11'
targetCompatibility = '11'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
dependencies {
def versionSpotbugs = '3.1.12'
compileOnly 'com.google.code.findbugs:jsr305:3.0.2'
compileOnly "com.github.spotbugs:spotbugs-annotations:$versionSpotbugs"
def versionJUnit = '5.4.2'
testCompileOnly "com.github.spotbugs:spotbugs-annotations:$versionSpotbugs"
testCompile("org.junit.jupiter:junit-jupiter-api:$versionJUnit")
testRuntime("org.junit.jupiter:junit-jupiter-engine:$versionJUnit")
testCompile("org.assertj:assertj-core:3.12.2")
testCompile "org.mockito:mockito-core:2.27.0"
}
test {
useJUnitPlatform()
}
spotbugs {
toolVersion = '3.1.12'
effort = 'max'
reportLevel = 'low'
ignoreFailures = true
}
//findbugs { ignoreFailures = true }
// Findbugs in Eclipse immer ausführen
// Dieser Hack ist notwendig, damit Buildship Findbugs nicht entfernt
/*
afterEvaluate {
eclipse.project {
buildCommand 'edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder'
natures 'edu.umd.cs.findbugs.plugin.eclipse.findbugsNature'
}
}
*/
}
wrapper {
gradleVersion = '5.4.1'
}
dependencyUpdates.resolutionStrategy {
componentSelection { rules ->
rules.all { ComponentSelection selection ->
boolean rejected = ['alpha', 'beta', 'rc', 'cr', 'm', 'preview', 'b', 'ea'].any { qualifier ->
selection.candidate.version ==~ /(?i).*[.-]$qualifier[.\d-+]*/
}
if (rejected) {
selection.reject('Release candidate')
}
}
}
}