@@ -7,34 +7,37 @@ package kotlinx.validation.build
77
88import org.gradle.api.*
99import org.gradle.api.file.*
10+ import org.gradle.api.publish.*
1011import org.gradle.api.publish.maven.*
1112import org.gradle.jvm.tasks.*
1213import org.gradle.kotlin.dsl.*
1314
14- fun MavenPublication.mavenCentralMetadata () {
15- pom {
16- if (! name.isPresent) {
17- name.set(artifactId)
18- }
19- description.set(" Kotlin binary public API management tool" )
20- url.set(" https://github.com/Kotlin/binary-compatibility-validator" )
21- licenses {
22- license {
23- name.set(" The Apache Software License, Version 2.0" )
24- url.set(" https://www.apache.org/licenses/LICENSE-2.0.txt" )
25- distribution.set(" repo" )
26- }
27- }
28- developers {
29- developer {
30- id.set(" JetBrains" )
31- name.set(" JetBrains Team" )
32- organization.set(" JetBrains" )
33- organizationUrl.set(" https://www.jetbrains.com" )
15+ fun PublishingExtension.mavenCentralMetadata () {
16+ publications.withType(MavenPublication ::class ) {
17+ pom {
18+ if (! name.isPresent) {
19+ name.set(artifactId)
3420 }
35- }
36- scm {
21+ description.set(" Kotlin binary public API management tool" )
3722 url.set(" https://github.com/Kotlin/binary-compatibility-validator" )
23+ licenses {
24+ license {
25+ name.set(" The Apache Software License, Version 2.0" )
26+ url.set(" https://www.apache.org/licenses/LICENSE-2.0.txt" )
27+ distribution.set(" repo" )
28+ }
29+ }
30+ developers {
31+ developer {
32+ id.set(" JetBrains" )
33+ name.set(" JetBrains Team" )
34+ organization.set(" JetBrains" )
35+ organizationUrl.set(" https://www.jetbrains.com" )
36+ }
37+ }
38+ scm {
39+ url.set(" https://github.com/Kotlin/binary-compatibility-validator" )
40+ }
3841 }
3942 }
4043}
0 commit comments