Is there a way how SymbolProcessor can get the nam...
# ksp
p
Is there a way how SymbolProcessor can get the name of the configuration from the dependencies? I.e. if I added this line to my build.gradle.kts file:
Copy code
add("kspCommonMainMetadata", project(":ksp"))
I would like to get the string "kspCommonMainMetadata" inside of the process() function - especially if there are multiple processors added, I want to distinguish between them.
j
KSP APIs by itself can’t do that, you can try to pass the configuration names in Gradle via KSP options, but it’s up to your own use case as to how to write it in build scripts.
p
How can you pass a different option to each of the configurations? I can only see there is a global "ksp" extension, which can be used like this:
Copy code
ksp {
    arg("optinName", "optionValue")
}
But I'd need for each configuration created using the add() to have a different "optionValue".
j
maybe try getting task by name? But I won’t count on that in general.