It's not configured consistently across branches and configuring it at the project level via the sourceCompatibility project property is causing problems with the Java 16 build in 2.5 where the Groovy plugin's also applied:

Execution failed for task ':spring-boot-project:spring-boot-docs:compileGroovy'.  
> The new Java toolchain feature cannot be used at the project level in combination with source and/or target compatibility

We should always configure it on the JavaCompile tasks instead.