I think it's a bug, but not sure if it's Gradle's fault or Android Gradle Plugin's fault (or both?).
It has something to do with included builds (like build-logic
) and using the artifact com.android.tools.build:gradle-api
(which is the recommendation) instead of com.android.tools.build:gradle
.
The problem seems to be intermittent. Killing the Gradle daemon sometimes makes the problem disappear.
If you have a lot of included builds with projects that are using com.android.tools.build:gradle-api
the problem seems to manifest more frequently.
Read a bit more here: https://slack-chats.kotlinlang.org/t/12314187/hi-all-i-ve-used-kotlin-dsl-to-set-up-convention-plugins-for
I haven't found any bug reports, but there probably should be one.