From e39cd95a8436790875dcdc81fb44af6f966d60a9 Mon Sep 17 00:00:00 2001 From: Matthew Nelson Date: Tue, 10 May 2022 20:23:08 -0400 Subject: [PATCH] Fix check-publication functionality (#21) --- gradle.properties | 3 --- kotlin-components | 2 +- settings.gradle.kts | 18 +++++++++--------- tools/check-publication/build.gradle.kts | 16 ++++------------ 4 files changed, 14 insertions(+), 25 deletions(-) diff --git a/gradle.properties b/gradle.properties index 5745bd9..d803c58 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,6 +14,3 @@ kotlin.mpp.stability.nowarn=true kotlin.native.binary.memoryModel=experimental kotlin.native.ignoreDisabledTargets=true - -kotlin.mpp.enableCInteropCommonization=true -kotlin.mpp.commonizerLogLevel=info diff --git a/kotlin-components b/kotlin-components index 0e5fdc5..122bb91 160000 --- a/kotlin-components +++ b/kotlin-components @@ -1 +1 @@ -Subproject commit 0e5fdc569fee581484b36233735b718f6e8fa2eb +Subproject commit 122bb917917a935617263972d7932ed9ca131fc0 diff --git a/settings.gradle.kts b/settings.gradle.kts index 8118ab1..62f6d3e 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -3,11 +3,6 @@ rootProject.name = "component-encoding" includeBuild("kotlin-components/includeBuild/dependencies") includeBuild("kotlin-components/includeBuild/kmp") -include(":encoding-base16") -include(":encoding-base32") -include(":encoding-base64") -include(":encoding-test") - // if JVM is not being built, don't include the app @Suppress("PrivatePropertyName") private val KMP_TARGETS: String? by settings @@ -15,12 +10,17 @@ private val KMP_TARGETS: String? by settings private val allTargets = System.getProperty("KMP_TARGETS_ALL") != null private val targets = KMP_TARGETS?.split(',') -if (allTargets || targets?.contains("JVM") != false) { - include(":app") -} - @Suppress("PrivatePropertyName") private val CHECK_PUBLICATION: String? by settings if (CHECK_PUBLICATION != null) { include(":tools:check-publication") +} else { + include(":encoding-base16") + include(":encoding-base32") + include(":encoding-base64") + include(":encoding-test") + + if (allTargets || targets?.contains("JVM") != false) { + include(":app") + } } diff --git a/tools/check-publication/build.gradle.kts b/tools/check-publication/build.gradle.kts index 960d192..d4ecc4d 100644 --- a/tools/check-publication/build.gradle.kts +++ b/tools/check-publication/build.gradle.kts @@ -17,6 +17,8 @@ import io.matthewnelson.kotlin.components.dependencies.versions import io.matthewnelson.kotlin.components.kmp.KmpTarget import io.matthewnelson.kotlin.components.kmp.publish.isSnapshotVersion import io.matthewnelson.kotlin.components.kmp.publish.kmpPublishRootProjectConfiguration +import io.matthewnelson.kotlin.components.kmp.util.includeSnapshotsRepoIfTrue +import io.matthewnelson.kotlin.components.kmp.util.includeStagingRepoIfTrue import org.jetbrains.kotlin.gradle.plugin.KotlinJsCompilerType plugins { @@ -26,18 +28,8 @@ plugins { val pConfig = kmpPublishRootProjectConfiguration!! -repositories { - if (pConfig.isSnapshotVersion) { - maven("https://oss.sonatype.org/content/repositories/snapshots/") - } else { - maven("https://oss.sonatype.org/content/groups/staging") { - credentials { - username = rootProject.ext.get("mavenCentralUsername").toString() - password = rootProject.ext.get("mavenCentralPassword").toString() - } - } - } -} +includeSnapshotsRepoIfTrue(pConfig.isSnapshotVersion) +includeStagingRepoIfTrue(!pConfig.isSnapshotVersion) kmpConfiguration { setupMultiplatform(