-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
102 lines (86 loc) · 2.46 KB
/
Copy pathbuild.gradle
File metadata and controls
102 lines (86 loc) · 2.46 KB
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
plugins {
id 'java'
id 'io.tickonomics.git-hooks'
id 'io.spring.dependency-management' version '1.1.7' apply false
id 'org.springframework.boot' version '4.1.0' apply false
id 'com.github.spotbugs' version '6.5.6' apply false
}
allprojects {
repositories {
mavenLocal()
mavenCentral()
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'checkstyle'
apply plugin: 'com.github.spotbugs'
apply plugin: 'io.spring.dependency-management'
// analytics is Python-only; jacoco requires Java source sets
if (name != 'analytics') {
apply plugin: 'jacoco'
jacocoTestReport {
dependsOn test
reports {
xml.required = true
html.required = true
}
}
}
group = 'io.tickonomics'
version = '0.0.1-SNAPSHOT'
dependencyManagement {
imports {
mavenBom "org.springframework.boot:spring-boot-dependencies:4.1.0"
mavenBom "org.testcontainers:testcontainers-bom:2.0.5"
mavenBom "org.spockframework:spock-bom:2.4-groovy-5.0"
}
dependencies {
dependency 'org.apache.groovy:groovy:5.0.6'
dependency 'org.apache.commons:commons-lang3:3.20.0'
}
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(25)
}
}
tasks.withType(JavaCompile).configureEach {
options.compilerArgs.add('-parameters')
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testImplementation 'org.spockframework:spock-core'
testImplementation 'org.apache.groovy:groovy'
}
tasks.named('test') {
useJUnitPlatform()
}
checkstyle {
ignoreFailures = true
configFile = rootProject.file('config/checkstyle/checkstyle.xml')
}
spotbugs {
ignoreFailures = true
excludeFilter = file("${project.rootDir}/config/spotbugs/spotbugs-exclude.xml")
}
tasks.named('spotbugsMain').configure {
reports {
xml.required = true
html.required = true
}
}
tasks.register('lint') {
group = 'verification'
description = 'Advisory static analysis: Checkstyle + SpotBugs (never fails the build).'
dependsOn tasks.named('checkstyleMain'), tasks.named('checkstyleTest'),
tasks.named('spotbugsMain'), tasks.named('spotbugsTest')
}
}
tasks.register('lint') {
group = 'verification'
description = 'Aggregates advisory static analysis across all modules.'
dependsOn subprojects.collect { it.tasks.named('lint') }
}