Skip to content

Commit

Permalink
build: fix conditional deploys
Browse files Browse the repository at this point in the history
  • Loading branch information
silenium-dev committed Oct 14, 2024
1 parent 07dc931 commit 4cb99c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,10 @@ allprojects {

publishing {
publications {
create<MavenPublication>("main") {
from(components["java"])
if (deployKotlin) {
create<MavenPublication>("main") {
from(components["java"])
}
}
}
}
Expand Down
8 changes: 5 additions & 3 deletions native/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,11 @@ kotlin {

publishing {
publications {
create<MavenPublication>("natives${platform.capitalized}") {
from(components["java"])
artifactId = "$libName-natives-$platform"
if (deployNative) {
create<MavenPublication>("natives${platform.capitalized}") {
from(components["java"])
artifactId = "$libName-natives-$platform"
}
}
}
}

0 comments on commit 4cb99c2

Please sign in to comment.