-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
172 lines (150 loc) · 4.23 KB
/
build.gradle
File metadata and controls
172 lines (150 loc) · 4.23 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
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 'java-library'
id 'maven-publish'
id 'jacoco'
id 'org.jreleaser' version '1.18.0'
}
group = 'dev.pixelib'
version = project.hasProperty('version') ? project.property('version') : '0.0.0-LOCALBUILD-SNAPSHOT'
description = 'A STOMP client library built on top of OkHTTP'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
withSourcesJar()
withJavadocJar()
}
repositories {
mavenCentral()
}
dependencies {
// OkHTTP for WebSocket support
api 'com.squareup.okhttp3:okhttp:4.12.0'
// JSON support
api 'com.google.code.gson:gson:2.10.1'
// Logging
implementation 'org.slf4j:slf4j-api:2.0.9'
// Testing
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.1'
testImplementation 'org.mockito:mockito-core:5.7.0'
testImplementation 'org.mockito:mockito-junit-jupiter:5.7.0'
testImplementation 'org.assertj:assertj-core:3.24.2'
testImplementation 'com.squareup.okhttp3:mockwebserver:4.12.0'
testRuntimeOnly 'ch.qos.logback:logback-classic:1.4.14'
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
exceptionFormat "full"
}
finalizedBy jacocoTestReport
}
jacoco {
toolVersion = "0.8.11"
}
jacocoTestReport {
dependsOn test
reports {
xml.required = true
html.required = true
}
}
jacocoTestCoverageVerification {
dependsOn jacocoTestReport
violationRules {
rule {
limit {
minimum = 0.80
}
}
}
}
compileJava {
options.encoding = 'UTF-8'
options.compilerArgs.addAll([
'-Xlint:all',
'-Xlint:-serial',
'-Werror'
])
}
compileTestJava {
options.encoding = 'UTF-8'
}
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
options.encoding = 'UTF-8'
options.charSet = 'UTF-8'
options.author = true
options.version = true
options.use = true
options.windowTitle = "$project.name $project.version API"
options.docTitle = "$project.name $project.version API"
}
publishing {
publications {
maven(MavenPublication) {
from components.java
pom {
name = 'JStomp'
description = project.description
url = 'https://github.com/pixelib/JStomp'
inceptionYear = '2025'
licenses {
license {
name = 'Apache-2.0'
url = 'https://spdx.org/licenses/Apache-2.0.html'
}
}
developers {
developer {
id = 'duckelekuuk'
name = 'Duco'
url = 'https://github.com/duckelekuuk'
}
developer {
id = 'mindgamesnl'
name = 'Mats'
url = 'https://github.com/Mindgamesnl'
}
}
scm {
connection = 'scm:git:https://github.com/pixelib/JStomp.git'
developerConnection = 'scm:git:ssh://github.com/pixelib/JStomp.git'
url = 'https://github.com/pixelib/JStomp'
}
}
}
}
repositories {
maven {
url = layout.buildDirectory.dir('staging-deploy')
}
}
}
jreleaser {
signing {
active = 'ALWAYS'
armored = true
}
deploy {
maven {
nexus2 {
'maven-central' {
active = 'ALWAYS'
url = 'https://s01.oss.sonatype.org/service/local'
snapshotUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots'
closeRepository = true
releaseRepository = false
stagingRepository(layout.buildDirectory.dir('staging-deploy').get().asFile.absolutePath)
}
}
}
}
}
wrapper {
gradleVersion = '8.13'
distributionType = Wrapper.DistributionType.ALL
}