Is there any kotlin code generation solution for native? KotlinPoet does not seem to support native target.
j
jw
12/18/2021, 6:23 PM
As in, you want to perform code generation from a Kotlin/Native tool?
jw
12/18/2021, 6:23 PM
Because you can target Kotlin/Native with KotlinPoet today just fine, but obviously you need to run the tool on the JVM
j
jimn
12/19/2021, 1:06 PM
good to know. does this have a in-gradle sample somewhere to crib too?
j
jw
12/19/2021, 4:46 PM
Any KotlinPoet usage has the ability to target Kotlin/Native. It's all about what you generate in the same way any Kotlin code can support Kotlin/Native. You just avoid platform-specific dependencies. Tools like SQLDelight and Wire which use KotlinPoet support use on Kotlin/Native.
a
Andy Victors
12/19/2021, 5:24 PM
Okay, thanks, I am trying to guess what does "run on JVM" means - I run multiplatform project on Idea and currently I have only native target. I need to include JVM target and put Poet code there in?