-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
91 lines (80 loc) · 2.7 KB
/
build.gradle.kts
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
import com.github.spotbugs.SpotBugsExtension
import org.javamodularity.moduleplugin.tasks.PatchModuleExtension
description = "AltarPlanner creates altar server schedules. This project is the multi-project parent."
plugins {
java
id("org.javamodularity.moduleplugin") version "1.5.0" apply false
id("com.github.spotbugs") version "3.0.0" apply false
id("com.github.ben-manes.versions") version "0.27.0"
}
allprojects {
group = "org.altarplanner"
version = "0.1.0"
}
subprojects {
apply(plugin = "java")
configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
tasks.withType<JavaCompile>().configureEach {
options.encoding = "UTF-8"
}
tasks.withType<Test> {
useJUnitPlatform()
}
dependencies {
testImplementation(platform("org.junit:junit-bom:5.6.0"))
testImplementation("org.junit.jupiter:junit-jupiter-api")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
apply(plugin = "org.javamodularity.moduleplugin")
configure<PatchModuleExtension> {
config = listOf(
"xmlpull=xpp3_min-1.1.4c.jar"
)
}
apply(plugin = "checkstyle")
val checkstyleVersion = "8.26"
configure<CheckstyleExtension> {
toolVersion = checkstyleVersion
isIgnoreFailures = true
}
apply(plugin = "com.github.spotbugs")
val spotbugsVersion = "4.0.0-RC1"
configure<SpotBugsExtension> {
toolVersion = spotbugsVersion
isIgnoreFailures = true
}
apply(plugin = "pmd")
val pmdVersion = "6.21.0"
configure<PmdExtension> {
toolVersion = pmdVersion
ruleSets = listOf()
ruleSetFiles = files("${project.rootDir}/config/pmd/ruleSet.xml")
isIgnoreFailures = true
}
dependencies {
default("com.puppycrawl.tools:checkstyle:$checkstyleVersion")
default("com.github.spotbugs:spotbugs:$spotbugsVersion")
default("net.sourceforge.pmd:pmd:$pmdVersion")
}
repositories {
mavenCentral()
}
}
tasks.named<com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask>("dependencyUpdates") {
resolutionStrategy {
componentSelection {
all {
val rejected = listOf("alpha", "beta", "rc", "cr", "m", "preview", "b", "ea", "0.t0")
.map { qualifier -> Regex("(?i).*[.-]$qualifier[.\\d-+]*") }
.any { it.matches(candidate.version) }
if (rejected) {
reject("Release candidate")
}
}
}
}
}