I'm trying to add kotlin-inject to a kmp project. ...
# kotlin-inject
c
I'm trying to add kotlin-inject to a kmp project. any ideas why ksp doesn't seem to want to work? In my root build.gradle.kts plugins block I added
Copy code
id("com.google.devtools.ksp") version "1.9.0-1.0.13"
then in my shared i added to the plugins block
id("com.google.devtools.ksp")
then I added kotlin-inject like this:
e
Doesn’t work because that block is unlike the Project.dependencies block. Its a custom DSL from the kotlin plugin and as such, accessors are not added to it.
e
I think ksp support is a little weird for KMP right now. I have these helpers that I use to make it simpler https://github.com/eygraber/gradle-conventions/blob/master/conventions-plugin/src/main/kotlin/ksp.kt
🫡 1
K 2
f
this will work on an Android module (example), but current multiplatform support is not the best so you need something different in a multiplatform module, something like this is what I usually have in place