forked from sonus21/rqueue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
168 lines (140 loc) · 5.93 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
plugins {
id 'jacoco'
id 'com.github.kt3k.coveralls' version '2.6.3'
id 'nebula.optional-base' version '5.0.2'
id "com.adarshr.test-logger" version "2.1.1"
}
allprojects {
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'jacoco'
apply plugin: 'nebula.optional-base'
apply plugin: 'com.adarshr.test-logger'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
}
ext {
springBootVersion = System.getenv("SPRING_BOOT_VERSION")
springVersion = System.getenv("SPRING_VERSION")
springDataVersion = System.getenv("SPRING_DATA_VERSION")
microMeterVersion = System.getenv("MICROMETER_VERSION")
// springBootVersion = '2.0.6.RELEASE'
// springVersion = '5.0.10.RELEASE'
// springDataVersion = '2.0.6.RELEASE'
// microMeterVersion = '1.1.0'
// logging dependencies
lombokVersion = '1.18.10'
logbackVersion = '1.2.3'
sl4jVersion = '1.7.28'
// testing
jupiterVersion = '5.5.0'
mockitoVersion = '3.5.0'
hamcrestVersion = '2.2'
jacocoVersion = '0.8.4'
embeddedRedisVersion = '0.7.2'
h2Version = '1.4.194'
tomcatVersion = '8.0.47'
// utility
lang3Version = '3.9'
jacksonVersion = '2.10.0'
// server
javaxServletVersion = '4.0.1'
pebbleVersion = '3.1.5'
// database
lettuceVersion = '5.0.2.RELEASE'
javaxAnnotationVersion = '1.3.2'
jpaVersion = '2.2'
hibernateVersion = '5.4.9.Final'
// other dependencies
javaxValidationApiVersion = '2.0.1.Final'
guavaVersion = '30.1-jre'
}
subprojects {
group = 'com.github.sonus21'
version = '2.10.1-RELEASE'
dependencies {
// https://mvnrepository.com/artifact/org.springframework/spring-messaging
compile group: 'org.springframework', name: 'spring-messaging', version: "${springVersion}"
// https://mvnrepository.com/artifact/org.springframework.data/spring-data-redis
compile group: 'org.springframework.data', name: 'spring-data-redis', version: "${springDataVersion}"
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
compile group: 'org.apache.commons', name: 'commons-lang3', version: "${lang3Version}"
// https://mvnrepository.com/artifact/com.google.guava/guava
compile group: 'com.google.guava', name: 'guava', version: "${guavaVersion}"
compileOnly "org.projectlombok:lombok:${lombokVersion}"
annotationProcessor "org.projectlombok:lombok:${lombokVersion}"
testCompile "org.projectlombok:lombok:${lombokVersion}"
testAnnotationProcessor "org.projectlombok:lombok:${lombokVersion}"
// https://mvnrepository.com/artifact/ch.qos.logback/logback-core
testCompile group: 'ch.qos.logback', name: 'logback-core', version: "${logbackVersion}"
// https://mvnrepository.com/artifact/ch.qos.logback/logback-classic
testCompile group: 'ch.qos.logback', name: 'logback-classic', version: "${logbackVersion}"
testRuntime group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: "${jupiterVersion}"
testCompile group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: "${jupiterVersion}"
testCompile group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: "${jupiterVersion}"
// https://mvnrepository.com/artifact/org.mockito/mockito-inline
testCompile group: 'org.mockito', name: 'mockito-inline', version: "${mockitoVersion}"
testCompile group: 'org.mockito', name: 'mockito-junit-jupiter', version: "${mockitoVersion}"
// https://mvnrepository.com/artifact/org.hamcrest/hamcrest
testCompile group: 'org.hamcrest', name: 'hamcrest', version: "${hamcrestVersion}"
testCompile("org.springframework.boot:spring-boot-test:${springBootVersion}")
testCompile group: 'org.junit-pioneer', name: 'junit-pioneer', version: '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/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"
}