-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
135 lines (118 loc) · 3.27 KB
/
build.gradle.kts
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
buildscript {
if (gradle.includedBuilds.any { it.name == "plugins" }) {
plugins {
id("com.hivemq.version-updater")
}
}
}
plugins {
`java-library`
`maven-publish`
signing
alias(libs.plugins.nexusPublish)
alias(libs.plugins.defaults)
alias(libs.plugins.metadata)
alias(libs.plugins.javadocLinks)
alias(libs.plugins.license)
}
plugins.withId("com.hivemq.version-updater") {
project.ext["versionUpdaterFiles"] = arrayOf("README.adoc")
}
group = "com.hivemq"
description = "SDK for the development of HiveMQ Google Cloud Pub/Sub Extension customizations"
metadata {
readableName = "HiveMQ Google Cloud Pub/Sub Extension Customization SDK"
organization {
name = "HiveMQ GmbH"
url = "https://www.hivemq.com/"
}
license {
apache2()
}
developers {
register("hurtadosanti") {
fullName = "Santiago Hurtado"
email = "[email protected]"
}
register("Donnerbart") {
fullName = "David Sondermann"
email = "[email protected]"
}
register("YannickWeber") {
fullName = "Yannick Weber"
email = "[email protected]"
}
register("Florian-Limpoeck") {
fullName = "Florian Limpöck"
email = "[email protected]"
}
register("mario-schwede-hivemq") {
fullName = "Mario Schwede"
email = "[email protected]"
}
}
github {
issues()
}
}
repositories {
mavenCentral()
}
dependencies {
api("com.hivemq:hivemq-extension-sdk:$version")
api(libs.slf4j.api)
}
/* ******************** java ******************** */
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
withJavadocJar()
withSourcesJar()
}
tasks.withType<Jar>().configureEach {
manifest.attributes(
"Implementation-Title" to project.name,
"Implementation-Vendor" to metadata.organization.provider.flatMap { it.name },
"Implementation-Version" to provider { project.version.toString() },
)
}
tasks.javadoc {
title = "${metadata.readableName.get()} ${project.version} API"
doLast { // javadoc search fix for jdk 11 https://bugs.openjdk.java.net/browse/JDK-8215291
copy {
from(destinationDir!!.resolve("search.js"))
into(temporaryDir)
filter { line -> line.replace("if (ui.item.p == item.l) {", "if (item.m && ui.item.p == item.l) {") }
}
delete(destinationDir!!.resolve("search.js"))
copy {
from(temporaryDir.resolve("search.js"))
into(destinationDir!!)
}
}
}
/* ******************** publishing ******************** */
publishing {
publications {
register<MavenPublication>("maven") {
from(components["java"])
}
}
}
signing {
val signingKey: String? by project
val signingPassword: String? by project
useInMemoryPgpKeys(signingKey, signingPassword)
sign(publishing.publications["maven"])
}
nexusPublishing {
repositories {
sonatype()
}
}
/* ******************** checks ******************** */
license {
header = file("HEADER")
mapping("java", "SLASHSTAR_STYLE")
}