bitcoinj/secp256k1-jdk

Upgrade build to JDK 22

Closed this issue · 1 comments

We're currently using JDK 21 with preview enabled to get access to the Foreign Function & Memory API. As soon as we can upgrade to JDK 22, we can build without "preview enabled".

JDK 22 is currently in final candidate status, so given that this project is still in the "proof-of-concept" stage, I think it would be preferable to use a JDK 22 candidate than JDK 21 with preview enabled.

Gradle 8.7-rc-2 is available and it supports building, etc. with JDK 22, but Gradle itself must be run on JDK 21 or earlier. They say they are waiting for a version of Groovy 3 that supports JDK 22 and it looks like Groovy 3.0.21 will work be released in a few days. (Groovy 3.0.21 upgrades to ASM 9.6, which supports JDK 22)

So my current plan is to wait for a version of Gradle (8.7 or 8.8) that supports running on JDK 22 to avoid the complexity of requiring to JVMs on GitHub Actions. Hopefully this happens by the time JDK 22 is final (scheduled for March 19.)

If we get impatient we can consider one of the following approaches:

  1. Switch to Maven
  2. Use two JVMs and Gradle Toolchains.

Implemented by PR #14.