Here is a reproduction.
Run gradle check on this. It will fail with the error in the title. If you remove the plugin from build.gradle - it succeeds. Don't ask me why there are two subprojects and some crazy code in there - that's what I managed to narrow down the problem to. 😄