Skip to content

Commit

Permalink
one more fix
Browse files Browse the repository at this point in the history
  • Loading branch information
morisil committed Jan 13, 2025
1 parent 770ac2d commit f7c1f9d
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
import org.jetbrains.kotlin.gradle.swiftexport.ExperimentalSwiftExportDsl
import org.jetbrains.kotlin.gradle.targets.js.testing.KotlinJsTest
import org.jetbrains.kotlin.gradle.targets.jvm.KotlinJvmTarget
Expand Down Expand Up @@ -298,7 +299,11 @@ if (isReleaseBuild) {

kotlin.targets.forEach { target ->
if (target !is KotlinJvmTarget) {
val nonJarArtifactId = "${name}-${target.name.lowercase()}"
val nonJarArtifactId = if (target.platformType == KotlinPlatformType.wasm) {
"${name}-wasm-${target.name.lowercase().substringAfter("wasm")}"
} else {
"${name}-${target.name.lowercase()}"
}
artifactOverride {
artifactId = nonJarArtifactId
jar.set(false)
Expand Down Expand Up @@ -374,13 +379,16 @@ fun MavenPom.setUpPomDetails() {
}
}


tasks.register("listArtifacts") {
doLast {
kotlin.targets.forEach { target ->
if (target !is KotlinJvmTarget) {
val name = "${project.name}-${target.name.lowercase()}-${version}"
println(name)
val nonJarArtifactId = if (target.platformType == KotlinPlatformType.wasm) {
"${name}-wasm-${target.name.lowercase().substringAfter("wasm")}"
} else {
"${name}-${target.name.lowercase()}"
}
println(nonJarArtifactId)
}
}
}
Expand Down

0 comments on commit f7c1f9d

Please sign in to comment.