Hi :wave::skin-tone-3: , as from <https://docs.gra...
# gradle
m
Hi 👋🏼 , as from https://docs.gradle.org/7.1/release-notes.html#easier-source-set-configuration-in-the-kotlin-dsl I see no Kotlin source set support. Is this planned? Because I am using 
kotlin-dsl
 plugin and have no 
sourceSets.register("…").kotlin {}
I already asked that in Gradle and they give me the following input:
The Groovy plugin (and the other supported ones) now add the source directory set as extension to the source set like
Copy code
sourceSet.getExtensions().add(GroovySourceDirectorySet.class, "groovy", groovySourceSet.getGroovy());
Due to that the accessor generation for Kotlin DSL build scripts and precompiled plugins can generate the 
groovy
 accessor with which you can configure the source directory set.
So to support Kotlin, the Kotlin Gradle plugin should do the same and add an according extension.
👍🏼 1
👍 2
j
Kotlin source sets via with Kotlin jvm plugin can be changed via java accessor. If you are using the multiplatform plugin you can use the kotlin one
v
Even if that is true, it is a bit unintuitive and inconsistent if you can do
sourceSets { main { java { /* ... */ } } }
and
sourceSets { main { groovy { /* ... */ } } }
, but not
sourceSets { main { kotlin { /* ... */ } } }
, don't you think?
j
Maybe, but I only use multiplatform plugin and it has the kotlin one
v
Thats even more inconsistent then 😄
j
Why? I like how multiplatform plugin works
v
I don't suggest changing the the KMP plugin, but the JVM plugin to also have the
kotlin
extension and thus accessor. 🙂
j
yes? I didn’t see it, even in the Elizarov github he uses the java one
v
I don't get what you are saying, sorry. What else should he use, there is no
kotlin
one yet. That's what Ron is complaining / wondering about.
As a follow-up, I just found this comment stating "The Kotlin plugin will be updated to follow the same pattern by JetBrains.", so I'd say yes, it is planned: https://github.com/gradle/gradle/issues/3191#issuecomment-850601582
🎉 2