You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* From https://github.com/arrow-kt/arrow-gradle-config/blob/main/arrow-gradle-config-publish/src/main/kotlin/internal/PublishMppRootModuleInPlatform.kt
14
13
*/
15
-
fun Project.publishPlatformArtifactsInRootModule() = afterEvaluate {
14
+
fun Project.publishPlatformArtifactsInRootModule(group:String, version:String) = afterEvaluate {
16
15
if (kotlinExtension !isKotlinMultiplatformExtension) {
17
16
return@afterEvaluate
18
17
}
19
-
val platformPublication = extensions.getByType(PublishingExtension::class.java)
20
-
.publications
21
-
.findByName("jvm") asMavenPublication?
22
18
23
-
if (platformPublication ==null) {
24
-
return@afterEvaluate
25
-
}
19
+
val publication = extensions
20
+
.findByType(PublishingExtension::class.java)
21
+
?.publications
22
+
?.getByName("kotlinMultiplatform")
23
+
?.let { it asMavenPublication }
26
24
27
-
lateinitvar platformXml:XmlProvider
28
-
platformPublication.pom?.withXml { platformXml = it }
29
-
30
-
extensions
31
-
.findByType(PublishingExtension::class.java)
32
-
?.publications
33
-
?.getByName("kotlinMultiplatform")
34
-
?.let { it asMavenPublication }
35
-
?.run {
36
-
// replace pom
37
-
pom.withXml {
38
-
val xmlProvider = it
39
-
val root = xmlProvider.asNode()
40
-
// Remove the original content and add the content from the platform POM:
0 commit comments