>Again, this is due to the dynamic dispatching ...
# gradle
h
Again, this is due to the dynamic dispatching in Groovy and due to the way how the extension mechanism of builds works.
FWIW, it's not due to dynamic dispatching but rather due to not using types (Groovy supports types for documentation at least since Groovy 1.0 in 2007) and meta-programming. More than 40% of Gradle's internal code is written in Groovy, and from what I see, they followed best-practices and used types in the Groovy code, which allows code completion and documentation lookup, even with dynamic dispatching. Now, the more we go to the Gradle build script DSL, the more Gradle omits types (I have to use
project.sourceSets as SourceSetContainer
and
sourceSets*.allSource.srcDirs.flatten() as List<File>
to let IDEA assist me with code completion) and embraces meta-programming (
missingMethod()
, ...). Also Groovy is missing type-safe builders. The big advantages for using Kotlin (instead of Groovy) for build scripts are IMO, especially type-safe builders and extension functions, no optional dynamic typing (lead us not into temptation) from the syntax side; inline functions and static dispatch (no Groovy MOP) from the performance side. Please correct me, if I'm totally wrong.