forked from sonus21/rqueue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
172 lines (144 loc) · 5.79 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
plugins {
id "jacoco"
id "com.github.kt3k.coveralls" version "2.12.0"
id "nebula.optional-base" version "7.0.0"
id "com.adarshr.test-logger" version "3.2.0"
id "org.gradle.test-retry" version "1.5.0"
}
allprojects {
apply plugin: "idea"
apply plugin: "java-library"
apply plugin: "maven-publish"
apply plugin: "signing"
apply plugin: "jacoco"
apply plugin: "nebula.optional-base"
apply plugin: "com.adarshr.test-logger"
apply plugin: "org.gradle.test-retry"
sourceCompatibility = 17
targetCompatibility = 17
repositories {
mavenCentral()
}
}
ext {
springBootVersion = "3.0.1"
springVersion = "6.0.3"
springDataVersion = "3.0.0"
microMeterVersion = "1.10.2"
// logging dependencies
lombokVersion = "1.18.24"
logbackVersion = "1.4.5"
sl4jVersion = "2.0.6"
// testing
jupiterVersion = "5.5.0"
mockitoVersion = "3.5.0"
hamcrestVersion = "2.2"
jacocoVersion = "0.8.8"
embeddedRedisVersion = "0.7.2"
h2Version = "2.1.214"
tomcatVersion = "10.1.4"
// utility
lang3Version = "3.9"
jacksonVersion = "2.14.1"
// server
jakartaServletVersion = "6.0.0"
pebbleVersion = "3.2.0"
// database
lettuceVersion = "6.2.2.RELEASE"
jakartaAnnotationVersion = "2.1.0"
jakartaPersistenceVersion = "3.1.0"
hibernateCoreVersion = "5.6.14.Final"
// other dependencies
jakartaValidationApiVersion = "3.0.2"
serucoEncodingVersion = "0.1.3"
apacheCommonCollectionVerion = "4.4"
hibernateValidatorVersion = "7.0.5.Final"
springDepManagementVersion = "1.1.0"
projectReactorReactorTestVersion = "3.5.1"
aspectjVersion = "1.9.19"
guavaVersion = "32.1.1-jre"
}
subprojects {
group = "com.github.sonus21"
version = "3.2.0-RELEASE"
dependencies {
// https://mvnrepository.com/artifact/org.springframework/spring-messaging
api "org.springframework:spring-messaging:${springVersion}"
// https://mvnrepository.com/artifact/org.springframework.data/spring-data-redis
api "org.springframework.data:spring-data-redis:${springDataVersion}"
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
implementation "org.apache.commons:commons-lang3:${lang3Version}"
// https://mvnrepository.com/artifact/com.google.guava/guava
implementation "com.google.guava:guava:${guavaVersion}"
compileOnly "org.projectlombok:lombok:${lombokVersion}"
annotationProcessor "org.projectlombok:lombok:${lombokVersion}"
testCompileOnly "org.projectlombok:lombok:${lombokVersion}"
testAnnotationProcessor "org.projectlombok:lombok:${lombokVersion}"
// https://mvnrepository.com/artifact/ch.qos.logback/logback-core
testImplementation "ch.qos.logback:logback-core:${logbackVersion}"
// https://mvnrepository.com/artifact/ch.qos.logback/logback-classic
testImplementation "ch.qos.logback:logback-classic:${logbackVersion}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${jupiterVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-api:${jupiterVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-params:${jupiterVersion}"
// https://mvnrepository.com/artifact/org.mockito/mockito-inline
testImplementation "org.mockito:mockito-inline:${mockitoVersion}"
testImplementation "org.mockito:mockito-junit-jupiter:${mockitoVersion}"
// https://mvnrepository.com/artifact/org.hamcrest/hamcrest
testImplementation "org.hamcrest:hamcrest:${hamcrestVersion}"
testImplementation "org.springframework.boot:spring-boot-test:${springBootVersion}"
testImplementation "org.junit-pioneer:junit-pioneer:0.9.0"
configurations {
all*.exclude module: "spring-boot-starter-logging"
all*.exclude module: "junit"
}
}
}
def publishedProjects = subprojects.findAll({ subproject ->
subproject.pluginManager.hasPlugin("java") && !subproject.name.endsWith("example") && !subproject.name.contains("test")
})
task codeCoverageReport(type: JacocoReport, group: "verification", description: "Generate code coverage report") {
executionData fileTree(project.rootDir.absolutePath).include("**/build/reports/jacoco/*.exec")
publishedProjects.each {
sourceSets it.sourceSets.main
}
reports {
csv.enabled = false
html.enabled = System.getenv("CIRCLECI") != "true"
xml.enabled = System.getenv("CIRCLECI") == "true"
xml.destination = file("${buildDir}/reports/jacoco/test/jacocoTestReport.xml")
}
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it,
exclude: [
"com/github/sonus21/rqueue/exception",
"com/github/sonus21/rqueue/models/response",
"com/github/sonus21/rqueue/core/RqueueMessageSender*",
"com/github/sonus21/rqueue/utils/PrefixLogger*",
"com/github/sonus21/rqueue/utils/StackTraceUtil*",
"com/github/sonus21/rqueue/core/ScheduledTaskDetail*",
]
)
}))
}
dependsOn(subprojects*.test)
doLast {}
test.useTestNG()
}
jacoco {
toolVersion = "${jacocoVersion}"
}
clean.doLast {
subprojects.findAll({ subproject ->
def _files = file(subproject.name + "/log").listFiles()
if (_files != null) {
delete _files
}
})
}
coveralls {
description = "Uploads the aggregated coverage report to Coveralls"
sourceDirs = publishedProjects.sourceSets.main.allSource.srcDirs.flatten()
jacocoReportPath "${buildDir}/reports/jacoco/test/jacocoTestReport.xml"
}