From 93bc4322fe6777a67e8d86f6094cc33ff3789359 Mon Sep 17 00:00:00 2001 From: Tadeas Kriz Date: Mon, 25 Nov 2024 16:11:45 -0500 Subject: [PATCH] Fix Gradle tests. --- .../shim/ObjCExportMapperShim.kgp_1.8.0.kt | 2 +- .../shim/ObjCExportMapperShim.kgp_2.1.0.kt | 2 +- .../skie/shim/ObjCExportMapperShim.kt | 2 +- .../plugins/SkieMultiCompileRuntime.kt | 34 ++++++++++++------- 4 files changed, 24 insertions(+), 16 deletions(-) diff --git a/SKIE/kotlin-compiler/linker-plugin/src/kgp_1.8.0..2.0.20/kotlin/co/touchlab/skie/shim/ObjCExportMapperShim.kgp_1.8.0.kt b/SKIE/kotlin-compiler/linker-plugin/src/kgp_1.8.0..2.0.20/kotlin/co/touchlab/skie/shim/ObjCExportMapperShim.kgp_1.8.0.kt index 1d4bd3be..9035cf36 100644 --- a/SKIE/kotlin-compiler/linker-plugin/src/kgp_1.8.0..2.0.20/kotlin/co/touchlab/skie/shim/ObjCExportMapperShim.kgp_1.8.0.kt +++ b/SKIE/kotlin-compiler/linker-plugin/src/kgp_1.8.0..2.0.20/kotlin/co/touchlab/skie/shim/ObjCExportMapperShim.kgp_1.8.0.kt @@ -10,7 +10,7 @@ import org.jetbrains.kotlin.backend.konan.objcexport.getClassIfCategory import org.jetbrains.kotlin.backend.konan.objcexport.isObjCProperty import org.jetbrains.kotlin.backend.konan.objcexport.isTopLevel -actual object ObjCExportMapperShim { +internal actual object ObjCExportMapperShim { actual fun isSpecialMapped( mapper: ObjCExportMapper, descriptor: ClassDescriptor diff --git a/SKIE/kotlin-compiler/linker-plugin/src/kgp_2.1.0/kotlin/co/touchlab/skie/shim/ObjCExportMapperShim.kgp_2.1.0.kt b/SKIE/kotlin-compiler/linker-plugin/src/kgp_2.1.0/kotlin/co/touchlab/skie/shim/ObjCExportMapperShim.kgp_2.1.0.kt index 76c03eca..9b1632a4 100644 --- a/SKIE/kotlin-compiler/linker-plugin/src/kgp_2.1.0/kotlin/co/touchlab/skie/shim/ObjCExportMapperShim.kgp_2.1.0.kt +++ b/SKIE/kotlin-compiler/linker-plugin/src/kgp_2.1.0/kotlin/co/touchlab/skie/shim/ObjCExportMapperShim.kgp_2.1.0.kt @@ -11,7 +11,7 @@ import org.jetbrains.kotlin.backend.konan.objcexport.getClassIfCategory import org.jetbrains.kotlin.backend.konan.objcexport.isObjCProperty import org.jetbrains.kotlin.backend.konan.objcexport.isTopLevel -actual object ObjCExportMapperShim { +internal actual object ObjCExportMapperShim { actual fun isSpecialMapped( mapper: ObjCExportMapper, descriptor: ClassDescriptor diff --git a/SKIE/kotlin-compiler/linker-plugin/src/kgp_common/kotlin/co/touchlab/skie/shim/ObjCExportMapperShim.kt b/SKIE/kotlin-compiler/linker-plugin/src/kgp_common/kotlin/co/touchlab/skie/shim/ObjCExportMapperShim.kt index 3f8295e0..b62dbcaf 100644 --- a/SKIE/kotlin-compiler/linker-plugin/src/kgp_common/kotlin/co/touchlab/skie/shim/ObjCExportMapperShim.kt +++ b/SKIE/kotlin-compiler/linker-plugin/src/kgp_common/kotlin/co/touchlab/skie/shim/ObjCExportMapperShim.kt @@ -5,7 +5,7 @@ import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor import org.jetbrains.kotlin.descriptors.ClassDescriptor import org.jetbrains.kotlin.descriptors.PropertyDescriptor -expect object ObjCExportMapperShim { +internal expect object ObjCExportMapperShim { fun isSpecialMapped(mapper: ObjCExportMapper, descriptor: ClassDescriptor): Boolean fun isTopLevel(mapper: ObjCExportMapper, descriptor: CallableMemberDescriptor): Boolean diff --git a/build-setup/src/main/kotlin/co/touchlab/skie/buildsetup/plugins/SkieMultiCompileRuntime.kt b/build-setup/src/main/kotlin/co/touchlab/skie/buildsetup/plugins/SkieMultiCompileRuntime.kt index f412ac4e..a09a0292 100644 --- a/build-setup/src/main/kotlin/co/touchlab/skie/buildsetup/plugins/SkieMultiCompileRuntime.kt +++ b/build-setup/src/main/kotlin/co/touchlab/skie/buildsetup/plugins/SkieMultiCompileRuntime.kt @@ -148,17 +148,17 @@ class SkieMultiCompileRuntime: Plugin { smokeTestTmpRepositoryPath: String?, ): TaskProvider { return tasks.register("copyProject__$name") { - from(extension.sourceDir) { - include(extension.sourceIncludes.get()) - filter( - ReplaceTokens::class, - "tokens" to mapOf( - "targetKotlinVersion" to kotlinVersion.toString(), - "artifactIdSuffix" to artifactIdSuffix, - "targets" to extension.supportedTargetsWithDeclarations(kotlinVersion).joinToString("\n") { (_, declaration) -> declaration }, - "dependencies" to extension.dependencies.get().invoke(kotlinVersion), - "smokeTestTmpRepositoryConfiguration" to smokeTestTmpRepositoryPath?.let { - """ + group = "other" + description = "Copy project files for Kotlin $name" + + val tokens = provider { + mapOf( + "targetKotlinVersion" to kotlinVersion.toString(), + "artifactIdSuffix" to artifactIdSuffix, + "targets" to extension.supportedTargetsWithDeclarations(kotlinVersion).joinToString("\n") { (_, declaration) -> declaration }, + "dependencies" to extension.dependencies.get().invoke(kotlinVersion), + "smokeTestTmpRepositoryConfiguration" to smokeTestTmpRepositoryPath?.let { + """ publishing { repositories { maven { @@ -168,8 +168,16 @@ class SkieMultiCompileRuntime: Plugin { } } """.trimIndent() - }.orEmpty(), - ) + }.orEmpty(), + ) + } + + inputs.property("tokens", tokens) + from(extension.sourceDir) { + include(extension.sourceIncludes.get()) + filter( + ReplaceTokens::class, + "tokens" to tokens.get() ) } into(layout.buildDirectory.dir("${this@registerCopyTask.name}_$name"))