source is hardcoded as 1.8 and encoding as UTF-8:
https://github.com/spring-projects/spring-boot/blob/b2e63db57fc91c74aaaf650235b4f6790ead8c84/spring-boot-project/spring-boot-docs/build.gradle#L194-L204
In order to avoid problems like this one, the configured conventions should be used instead.