-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
73 lines (62 loc) · 1.83 KB
/
build.gradle
File metadata and controls
73 lines (62 loc) · 1.83 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
// Root build.gradle - Multi-project coordinator
plugins {
id 'io.spring.dependency-management' version '1.1.4' apply false
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
}
group = 'com.github.istin'
version = "${version}"
// Common configuration for all subprojects
subprojects {
// Apply common plugins
apply plugin: 'java-library'
apply plugin: 'jacoco'
// Common group and version
group = 'com.github.istin'
version = rootProject.version
// Java version configuration
java {
sourceCompatibility = JavaVersion.VERSION_23
targetCompatibility = JavaVersion.VERSION_23
}
// Common repositories
repositories {
mavenCentral()
maven { url = uri("https://maven.pkg.github.com/IstiN/dmtools") }
}
// Common encoding
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
// Common test configuration
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
exceptionFormat "full"
}
finalizedBy jacocoTestReport
}
// Common JaCoCo configuration
jacocoTestReport {
reports {
xml.required.set(true)
html.required.set(true)
}
}
}
// Root project tasks
tasks.register('cleanAll') {
description = 'Cleans all subprojects'
group = 'build'
dependsOn subprojects.collect { it.tasks.named('clean') }
}
tasks.register('buildAll') {
description = 'Builds all subprojects'
group = 'build'
dependsOn subprojects.collect { it.tasks.named('build') }
}
tasks.register('testAll') {
description = 'Runs tests for all subprojects'
group = 'verification'
dependsOn subprojects.collect { it.tasks.named('test') }
}