Skip to content

Commit

Permalink
#535 fix klibs pass
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex009 committed Jan 14, 2024
1 parent 07346e1 commit 8af8b16
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ internal fun setupExecutableResources(target: KotlinNativeTarget) {
project.tasks.register<CopyExecutableResourcesToApp>(copyTaskName) {
dependsOn(executable.linkTaskProvider)

klibs.set(executable.linkTaskProvider.map { it.klibs })
klibs.from(executable.linkTaskProvider.map { it.klibs })

outputDirectory.set(
project.layout.dir(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ package dev.icerock.gradle.tasks

import dev.icerock.gradle.utils.toKonanFile
import org.gradle.api.DefaultTask
import org.gradle.api.file.ConfigurableFileCollection
import org.gradle.api.file.DirectoryProperty
import org.gradle.api.file.FileCollection
import org.gradle.api.provider.Property
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.Classpath
import org.gradle.api.tasks.InputFiles
import org.gradle.api.tasks.OutputDirectory
import org.gradle.api.tasks.TaskAction
import org.jetbrains.kotlin.library.KotlinLibraryLayout
Expand All @@ -19,8 +19,9 @@ import java.io.FileFilter

abstract class CopyExecutableResourcesToApp : DefaultTask() {

@get:Input
abstract val klibs: Property<FileCollection>
@get:InputFiles
@get:Classpath
abstract val klibs: ConfigurableFileCollection

@get:OutputDirectory
abstract val outputDirectory: DirectoryProperty
Expand All @@ -33,7 +34,7 @@ abstract class CopyExecutableResourcesToApp : DefaultTask() {
fun copyResources() {
val outputDir: File = outputDirectory.get().asFile

klibs.get()
klibs
.filter { library -> library.extension == "klib" }
.filter(File::exists)
.forEach { inputFile ->
Expand Down

0 comments on commit 8af8b16

Please sign in to comment.