As mentioned in google/error-prone#4705 (comment), if we don't want to customize the build configuration, that requires upgrading the Gradle Error Prone plugin to 4.1.0.
That could help for #33616 (comment), if it does, the next blocker will be Gradle itself which does not support yet Java 24.