Looks good. Haven't fully tested yet, but does it work in Gradle?
Nope, it will require a lot of work to get it working in Gradle as well. That is because in Gradle we can't just read the configuration, we'll need to read the Kotlin Gradle plugin data. It should definitely be done when all the other Gradle improvements things are in place.
Originally posted by @geoand in #6030 (comment)