Skip to content

Commit

Permalink
Publish root project as dependency platform
Browse files Browse the repository at this point in the history
  • Loading branch information
emlun committed Apr 20, 2021
1 parent a13daee commit d329b8e
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ plugins {
import io.franzbecker.gradle.lombok.LombokPlugin
import io.franzbecker.gradle.lombok.task.DelombokTask

rootProject.description = "Metadata root for the com.yubico:webauthn-server-* module family"

project.ext.isCiBuild = System.env.CI == 'true'

project.ext.publishEnabled = !isCiBuild &&
Expand Down Expand Up @@ -276,6 +278,66 @@ subprojects { project ->
}
}

// The root project has no sources, but the dependency platform also needs to be published as an artifact
// See https://docs.gradle.org/current/userguide/java_platform_plugin.html
// See https://github.com/Yubico/java-webauthn-server/issues/93#issuecomment-822806951
if (publishEnabled) {
apply plugin: 'maven-publish'
apply plugin: 'signing'

publishing {
publications {
jars(MavenPublication) {
from components.javaPlatform

pom {
name = project.name
description = project.description
url = 'https://developers.yubico.com/java-webauthn-server/'

developers {
developer {
id = 'emil'
name = 'Emil Lundberg'
email = '[email protected]'
}
}

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://[email protected]/Yubico/java-webauthn-server.git'
tag = 'HEAD'
}
}
}
}

repositories {
maven {
name = "sonatypeNexus"
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username ossrhUsername
password ossrhPassword
}
}
}
}

signing {
useGpgCmd()
sign publishing.publications.jars
}
}

task pitestMerge(type: com.yubico.gradle.pitest.tasks.PitestMergeTask)

coveralls {
Expand Down

0 comments on commit d329b8e

Please sign in to comment.