diff --git a/SKIE/skie-gradle/plugin-impl/src/common/kotlin/co/touchlab/skie/plugin/switflink/SwiftBundlingConfigurator.kt b/SKIE/skie-gradle/plugin-impl/src/common/kotlin/co/touchlab/skie/plugin/switflink/SwiftBundlingConfigurator.kt index 3f0c0d32..e1328a77 100644 --- a/SKIE/skie-gradle/plugin-impl/src/common/kotlin/co/touchlab/skie/plugin/switflink/SwiftBundlingConfigurator.kt +++ b/SKIE/skie-gradle/plugin-impl/src/common/kotlin/co/touchlab/skie/plugin/switflink/SwiftBundlingConfigurator.kt @@ -60,17 +60,21 @@ object SwiftBundlingConfigurator { } private fun KotlinNativeCompilationShim.configureCompileTask(processSwiftSourcesTaskProvider: Provider) { + val processSwiftSourcesTaskOutput = processSwiftSourcesTaskProvider.flatMap { it.output } + + val compileTaskOutputFileProvider = compileTaskOutputFileProvider + compileTaskProvider.configure { - inputs.files(processSwiftSourcesTaskProvider.map { it.outputs }) + inputs.files(processSwiftSourcesTaskOutput) doLast { - copySwiftSourcesToKlib(compileTaskOutputFileProvider.get(), processSwiftSourcesTaskProvider.get()) + copySwiftSourcesToKlib(compileTaskOutputFileProvider.get(), processSwiftSourcesTaskOutput) } } } - private fun copySwiftSourcesToKlib(klib: File, processResourcesTask: ProcessSwiftSourcesTask) { - val swiftSourcesDirectory = processResourcesTask.output.get() + private fun copySwiftSourcesToKlib(klib: File, processSwiftSourcesTaskOutput: Provider) { + val swiftSourcesDirectory = processSwiftSourcesTaskOutput.get() if (!swiftSourcesDirectory.exists()) { return diff --git a/SKIE/skie-gradle/plugin-impl/src/common/kotlin/co/touchlab/skie/plugin/switflink/SwiftUnpackingConfigurator.kt b/SKIE/skie-gradle/plugin-impl/src/common/kotlin/co/touchlab/skie/plugin/switflink/SwiftUnpackingConfigurator.kt index 73bc7009..0470f012 100644 --- a/SKIE/skie-gradle/plugin-impl/src/common/kotlin/co/touchlab/skie/plugin/switflink/SwiftUnpackingConfigurator.kt +++ b/SKIE/skie-gradle/plugin-impl/src/common/kotlin/co/touchlab/skie/plugin/switflink/SwiftUnpackingConfigurator.kt @@ -24,8 +24,10 @@ object SwiftUnpackingConfigurator { output.set(bundledSwiftDirectory) } + val unpackTaskOutput = unpackTask.flatMap { it.output } + target.task.configure { - inputs.files(unpackTask.map { it.output }) + inputs.files(unpackTaskOutput) } } }