Slackbot
05/19/2023, 6:01 PMAdam
05/19/2023, 7:39 PMsourceSets.named<org.gradle.api.tasks.SourceSet>("main")
the only difference might have an impact is the second one requires the type-safe model accessors are present, which is only true in build.gradle.kts
files (or precompiled plugin scripts)Shaun Reich
05/19/2023, 8:16 PMephemient
05/20/2023, 3:52 AMval main by getting
main.java...
is equivalent to
getByName("main").java...
which is eager,
main { java... }
is equivalent to
named("main") { java... }
which is lazyephemient
05/20/2023, 3:54 AMval main by existing
main.configure { java... }
then that would be lazyephemient
05/20/2023, 3:54 AMsourceSets
but it can for other types of object collections