-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathbuild.gradle
191 lines (159 loc) · 5.78 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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
plugins {
id "java"
id "jacoco"
id "io.spring.dependency-management" version "1.0.11.RELEASE"
id "org.sonarqube" version "3.1.1"
id 'info.solidsoft.pitest' version '1.6.0'
}
apply plugin: "java-library"
apply plugin: "maven"
apply plugin: "signing"
ext {
springBootVersion = '2.4.5'
}
sourceCompatibility = '1.8'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
sourceSets {
testIntegration {
java {
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
srcDir file('src/testIntegration/java')
}
}
}
configurations {
testIntegrationImplementation.extendsFrom implementation, testImplementation
testIntegrationRuntime.extendsFrom runtimeOnly
}
repositories {
mavenCentral()
}
group = "com.github.mikesafonov"
version "1.4.0"
jar {
enabled = true
}
dependencyManagement {
imports { mavenBom("org.springframework.boot:spring-boot-dependencies:${springBootVersion}") }
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter")
api("org.restcomm.smpp:ch-commons-util:7.0.6")
api("org.restcomm.smpp:ch-commons-charset:7.0.6")
api("org.restcomm.smpp:ch-commons-gsm:7.0.6")
api("org.restcomm.smpp:ch-smpp:5.1.0-113")
implementation("javax.validation:validation-api:2.0.1.Final")
compileOnly("org.projectlombok:lombok:1.18.18")
annotationProcessor("org.projectlombok:lombok:1.18.18")
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
testCompileOnly("org.projectlombok:lombok:1.18.18")
testAnnotationProcessor("org.projectlombok:lombok:1.18.18")
testImplementation("org.assertj:assertj-core:3.19.0")
testImplementation("com.devskiller:jfairy:0.6.4")
testImplementation('org.springframework.boot:spring-boot-starter-test')
testIntegrationImplementation platform("org.springframework.cloud:spring-cloud-dependencies:2020.0.2")
testIntegrationImplementation("org.springframework.cloud:spring-cloud-starter")
testIntegrationImplementation("org.springframework.cloud:spring-cloud-starter-bootstrap")
testIntegrationImplementation("org.awaitility:awaitility:4.0.3")
testIntegrationImplementation("com.github.mikesafonov:smpp-server-mock-assertj:1.5.0")
testIntegrationImplementation("com.github.mikesafonov:smpp-server-mock-junit:1.5.0")
testIntegrationImplementation("com.github.mikesafonov:smpp-server-mock-spring-boot:1.5.0")
testIntegrationCompileOnly("org.projectlombok:lombok:1.18.10")
testIntegrationAnnotationProcessor("org.projectlombok:lombok:1.18.10")
testIntegrationImplementation('org.springframework.boot:spring-boot-starter-test')
}
task sourceJar(type: Jar) {
classifier "sources"
from sourceSets.main.allJava
}
javadoc {
options.encoding = 'UTF-8'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier "javadoc"
from javadoc.destinationDir
}
artifacts {
archives sourceJar
archives javadocJar
}
signing {
sign configurations.archives
}
jacoco{
toolVersion = "0.8.3"
}
jacocoTestReport{
reports {
xml.enabled = true
csv.enabled = false
}
}
test {
useJUnitPlatform()
finalizedBy jacocoTestReport
}
task testIntegration(type: Test){
useJUnitPlatform()
testClassesDirs = sourceSets.testIntegration.output.classesDirs
classpath = sourceSets.testIntegration.runtimeClasspath
}
pitest {
junit5PluginVersion = '0.12'
targetClasses = ['com.github.mikesafonov.smpp.*']
excludedClasses = ['com.github.mikesafonov.smpp.config.SmppAutoConfiguration']
threads = 4
outputFormats = ['HTML', 'XML']
enableDefaultIncrementalAnalysis = true
timestampedReports = false
historyInputLocation = ".pitest/pitHistory.txt"
historyOutputLocation = ".pitest/pitHistory.txt"
}
// Build, sign, and upload
uploadArchives {
repositories {
mavenDeployer {
// Sign POM
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
// Destination
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2") {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
// Add required metadata to POM
pom.project {
name "spring-boot-starter-smpp"
packaging "jar"
description "Spring Boot starter for building specifications in declarative way"
url "https://github.com/MikeSafonov/spring-boot-starter-smpp"
organization {
name "com.github.mikesafonov"
url "https://github.com/MikeSafonov"
}
issueManagement {
system "GitHub"
url "https://github.com/MikeSafonov/spring-boot-starter-smpp/issues"
}
licenses {
license {
name "MIT"
url "https://github.com/MikeSafonov/spring-boot-starter-smpp/blob/master/LICENSE"
distribution "repo"
}
}
scm {
url "https://github.com/MikeSafonov/spring-boot-starter-smpp"
connection "scm:git:git://github.com/MikeSafonov/spring-boot-starter-smpp.git"
developerConnection "scm:git:ssh://git@github.com:MikeSafonov/spring-boot-starter-smpp.git"
}
developers {
developer {
name "Mike Safonov"
organization "com.github.mikesafonov"
organizationUrl "https://github.com/MikeSafonov"
}
}
}
}
}
}