-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
182 lines (152 loc) · 5.52 KB
/
build.gradle.kts
File metadata and controls
182 lines (152 loc) · 5.52 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
173
174
175
176
177
178
179
180
181
182
import com.vanniktech.maven.publish.JavaLibrary
import com.vanniktech.maven.publish.JavadocJar
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
group = "cz.smarteon"
scmVersion {
tag {
prefix.set("")
versionSeparator.set("")
}
}
project.version = scmVersion.version
plugins {
`java-library`
jacoco
id("pl.allegro.tech.build.axion-release") version "1.18.18"
id("com.vanniktech.maven.publish") version "0.34.0"
id("ru.vyarus.quality") version "6.0.1"
kotlin("jvm") version "2.2.20"
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
// javadoc and sources configured in publishing plugin
}
repositories {
mavenCentral()
}
dependencies {
implementation("org.java-websocket:Java-WebSocket:1.5.2")
val jacksonVersion = "2.19.0"
implementation("com.fasterxml.jackson.core:jackson-core:$jacksonVersion")
implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
implementation("com.fasterxml.jackson.core:jackson-annotations:$jacksonVersion")
implementation("com.sun.xml.bind:jaxb-impl:3.0.2")
val slf4jVersion = "1.7.32"
implementation("org.slf4j:slf4j-api:$slf4jVersion")
compileOnly("org.jetbrains:annotations:22.0.0")
val lombokVersion = "1.18.24"
compileOnly("org.projectlombok:lombok:$lombokVersion")
annotationProcessor("org.projectlombok:lombok:$lombokVersion")
testCompileOnly("org.projectlombok:lombok:$lombokVersion")
testAnnotationProcessor("org.projectlombok:lombok:$lombokVersion")
testImplementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
val junitVersion = "5.8.2"
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitVersion")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitVersion")
testImplementation("org.junit.jupiter:junit-jupiter-params:$junitVersion")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
val striktVersion = "0.34.1"
testImplementation("io.strikt:strikt-core:$striktVersion")
testImplementation("io.strikt:strikt-jvm:$striktVersion")
testImplementation("io.mockk:mockk:1.12.2")
val jsonUnitVersion = "2.28.0"
testImplementation("net.javacrumbs.json-unit:json-unit:$jsonUnitVersion")
testImplementation("net.javacrumbs.json-unit:json-unit-core:$jsonUnitVersion")
testImplementation("nl.jqno.equalsverifier:equalsverifier:3.7.2")
testRuntimeOnly("org.slf4j:slf4j-simple:$slf4jVersion")
testImplementation("org.bouncycastle:bcprov-jdk15on:1.69")
val jadlerVersion = "1.3.1"
testImplementation("net.jadler:jadler-core:$jadlerVersion")
testImplementation("net.jadler:jadler-jdk:$jadlerVersion")
val ktorVersion = "2.0.3"
testImplementation("io.ktor:ktor-server-core:$ktorVersion")
testImplementation("io.ktor:ktor-server-netty:$ktorVersion")
testImplementation("io.ktor:ktor-server-websockets:$ktorVersion")
testImplementation("io.ktor:ktor-network:$ktorVersion")
testImplementation("io.ktor:ktor-server-content-negotiation:$ktorVersion")
testImplementation("io.ktor:ktor-serialization-jackson:$ktorVersion")
testImplementation("org.awaitility:awaitility-kotlin:4.1.1")
}
// see https://vanniktech.github.io/gradle-maven-publish-plugin/central/#secrets for how to set up credentials and signing
mavenPublishing {
publishToMavenCentral(automaticRelease = true)
signAllPublications()
configure(
JavaLibrary(
javadocJar = JavadocJar.Javadoc(),
sourcesJar = true,
)
)
coordinates(project.group.toString(), project.name, project.version.toString())
pom {
name = project.name
url = "https://github.com/Smarteon/loxone-java"
description = "Java implementation of the Loxone™ communication protocol (Web Socket)"
organization {
name = "Smarteon Systems s.r.o"
url = "https://smarteon.cz"
}
licenses {
license {
name = "3-Clause BSD License"
url = "https://opensource.org/licenses/BSD-3-Clause"
distribution = "repo"
}
}
developers {
developer {
name = "Jiří Mikulášek"
email = "[email protected]"
}
developer {
name = "Vojtěch Zavřel"
email = "[email protected]"
}
developer {
name = "Tomáš Knotek"
email = "[email protected]"
}
}
contributors {
contributor {
name = "Petr Žufan"
}
}
scm {
url = "[email protected]:Smarteon/loxone-java.git"
connection = "scm:git:[email protected]:Smarteon/loxone-java.git"
tag = project.version.toString()
}
}
}
quality {
strict = false
}
tasks {
withType<JacocoReport> {
reports {
xml.required.set(true)
html.required.set(true)
}
}
withType<Test> {
useJUnitPlatform()
jvmArgs(
"--add-opens",
"java.base/jdk.internal.misc=ALL-UNNAMED",
"-Dio.netty.tryReflectionSetAccessible=true"
)
}
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_11)
}
}
check {
dependsOn(jacocoTestReport)
}
}