icerockdev / moko-kswift

Swift-friendly api generator for Kotlin/Native frameworks
https://moko.icerock.dev
Apache License 2.0
350 stars 21 forks source link

Swift code does not generating when calling kSwift{moduleName}Podspec task #91

Open Pschsch opened 1 year ago

Pschsch commented 1 year ago

According to plugin code, it adds action to the link task responsible for swift code generation

linkTask.doLast(PostProcessLinkTask(framework, processor, kSwiftExtension))

Then, registering a task, which is responsible for podspec generation and also depend on link task

project.tasks.create(podspecTaskName, KSwiftPodspecTask::class) {
            it.linkTask = linkTask
            it.kSwiftExtension = kSwiftExtension
            it.dependsOn(linkTask)
        }

But if I call kSwift{moduleName}Podspec task directly on macOS system, there are no generated swift files. To generate it, i should manually call syncFramework task with the declared parameters like in the shared module podspec's buildscript. Is that expected behavior or maybe am I doing something wrong?