@@ -7,34 +7,37 @@ package kotlinx.validation.build
7
7
8
8
import org.gradle.api.*
9
9
import org.gradle.api.file.*
10
+ import org.gradle.api.publish.*
10
11
import org.gradle.api.publish.maven.*
11
12
import org.gradle.jvm.tasks.*
12
13
import org.gradle.kotlin.dsl.*
13
14
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)
34
20
}
35
- }
36
- scm {
21
+ description.set(" Kotlin binary public API management tool" )
37
22
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
+ }
38
41
}
39
42
}
40
43
}
0 commit comments