Does anyone know if there's a good way to detect what version of the kotlin gradle plugin is applied?
I have a plugin where in the past we had a few directories that we were adding to the java sourceset. However, adding to just the java sourceset caused issues when we switched to gradle 8 because we started to get implicit task dependency errors on a few kotlin specific tasks. So I updated the plugin so that it now grabs the
kotlinExtension and adds directly to the kotlin sourceset.
After making the change, I found out this logic
was broken before kotlin 1.9.0. I'm wondering if there's a good way to detect the version so I can just add to the java source set if they are pre kotlin 1.9.0 and add to the kotlin sourceset if they are on or after 1.9.0.