Skip to content

Commit

Permalink
Merge pull request #18 from icerockdev/develop
Browse files Browse the repository at this point in the history
hotfix bintray publish bug
  • Loading branch information
Alex009 authored Jan 17, 2021
2 parents a3fe4d2 + c1226cf commit fb78928
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions parcelize/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,6 @@ kotlin {
dependsOn(notAndroidMain)
}
}

// Make sure to avoid duplicate publications
publishing {
val publicationsFromMainHost = listOf(
"wasm32", "jvm", "js", "kotlinMultiplatform", "androidRelease", "androidDebug", "linuxArm64", "linuxArm32Hfp", "linuxX64"
)

publications {
matching { it.name in publicationsFromMainHost }.all {
val targetPublication = this@all
tasks.withType<AbstractPublishToMaven>()
.matching { it.publication == targetPublication }
.configureEach { onlyIf { System.getProperty("IS_MAIN_HOST") == "true" } }
}
}
}
}

fun org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension.linux() {
Expand All @@ -86,4 +70,26 @@ publishing {
password = System.getProperty("BINTRAY_KEY")
}
}

// Make sure to avoid duplicate publications
val publicationsFromMainHost = listOf(
"wasm32",
"jvm",
"js",
"kotlinMultiplatform",
"androidRelease",
"androidDebug",
"linuxArm64",
"linuxArm32Hfp",
"linuxX64"
)

publications
.matching { it.name in publicationsFromMainHost }
.all {
val targetPublication = this@all
tasks.withType<AbstractPublishToMaven>()
.matching { it.publication == targetPublication }
.all { onlyIf { System.getProperty("IS_MAIN_HOST") == "true" } }
}
}

0 comments on commit fb78928

Please sign in to comment.