devel/gradle5: pin to jdk8 or jdk11
Fails on runtime with newer jdk when building its sole dependency misc/elki.
When compiling in poudriere with DEFAULT_VERSIONS+=java=21:
> Building for elki-0.7.1.1166_1
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7
at org.codehaus.groovy.vmplugin.VMPluginFactory.<clinit>(VMPluginFactory.java:43)
The gradle documentation also states that you need a newer Gradle version for jdk12+.
https://docs.gradle.org/current/userguide/compatibility.html#java_runtime
PR: 291657
Approved-By: maintainer timeout