I'm following this guide to migrate from kapt to k...
# dagger
c
I'm following this guide to migrate from kapt to ksp https://dagger.dev/dev-guide/ksp Should this plugin be added at my root level or app level?
Copy code
id "com.google.devtools.ksp" version "1.9.0-1.0.12"
n
I'll usually do both At the root level I'll apply it with
apply false
Copy code
id "com.google.devtools.ksp" version "1.9.0-1.0.12" apply false
And then for any module that uses it you can just apply it without the version.
Copy code
id "com.google.devtools.ksp"
c
interesting. apply false makes it so that it's not applied everywhere by default?
e
it loads it into the buildscript classpath without applying it
4
doing so in the root project prevents the same class from being loaded in multiple different classloaders which can cause issues between plugins that need to interact with each other or across projects
r
Doing so in the root project also ensures that the same version of the plugin will be used by all modules.
e
there's other ways of ensuring the same version, such as by version catalog
1
same or different classloader is pretty important though
👍 2
r
Also declaring it in the root project makes project configuration a lot faster.