Skip to content

Commit

Permalink
Fix check-publication functionality (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
05nelsonm authored May 11, 2022
1 parent aefa62b commit e39cd95
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 25 deletions.
3 changes: 0 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion kotlin-components
18 changes: 9 additions & 9 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@ 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

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")
}
}
16 changes: 4 additions & 12 deletions tools/check-publication/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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(
Expand Down

0 comments on commit e39cd95

Please sign in to comment.