diff --git a/plugins/swift-export/build.gradle.kts b/plugins/swift-export/build.gradle.kts index d9746c6c60f..1ec666afa24 100644 --- a/plugins/swift-export/build.gradle.kts +++ b/plugins/swift-export/build.gradle.kts @@ -39,7 +39,7 @@ sourceSets { optInToExperimentalCompilerApi() -if (project.hasProperty("kotlin-native.swift-export.enabled")) { +if (project.kotlinBuildProperties.isSwiftExportPluginPublishingEnabled) { // todo: is you are removing this check - don't forget to run tests in repo/artifacts-tests/src/test/kotlin/org/jetbrains/kotlin/code/ArtifactsTest.kt publish() } diff --git a/plugins/swift-export/swift-export.embeddable/build.gradle.kts b/plugins/swift-export/swift-export.embeddable/build.gradle.kts index 102714e7577..0427fd6b32a 100644 --- a/plugins/swift-export/swift-export.embeddable/build.gradle.kts +++ b/plugins/swift-export/swift-export.embeddable/build.gradle.kts @@ -6,7 +6,8 @@ dependencies { embedded(project(":kotlin-swift-export-compiler-plugin")) { isTransitive = false } } -if (project.hasProperty("kotlin-native.swift-export.enabled")) { +if (project.kotlinBuildProperties.isSwiftExportPluginPublishingEnabled) { + // todo: is you are removing this check - don't forget to run tests in repo/artifacts-tests/src/test/kotlin/org/jetbrains/kotlin/code/ArtifactsTest.kt publish { artifactId = "kotlin-swift-export-compiler-plugin-embeddable" } diff --git a/repo/gradle-build-conventions/buildsrc-compat/src/main/kotlin/BuildPropertiesExt.kt b/repo/gradle-build-conventions/buildsrc-compat/src/main/kotlin/BuildPropertiesExt.kt index 4ce9308dd05..caf8d327989 100644 --- a/repo/gradle-build-conventions/buildsrc-compat/src/main/kotlin/BuildPropertiesExt.kt +++ b/repo/gradle-build-conventions/buildsrc-compat/src/main/kotlin/BuildPropertiesExt.kt @@ -59,3 +59,6 @@ val KotlinBuildProperties.useFirWithLightTree: Boolean val KotlinBuildProperties.useFirTightIC: Boolean get() = getBoolean("kotlin.build.useFirIC") + +val KotlinBuildProperties.isSwiftExportPluginPublishingEnabled: Boolean + get() = getBoolean("kotlin-native.swift-export.enabled")