@@ -18,6 +18,8 @@ plugins {
18
18
import io.franzbecker.gradle.lombok.LombokPlugin
19
19
import io.franzbecker.gradle.lombok.task.DelombokTask
20
20
21
+ rootProject. description = " Metadata root for the com.yubico:webauthn-server-* module family"
22
+
21
23
project. ext. isCiBuild = System . env. CI == ' true'
22
24
23
25
project. ext. publishEnabled = ! isCiBuild &&
@@ -276,6 +278,66 @@ subprojects { project ->
276
278
}
277
279
}
278
280
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
+
279
341
task pitestMerge (type : com.yubico.gradle.pitest.tasks.PitestMergeTask )
280
342
281
343
coveralls {
0 commit comments