HN user
snafu109
Haven't read yet but I found the transcript in HTML which is easier to read on a phone: https://www.grc.com/sn/sn-545.htm
"... you won't be able to run Gradle 6.8.x on Java 16"
Exactly. But you could run Gradle on Java 8-15 and use the new toolchains support to build with Java 16.
I'm not saying setting up toolchains is frictionless or even reliable yet (given the feature is so new) but it's there.
I'm guessing you only read the issue or title on that link, because the second comment on that issue is from one of the Gradle maintainers suggesting using toolchains (which I linked to), with follow ups from various users advising some success, allowing them to target Java 16 while running Gradle on an earlier, supported version.
Gradle has support for running and building with different JDK versions (it's not new with Gradle 7 but it's a recent feature).
So it was possible to support building Java 16 projects while running Gradle on a supported Java version before Gradle 7 was released.
I haven't personally used it, but the Worker API offers various levels of isolation for tasks, including class loader and process isolation modes.
https://docs.gradle.org/current/userguide/worker_api.html#ch...
The takeaway is "make sure you use a tool like R8 or ProGuard to remove unused code paths". That's where most of the savings came from, and the advice applies to Java projects as well.
But true, if you care about every last byte, you might use Java instead. You might also use another language entirely.
Official announcement: https://blog.jetbrains.com/kotlin/2020/08/kotlin-1-4-release...
What's New in Kotlin 1.4: https://kotlinlang.org/docs/reference/whatsnew14.html