diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ebc6d27..b7046a5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: with: distribution: 'adopt' java-version: '17' - - name: Publlish to Maven Central + - name: Publish to Maven Central uses: burrunan/gradle-cache-action@v1 with: gradle-version: wrapper diff --git a/build.gradle.kts b/build.gradle.kts index fae68ee..5c825e4 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,15 +1,14 @@ plugins { // Child Plugins - kotlin("jvm") version "1.9.10" apply false kotlin("multiplatform") version "1.9.10" apply false kotlin("plugin.serialization") version "1.9.10" apply false - id("io.bkbn.sourdough.library.mpp") version "0.12.1" apply false + id("io.bkbn.sourdough.library.mpp") version "0.12.2-SNAPSHOT" apply false id("io.kotest.multiplatform") version "5.7.2" apply false id("io.gitlab.arturbosch.detekt") version "1.23.1" apply false id("com.adarshr.test-logger") version "3.2.0" apply false // Root Plugins - id("io.bkbn.sourdough.root") version "0.12.1" + id("io.bkbn.sourdough.root") version "0.12.2-SNAPSHOT" id("com.github.jakemarsden.git-hooks") version "0.0.2" id("io.github.gradle-nexus.publish-plugin") version "1.3.0" } diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 5903d3e..8cea879 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -9,6 +9,12 @@ plugins { id("signing") } +// https://youtrack.jetbrains.com/issue/KT-46466 +tasks.withType().configureEach { + val signingTasks = tasks.withType() + mustRunAfter(signingTasks) +} + sourdoughLibrary { githubOrg.set("unredundant") githubRepo.set("satisfaketion") @@ -64,4 +70,17 @@ kotlin { // val nativeMain by getting // val nativeTest by getting } + + val publicationsFromMainHost = + listOf(jvm(), js()).map { it.name } + "kotlinMultiplatform" + publishing { + publications { + matching { it.name in publicationsFromMainHost }.all { + val targetPublication = this@all + tasks.withType() + .matching { it.publication == targetPublication } + .configureEach { onlyIf { findProperty("isMainHost") == "true" } } + } + } + } } diff --git a/generators/build.gradle.kts b/generators/build.gradle.kts index cbc2304..4655b7e 100644 --- a/generators/build.gradle.kts +++ b/generators/build.gradle.kts @@ -22,6 +22,12 @@ sourdoughLibrary { developerEmail.set("admin@bkbn.io") } +// https://youtrack.jetbrains.com/issue/KT-46466 +tasks.withType().configureEach { + val signingTasks = tasks.withType() + mustRunAfter(signingTasks) +} + dependencies { detektPlugins(group = "io.gitlab.arturbosch.detekt", name = "detekt-formatting", version = "1.23.1") } @@ -76,4 +82,17 @@ kotlin { // resources.srcDirs("resources") // } } + + val publicationsFromMainHost = + listOf(jvm(), js()).map { it.name } + "kotlinMultiplatform" + publishing { + publications { + matching { it.name in publicationsFromMainHost }.all { + val targetPublication = this@all + tasks.withType() + .matching { it.publication == targetPublication } + .configureEach { onlyIf { findProperty("isMainHost") == "true" } } + } + } + } } diff --git a/gradle.properties b/gradle.properties index afb8898..82b818a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ # Satisfaketion -project.version=0.8.1 +project.version=0.8.3 # Kotlin kotlin.code.style=official kotlin.js.compiler=ir diff --git a/mutators/build.gradle.kts b/mutators/build.gradle.kts index 025b08f..0cfe24a 100644 --- a/mutators/build.gradle.kts +++ b/mutators/build.gradle.kts @@ -10,6 +10,12 @@ plugins { id("signing") } +// https://youtrack.jetbrains.com/issue/KT-46466 +tasks.withType().configureEach { + val signingTasks = tasks.withType() + mustRunAfter(signingTasks) +} + sourdoughLibrary { githubOrg.set("unredundant") githubRepo.set("satisfaketion") @@ -66,4 +72,17 @@ kotlin { // val nativeMain by getting // val nativeTest by getting } + + val publicationsFromMainHost = + listOf(jvm(), js()).map { it.name } + "kotlinMultiplatform" + publishing { + publications { + matching { it.name in publicationsFromMainHost }.all { + val targetPublication = this@all + tasks.withType() + .matching { it.publication == targetPublication } + .configureEach { onlyIf { findProperty("isMainHost") == "true" } } + } + } + } }