Type inference warning in build.gradle.kts
17:02 17 Sep 2025

In my build.gradle.kts I am getting randomly errors around create("foo") with lambda saying:

Cannot infer type for type parameter 'S'. Specify it explicitly

It happens both for productFlavors and signingConfigs.

Minimal example (the {} gets underlines with the waring):

productFlavors {
    create("good") 
    create("bad") {}

Using IntelliJ IDEA 2025.2.1 but it happened also in older versions.

Any clue?

intellij-idea gradle-kotlin-dsl