How is the automatic test of buildSrc triggered?

The documentation of buildSrc says that Gradle automatically compiles and tests this code, but for me, only the compile bit seems to happen: the build succeeds if buildSrc contains failing tests.

Is this a bug in the documentation, or is it something I’ve missed in the configuration of my build? I can make the buildSrc tests run (and fail) by running ./gradlew buildSrc:check, so it would seem to be a problem with the automatic triggering.

For reference, I’m using Gradle 8.7.

Yeah, that’s outdated documentation.
This detail changed with 8.0 where buildSrc was made more included-build-like: Gradle 8.0 Release Notes
So yes, this is doc bug that you should PR or report.

Thanks! I submitted Correct User Guide to remove statement that Gradle automatically tests code in buildSrc by markslater · Pull Request #28925 · gradle/gradle · GitHub

1 Like