@@ -2,14 +2,9 @@ plugins {
22 `maven- publish`
33 signing
44 id(" dev.sigstore.sign" )
5+ id(" com.vanniktech.maven.publish" )
56}
67
7- val javadocJar by tasks.registering(Jar ::class ) {
8- archiveClassifier.set(" javadoc" )
9- }
10-
11- fun getExtraString (name : String ) = ext[name]?.toString()
12-
138/* *
149 * Create a service for collecting the coordinates of all artifacts that should be included in the bom.
1510 */
@@ -38,47 +33,30 @@ bomService.coordinates
3833 },
3934 )
4035
41- publishing {
36+ mavenPublishing {
37+ publishToMavenCentral(automaticRelease = true )
38+ signAllPublications()
4239
43- publications.withType<MavenPublication > {
44- // Stub javadoc.jar artifact
45- artifact(javadocJar)
40+ pom {
41+ name.set(" JSON schema validator" )
42+ description.set(" Multiplatform Kotlin implementation of JSON schema validator" )
43+ url.set(" https://github.com/OptimumCode/json-schema-validator" )
4644
47- pom {
48- name.set(" JSON schema validator" )
49- description.set(" Multiplatform Kotlin implementation of JSON schema validator" )
50- url.set(" https://github.com/OptimumCode/json-schema-validator" )
51-
52- licenses {
53- license {
54- name.set(" MIT" )
55- url.set(" https://opensource.org/licenses/MIT" )
56- }
57- }
58- developers {
59- developer {
60- id.set(" OptimumCode" )
61- name.set(" Oleg Smirnov" )
62- 63- }
45+ licenses {
46+ license {
47+ name.set(" MIT" )
48+ url.set(" https://opensource.org/licenses/MIT" )
6449 }
65- scm {
66- url.set(" https://github.com/OptimumCode/json-schema-validator" )
50+ }
51+ developers {
52+ developer {
53+ id.set(" OptimumCode" )
54+ name.set(" Oleg Smirnov" )
55+ 6756 }
6857 }
58+ scm {
59+ url.set(" https://github.com/OptimumCode/json-schema-validator" )
60+ }
6961 }
7062}
71-
72- // otherwise, the publication fails because some task uses sign output but do not declare that
73- tasks.withType<AbstractPublishToMaven > {
74- mustRunAfter(tasks.withType<Sign >())
75- }
76-
77- signing {
78- useInMemoryPgpKeys(
79- getExtraString(" signing.keyId" ),
80- getExtraString(" signing.keys" ),
81- getExtraString(" signing.password" ),
82- )
83- sign(publishing.publications)
84- }
0 commit comments