[5.1.1] Kotlin-DSL - Consitency Question

Hello everyone

I am moving a little project of mine to the new Kotlin-DSL using Gradle 5.1.1. After having a look at the DSL-Primer and Migration-Guide I think I understand the basic concepts

Anyway, I cannot get the Scala plugin to function in the way I need. In my case I just want to add a custom source-set to the existing “main” set.

sourceSets["main"].scala {
  srcDir("build/generated/source/proto/main/scala")
}

This doesnt work. But when having a look at the Java plugin, this syntax would be correct

sourceSets["main"].java {
  srcDir("build/generated/source/proto/main/scala")
}

Why is this not consistent?

What seems to work is this, but I dont want to change the convention from the plugin, just add one folder.

sourceSets {
  main {
    withConvention(ScalaSourceSet::class){
      scala{
        srcDir("build/generated/source/proto/main/scala")
      }
    }
  }
}