As seen in #35777 and #35773, the "validateMultiReleaseJar" required Java 25+.
While this is an important check, we should not require contributors to have a local Java 25 install in order to load the project and contribute.
We should only configure this task when Gradle is executed with a Java 25+ runtime. Our CI will pick up issues in all cases and changes on our multi-release Java contracts are quite rare.