Skip to content

Commit d329b8e

Browse files
committed
Publish root project as dependency platform
1 parent a13daee commit d329b8e

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

build.gradle

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ plugins {
1818
import io.franzbecker.gradle.lombok.LombokPlugin
1919
import io.franzbecker.gradle.lombok.task.DelombokTask
2020

21+
rootProject.description = "Metadata root for the com.yubico:webauthn-server-* module family"
22+
2123
project.ext.isCiBuild = System.env.CI == 'true'
2224

2325
project.ext.publishEnabled = !isCiBuild &&
@@ -276,6 +278,66 @@ subprojects { project ->
276278
}
277279
}
278280

281+
// The root project has no sources, but the dependency platform also needs to be published as an artifact
282+
// See https://docs.gradle.org/current/userguide/java_platform_plugin.html
283+
// See https://github.com/Yubico/java-webauthn-server/issues/93#issuecomment-822806951
284+
if (publishEnabled) {
285+
apply plugin: 'maven-publish'
286+
apply plugin: 'signing'
287+
288+
publishing {
289+
publications {
290+
jars(MavenPublication) {
291+
from components.javaPlatform
292+
293+
pom {
294+
name = project.name
295+
description = project.description
296+
url = 'https://developers.yubico.com/java-webauthn-server/'
297+
298+
developers {
299+
developer {
300+
id = 'emil'
301+
name = 'Emil Lundberg'
302+
303+
}
304+
}
305+
306+
licenses {
307+
license {
308+
name = 'BSD-license'
309+
comments = 'Revised 2-clause BSD license'
310+
}
311+
}
312+
313+
scm {
314+
url = 'scm:git:git://github.com/Yubico/java-webauthn-server.git'
315+
connection = 'scm:git:git://github.com/Yubico/java-webauthn-server.git'
316+
developerConnection = 'scm:git:ssh://[email protected]/Yubico/java-webauthn-server.git'
317+
tag = 'HEAD'
318+
}
319+
}
320+
}
321+
}
322+
323+
repositories {
324+
maven {
325+
name = "sonatypeNexus"
326+
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
327+
credentials {
328+
username ossrhUsername
329+
password ossrhPassword
330+
}
331+
}
332+
}
333+
}
334+
335+
signing {
336+
useGpgCmd()
337+
sign publishing.publications.jars
338+
}
339+
}
340+
279341
task pitestMerge(type: com.yubico.gradle.pitest.tasks.PitestMergeTask)
280342

281343
coveralls {

0 commit comments

Comments
 (0)