would y'all be open to a FR to not make compileKot...
# ksp
would y'all be open to a FR to not make compileKotlin tasks depend on KSP tasks? My use case is that I have a symbol processor that generates resources only and isn't actually necessary for the compileKotlin task, and would rather them run in parallel. I can take a shot at a PR too if you're open to this (gradle property flag, DSL config, intelligently detecting if kotlin/java/class files are generated, etc)
Not sure of your intent but I react on "intelligently detecting" => I'd prefer to have a flag in an extension that disable the task dependency : • I may want to only generate kt files in some rare occasions (at release date for example), a gradle property can be easily defined for that • most of the KSP users are used to have this task relationship, may be better to disable it explicitly when you need it, but keep the relationship as the default (I don't remember well but I believe another well known lint? plugin use this pattern) Clearly in favor of that option.
I favor that option too, just tossing options out there
For intelligently detecting, how do you know the types of outputs of processors before running them? Seems to me that the only possible approach is an option / flag?
or another set of API to allow processors to report their output types, but that would require all processors to update.
I'm generally OK with a non-default option to decouple Kotlin compilation and KSP, and would love to discuss more details before you spend time implementing it.
good point that it's kind of too late at the end. Reporting output types could work, but not sure if the providers are loaded early enough to control that in configuration. A simple extension for now could be enough of a starting point. What about allowing processors to implement a marker interface, like
or something to opt-out and wouldn't require existing processors to add in?
the downside to parallelizing all that would be the double parsing of the code, no? once to compile and once to generate resources.
It’s happening anyway, I just want to do it in parallel
There’s no IC-compatible way to do it within the same compileKotlin task
👍🏻 1