It looks like the mainline is no longer compatible to jdk8. I downgraded now to 6.4.0 which still seams to work, but give me the warning: “The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0.”
I’m curious now. 1. bnd 6.x is there to continue jkd8 support? 2. Will the branch at least be kept alive to support newer gradle versions (as long as they support jdk8) or is that one already end of life?
Not familiar with gradle plugins but the source seems to have a check to “avoid conventions”.
See
Sorry didn’t read properly or forgot when checking the code. You need that for 6.4.0 and jdk8. The links are for 7.0.
But maybe this helps with a potential downport by anyone capable (you maybe )
One other thing comes to mind which I saw in another project.
Apache Freemarker also targets JDK8 but uses Gradle Toolchains to build different parts with different JDKs. For the part which uses bnd 7.0.0 to create OSGi metadata, they use JDK17 (because required by bnd >=7.0)
See freemarker/README.md at 2.3-gae · apache/freemarker · GitHub and the gradle config
So maybe a similar approach works also for you.
As java8 is long end of lifetime, we decided to move on. This should be no problem though, as a Java17 is only required to run gradle and bnd and is not the JDK you need to build/run your project.
The first answer here, seems a good way to run gradle with one JVM, while your JAVA_HOME or JDK_HOME points to another Version.