-
Notifications
You must be signed in to change notification settings - Fork 33
/
build.gradle
89 lines (76 loc) · 2.01 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
plugins {
id 'java-library'
id 'jacoco'
id 'maven-publish'
id 'signing'
alias(libs.plugins.asciidoctor) apply false
alias(libs.plugins.dependencycheck)
alias(libs.plugins.spring.boot) apply false
alias(libs.plugins.spring.dependency.management) apply false
alias(libs.plugins.vers)
}
def isNonStable = { String version ->
def stableKeyword = ['RELEASE', 'FINAL', 'GA'].any { otherIt -> version.toUpperCase().contains(otherIt) }
def regex = /^[0-9,.v-]+(-r)?$/
return !stableKeyword && !(version ==~ regex)
}
def specificMinimumVersions = { ModuleComponentIdentifier candidate ->
candidate.group == "org.mapstruct" || candidate.group == "org.springframework"
}
dependencyUpdates {
resolutionStrategy {
componentSelection {
all {
if (isNonStable(it.candidate.version) && !isNonStable(it.currentVersion)) {
reject('Release candidate')
} else if (specificMinimumVersions(it.candidate)) {
reject('Minimal compatible version')
}
}
}
}
}
allprojects {
repositories {
mavenCentral()
}
dependencyCheck {
analyzers {
assemblyEnabled = false
nodeEnabled = false
nodeAuditEnabled = false
nugetconfEnabled = false
nuspecEnabled = false
}
}
}
subprojects {
apply plugin: "java-library"
apply plugin: "jacoco"
group = 'org.mapstruct.extensions.spring'
version = '1.1.3-SNAPSHOT'
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(11))
}
withJavadocJar()
withSourcesJar()
}
testing {
suites {
test {
useJUnitJupiter()
}
}
}
jacoco {
toolVersion = "0.8.12"
}
jacocoTestReport {
reports {
xml.required = true
html.required = true
}
}
check.dependsOn jacocoTestReport
}