Skip to content

Commit

Permalink
build > update metadata plugin to 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtSilvio committed Mar 8, 2021
1 parent d888788 commit 9f10048
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 36 deletions.
72 changes: 37 additions & 35 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,44 +17,44 @@ group = "com.hivemq"
description = "SDK for the development of HiveMQ extensions"

metadata {
readableName = "HiveMQ Extension SDK"
readableName.set("HiveMQ Extension SDK")
organization {
name = "HiveMQ GmbH"
url = "https://www.hivemq.com/"
name.set("HiveMQ GmbH")
url.set("https://www.hivemq.com/")
}
license {
apache2()
}
developers {
developer {
id = "cschaebe"
name = "Christoph Schaebel"
email = "[email protected]"
id.set("cschaebe")
name.set("Christoph Schaebel")
email.set("[email protected]")
}
developer {
id = "lbrandl"
name = "Lukas Brandl"
email = "[email protected]"
id.set("lbrandl")
name.set("Lukas Brandl")
email.set("[email protected]")
}
developer {
id = "flimpoeck"
name = "Florian Limpoeck"
email = "[email protected]"
id.set("flimpoeck")
name.set("Florian Limpoeck")
email.set("[email protected]")
}
developer {
id = "sauroter"
name = "Georg Held"
email = "[email protected]"
id.set("sauroter")
name.set("Georg Held")
email.set("[email protected]")
}
developer {
id = "SgtSilvio"
name = "Silvio Giebl"
email = "[email protected]"
id.set("SgtSilvio")
name.set("Silvio Giebl")
email.set("[email protected]")
}
}
github {
org = "hivemq"
repo = "hivemq-extension-sdk"
org.set("hivemq")
repo.set("hivemq-extension-sdk")
issues()
}
}
Expand Down Expand Up @@ -85,39 +85,41 @@ java {
tasks.withType<Jar>().configureEach {
manifest.attributes(
"Implementation-Title" to project.name,
"Implementation-Vendor" to metadata.organization.name,
"Implementation-Vendor" to metadata.organization!!.name.get(),
"Implementation-Version" to project.version)
}

tasks.javadoc {
title = "${metadata.readableName} ${project.version} API"
title = "${metadata.readableName.get()} ${project.version} API"

doLast {
javaexec {
main = "-jar"
args("${projectDir}/gradle/tools/javadoc-cleaner-1.0.jar")
args("$projectDir/gradle/tools/javadoc-cleaner-1.0.jar")
}
}

doLast { // javadoc search fix for jdk 11 https://bugs.openjdk.java.net/browse/JDK-8215291
copy {
from("${buildDir}/docs/javadoc/search.js")
into("${buildDir}/tmp/javadoc/")
from("$buildDir/docs/javadoc/search.js")
into("$buildDir/tmp/javadoc/")
filter { line -> line.replace("if (ui.item.p == item.l) {", "if (item.m && ui.item.p == item.l) {") }
}
delete("${buildDir}/docs/javadoc/search.js")
delete("$buildDir/docs/javadoc/search.js")
copy {
from("${buildDir}/tmp/javadoc/search.js")
into("${buildDir}/docs/javadoc/")
from("$buildDir/tmp/javadoc/search.js")
into("$buildDir/docs/javadoc/")
}
}
}


/* ******************** publishing ******************** */

publishing.publications.register<MavenPublication>("extensionSdk") {
from(components["java"])
publishing {
publications.register<MavenPublication>("extensionSdk") {
from(components["java"])
}
}

bintray {
Expand All @@ -131,10 +133,10 @@ bintray {
repo = "HiveMQ"
name = "hivemq-extension-sdk"
desc = project.description
websiteUrl = metadata.url
issueTrackerUrl = metadata.issueManagement.url
vcsUrl = metadata.scm.url
setLicenses(metadata.license.shortName)
websiteUrl = metadata.url.get()
issueTrackerUrl = metadata.issueManagement!!.url.get()
vcsUrl = metadata.scm!!.url.get()
setLicenses(metadata.license!!.shortName.get())
setLabels("hivemq", "extension", "sdk", "mqtt", "mqtt5")
publicDownloadNumbers = false
version.apply {
Expand All @@ -159,6 +161,6 @@ afterEvaluate {
/* ******************** checks ******************** */

license {
header = file("${projectDir}/HEADER")
header = file("$projectDir/HEADER")
mapping("java", "SLASHSTAR_STYLE")
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ slf4j.version=1.7.30
plugin.license.version=0.15.0
plugin.bintray.version=1.8.5
plugin.utf8.version=0.1.0
plugin.metadata.version=0.1.2
plugin.metadata.version=0.2.0
plugin.javadoc-links.version=0.3.0

0 comments on commit 9f10048

Please sign in to comment.