Open ionspin opened 4 weeks ago
This is required by the KMP build model, which is enforced by K2: common sources have no visibility on platform / target sources. The KSP example needs to be updated by expect / actual.
Thank you for your answer, but I am having trouble understanding the separation. Running
./gradlew workload:compileCommonMainKotlinMetadata
will generate a proper Foo.kt class:
cat ./workload/build/generated/ksp/metadata/commonMain/kotlin/Foo.kt
package com.example
class Foo {
val bar = true
val baz = true
}
and the task will succeed.
Running
./gradlew workload:compileKotlinJvm
will generate proper a proper Foo.kt as well:
cat ./workload/build/generated/ksp/jvm/jvmMain/kotlin/Foo.kt
package com.example
class Foo {
val bar = true
val baz = true
}
but the task will fail with the previously mentioned error.
I'm failing to see the separation, both common and jvm have their own generated classes present.
Also I would expect that generating a simple data class in common sources would be then available in all other source sets, even with K2. Please correct me if I am wrong.
Thanks again for all your hard work on the library, it is greatly appreciated!
I have the same problem.
I use Kotlin 2.0.0 Ksp 2.0.0- 1.0.21 Room 2.7.0-alpha01
Ios target generate
KClazz
But it extension is not visible , i cant import it, for creation room factory builder
I'm seeing the same issue, even though I have no code in a platform specific source set. I get the Unresolved reference
error for codegen run from the commonMain
files.
这是来自QQ邮箱的假期自动回复邮件。 您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
Trying to migrate to Kotlin 2.0.0 and KSP 2.0.0-1.0.21, and was unsuccessful, as none of the generated files which are present in the build folder are visible to the source.
Reproducer:
Use 'examples/multiplatform' from this repository, change gradle.properties to use kotlin 2.0.0 and appropriate ksp:
Observed: