From ca01bca31e7e645fe9992cf385c627d4ad2d179d Mon Sep 17 00:00:00 2001 From: Emil Lundberg Date: Fri, 14 Apr 2023 15:45:45 +0200 Subject: [PATCH] Fix missing project description in publication POMs --- .../groovy/project-convention-publish.gradle | 65 ++++++++++--------- 1 file changed, 34 insertions(+), 31 deletions(-) diff --git a/buildSrc/src/main/groovy/project-convention-publish.gradle b/buildSrc/src/main/groovy/project-convention-publish.gradle index c63edb225..6623e509c 100644 --- a/buildSrc/src/main/groovy/project-convention-publish.gradle +++ b/buildSrc/src/main/groovy/project-convention-publish.gradle @@ -9,45 +9,48 @@ project.tasks.withType(Sign.class) { it.dependsOn(check) } -publishing { - publications { - jars(MavenPublication.class) { - project.components.forEach { - from(it) - } - - pom { - name = project.name - description = project.description - url = "https://developers.yubico.com/java-webauthn-server/" +// afterEvaluate needed for project.description to be set when this evaluates +project.afterEvaluate { + publishing { + publications { + jars(MavenPublication.class) { + project.components.forEach { + from(it) + } - developers { - developer { - id = "emil" - name = "Emil Lundberg" - email = "emil@yubico.com" + pom { + name = project.name + description = project.description + url = "https://developers.yubico.com/java-webauthn-server/" + + developers { + developer { + id = "emil" + name = "Emil Lundberg" + email = "emil@yubico.com" + } } - } - licenses { - license { - name = "BSD-license" - comments = "Revised 2-clause BSD license" + licenses { + license { + name = "BSD-license" + comments = "Revised 2-clause BSD license" + } } - } - scm { - url = "scm:git:git://github.com/Yubico/java-webauthn-server.git" - connection = "scm:git:git://github.com/Yubico/java-webauthn-server.git" - developerConnection = "scm:git:ssh://git@github.com/Yubico/java-webauthn-server.git" - tag = "HEAD" + scm { + url = "scm:git:git://github.com/Yubico/java-webauthn-server.git" + connection = "scm:git:git://github.com/Yubico/java-webauthn-server.git" + developerConnection = "scm:git:ssh://git@github.com/Yubico/java-webauthn-server.git" + tag = "HEAD" + } } } } } -} -signing { - useGpgCmd() - sign(publishing.publications.jars) + signing { + useGpgCmd() + sign(publishing.publications.jars) + } }