Hi, I'm doing some experimentation with KSP on mul...
# ksp
a
Hi, I'm doing some experimentation with KSP on multiplatform projects and one of my goal would be to generate classes only for a specific plateform (JS) but I didn't in the KSP models where is the information about the plateform. Any idea on how I could to that?
e
Not yet, but there's an open issue https://github.com/google/ksp/issues/611
e
Meanwhile, you can disable Gradle KSP tasks for other platforms
a
thanks for the answers
g
Did you successfully did it @edrd ? I got some issues on my side, rn I need to run compileKotlinJs first with KSP, then jsBrowserDistribution without it (I have a flag when starting gradle to enable or not KSP, but it's done in 2 distinct gradle run).
e
@Grégory Lureau I was able to disable JS processing for my use-case with:
Copy code
tasks.withType<com.google.devtools.ksp.gradle.KspTaskJS>() {
	enabled = false
}
However I think what you need will require more tinkering...
g
Ok thanks. I'll share here some notes about my blocker if it can help anyone. I had 3 blockers : https://kotlinlang.slack.com/archives/C013BA8EQSE/p1633294837215800 https://youtrack.jetbrains.com/issue/KT-47088 https://kotlinlang.slack.com/archives/C013BA8EQSE/p1633948867255800 I did the 2 gradle calls (KSP gen, then standard build) to avoid one, created a fake file and check the path for another one, and finally created 1 annotation by module with different names for the last one.