@@ -15,7 +15,7 @@ plugins {
15
15
}
16
16
17
17
group = " com.adamratzman"
18
- version = " 3.1.02 "
18
+ version = " 3.1.03 "
19
19
20
20
java {
21
21
withSourcesJar()
@@ -133,6 +133,16 @@ kotlin {
133
133
134
134
publishing {
135
135
publications {
136
+ val js by getting(MavenPublication ::class ) {
137
+ artifactId = " spotify-api-kotlin-js"
138
+ setupPom(" spotify-api-kotlin-js" )
139
+ }
140
+
141
+ val kotlinMultiplatform by getting(MavenPublication ::class ) {
142
+ artifactId = " spotify-api-kotlin-core"
143
+ setupPom(" spotify-api-kotlin-core" )
144
+ }
145
+
136
146
val jvm by getting(MavenPublication ::class ) {
137
147
artifactId = " spotify-api-kotlin"
138
148
artifact(tasks.getByName(" javadocJar" ))
@@ -145,31 +155,7 @@ publishing {
145
155
}
146
156
}
147
157
148
- pom {
149
- name.set(" spotify-api-kotlin" )
150
- description.set(" A Kotlin wrapper for the Spotify Web API." )
151
- url.set(" https://github.com/adamint/spotify-web-api-kotlin" )
152
- inceptionYear.set(" 2018" )
153
- scm {
154
- url.set(" https://github.com/adamint/spotify-web-api-kotlin" )
155
- connection.set(" scm:https://github.com/adamint/spotify-web-api-kotlin.git" )
156
- developerConnection.set(" scm:git://github.com/adamint/spotify-web-api-kotlin.git" )
157
- }
158
- licenses {
159
- license {
160
- name.set(" The Apache Software License, Version 2.0" )
161
- url.set(" http://www.apache.org/licenses/LICENSE-2.0.txt" )
162
- distribution.set(" repo" )
163
- }
164
- }
165
- developers {
166
- developer {
167
- id.set(" adamratzman" )
168
- name.set(" Adam Ratzman" )
169
-
170
- }
171
- }
172
- }
158
+ setupPom(" spotify-api-kotlin" )
173
159
}
174
160
}
175
161
repositories {
@@ -204,8 +190,7 @@ publishing {
204
190
205
191
signing {
206
192
if (System .getenv(" publishLocation" ) == " nexus" ) {
207
- sign(publishing.publications[" jvm" ])
208
- sign(publishing.publications[" js" ])
193
+ sign(publishing.publications)
209
194
}
210
195
}
211
196
@@ -318,4 +303,32 @@ tasks {
318
303
dependsOn.add(dokka)
319
304
dependsOn.add(" publishJvmPublicationToNexusRepository" )
320
305
}
306
+ }
307
+
308
+ fun MavenPublication.setupPom (publicationName : String ) {
309
+ pom {
310
+ name.set(publicationName)
311
+ description.set(" A Kotlin wrapper for the Spotify Web API." )
312
+ url.set(" https://github.com/adamint/spotify-web-api-kotlin" )
313
+ inceptionYear.set(" 2018" )
314
+ scm {
315
+ url.set(" https://github.com/adamint/spotify-web-api-kotlin" )
316
+ connection.set(" scm:https://github.com/adamint/spotify-web-api-kotlin.git" )
317
+ developerConnection.set(" scm:git://github.com/adamint/spotify-web-api-kotlin.git" )
318
+ }
319
+ licenses {
320
+ license {
321
+ name.set(" The Apache Software License, Version 2.0" )
322
+ url.set(" http://www.apache.org/licenses/LICENSE-2.0.txt" )
323
+ distribution.set(" repo" )
324
+ }
325
+ }
326
+ developers {
327
+ developer {
328
+ id.set(" adamratzman" )
329
+ name.set(" Adam Ratzman" )
330
+
331
+ }
332
+ }
333
+ }
321
334
}
0 commit comments