I’m trying to create a gradle plugin in .kts forma...
# community-support
s
I’m trying to create a gradle plugin in .kts format, and am looking at a Groovy one to take some inspiration. At one point I see this code in Groovy
def dirRes = project.android.sourceSets.findByName("main").res.srcDirs.first()
. My immediate question is, how do I get the same
android
type from project if I don’t know what to ask for, in Groovy is seems to “just work” but in Kotlin I guess I need to do something like find it by name and specify what type it is so that I can then do
.sourceSets
on it etc. But the more general question may also be, is there an obvious way of how to find what I am looking for when going from Groovy -> Kotlin? As someone who’s never done something like this before and has never done Groovy before I don’t see any obvious way to do this.