is gradle 9 do out this month?
# community-support
c
is gradle 9 do out this month?
👀 1
v
My wild guess is, that this is quite unlikely. There was not even a first RC release. And the RC1 milestone has 149 open an 9 closed issues.
👍 1
c
huh, so gradle 8 is going to go on for longer than most gradle releases, aight
v
The provider-migration is probably a much larger major task than stuff in previous releases, so yes, it probably needs significantly longer to be finished.
👍 2
y
Any reason why you need Gradle 9 already?
v
We want provideeeeers everwheeeere 😄
👍 2
ðŸĪŠ 1
c
Need? In addition to what vampire said according to what I read Gradle 9 is going to require Java 17
v
Which is a bad thing, but yeah 😄
y
I don;t think this will be fixed yet - I need to ask - but when using
filter
in Copy/Sync, the Ant filters are no lazy-evaluated which is a pain.
c
It's a good thing. I fundamentally disagree with that!
Death to unsupported versions of java that are now a decade old
y
I don't think JDK17 is going to be that big an impact, because it is now easy to use toolchains to compile for older version of Java anyway.
👍 1
c
I sincerely hope that the DCL isn't going to prevent Gradle 9 from happening
v
It is not unsupported. Java 8 has extended support until 2030 at least. And I have a build that I will not be able to update, as it builds a JavaCard applet and for that it has to use source- and target-version 6 which only works up until Java 11. Well, unless I majorly refactor that to somehow use separate process for that if possible or something like that, but it might not be possible as it would require changing the javacard plugin, ...
c
I don't count extended support 😜 If enterprises are paying for extended support for Java 8 then they can pay Gradle Inc for extended support for Java 8
Anyways, this really isn't going to be a productive conversation. The answer is it will be out when it's out
So I assume we'll be getting 8.13?
y
We support 15+ OSS Gradle plugins, so we write code for maximum compatibility. That is why most of our plugins still support running on JDK8 as far as possible.
👌 1
v
So I assume we'll be getting 8.13?
Yes, current latest release is
v8.13.0-M2
👍 1
c
Yeah my plugins require Java 11 because I refused to not use the var keyword. I would like to move forward though; or at least not feel bad about not supporting Java 8
Gradle 9 supporting Java 11 would have been enough for me
Requiring*
I have seen some plugins that have dependencies on libraries that require 17 though
I do think that it would not be unreasonable, for Gradle to offer a program like Oracle does for supporting versions longer with paid tiers
e
var
should only mean source language 11+, not necessarily target 11+
👍 1
y
> I do think that it would not be unreasonable, for Gradle to offer a program like Oracle does for supporting versions longer with paid tiers I believe that does exist, it is just not publicly advertised. I think Gradle does have some support contracts with certain enterprises.
c
You're right but I don't think I figured out how to do that and I don't have time to look at it this exact second. I think when I tried to make that work I was unsuccessful for some reason. Might not even have been a Java problem but a intelliJ problem
Remind me I need to file a request about IntelliJ supporting different language levels better across different source sets
I set my test sources to Java 21
t
2025 and people still do not know how OpenJDK maintenance works? https://medium.com/@javachampions/java-is-still-free-3-0-0-ocrt-2021-bca75c88d23b Red Hat leads maintenance for OpenJDK 8 until at least November 2026 (and OpenJDK 11 until at least October 2027). Many (most?) OpenJDK vendors will continue to provide OpenJDK builds until that date, that includes Red Hat of course (shorter timeframe for OpenJDK 11 though, already EOL), but also Adoptium's Eclipse Temurin and Azul's Zulu, and then they'll possibly provide paid support for an extended period.
👍 1
s
@Vampire
I will not be able to update, as it builds a JavaCard applet and for that it has to use source- and target-version 6 which only works up until Java 11.
Can't you use the toolchain to build with Java 11 AND set source and target to 6?
v
No, it is not a normal Java compile. It is the Gradle Javacard plugin which internally uses the Javacard Ant task which internally uses the Ant compile task and on that also sets the source and target version according to the Javacard SDK used. So no, not really much that can be done there besides rewriting the whole 3rd-party toolchain.
â˜đïļ 1
ðŸĪĢ 1
t
Projects relying on old tech need to stay on old tech ðŸĪ·
👍 1
s
The Gradle Wrapper should keep it build-able, right?
v
Of course, that's what I said, I will not be able to easily update that project to Gradle 9 if it requires Java 17
e
honestly for JavaCard I wonder if you might be better off just using Ant directly instead of a Gradle plugin that tries to wrap it as that seems to be the "supported" toolchain (insofar as the whole ecosystem is supported)
c
Huh, I thought Java 8 was eol already, my bad. I hope you understand why I thought that given Java 11 is EOL at the same time. Did not Google before opening my mouth
Although it's not exactly as obvious as postgres which was, at some point, defined as 5 years. The Linux kernel used to be 5 years, IRC but I was checking the other day and it's 2 years now
s
Getting way OT, but I was just wondering is the Gradle Wrapper smart enough to run the selected version of Gradle with a JRE that is known to work with that version? Often Gradle won't run on later Java versions because of incompatibilities with things like
asm
or
groovy
. I didn't see anything in the docs with a quick look. This could be a reasonable enhancement to the wrapper so manual setting of JAVA_HOME isn't needed and the wrapper can launch the daemon with a compatible JVM.
c
Although oddly enough that image seems to say that it's skeptical whether or not Java 17 is still supported? Yeah I don't think I know how Java determines the length of time it's lts is supported anymore
When Java decided to move to 11 from 1.8 the whole thing went crazy as far as I'm concerned
👍 1
s
Once you get past 11 things are less painful.
t
The post I linked to is more than 3 years old. Things have evolved a bit since then. You have to refer to your vendor's roadmap; e.g. for Eclipse Temurin: https://adoptium.net/support/ (note that 11 is not EOL there; contrary to RedHat: https://access.redhat.com/articles/1299013)
👍 1
e
@Scott Palmer "compatible jvm" depends on the build isn't something the wrapper can determine. but you can declare it in https://docs.gradle.org/8.8/release-notes.html#gradle-daemon-jvm-configurable-via-toolchain
👍 3
y
Of course, that's what I said, I will not be able to easily update that project to Gradle 9 if it requires Java 17
@Vampire what is preventing you to use a toolchain to keep on building with 11 whilst Gradle itself runs with 17?
c
If I read him correctly he's talking about a plug-in for Gradle that is the problem
And plugins for a Gradle run on the same version of java that Gradle does
s
There are so many enhancements. it is often a big job to keep the build scripts updated to the latest best practices. Though improvements in warning messages etc have helped some, I still have tons of builds with explicit
dependsOn
and other ugliness. I would love a consolidated document that takes me through the migration recommendations.
c
No matter how much they say they aren't there are still cases where explicit depends on is needed
It would be nice if they fixed my bug where I said that it would be better if they had better documentation about which methods are lazy and which ones are not
Or you know just deprecate all the ones that are not
e
it's legitimate to use on a lifecycle task. which tasks are lifecycle? that's not something encoded in the type system (unless you want to get rid of all ad-hoc tasks?)
c
If I recall correctly JaCoco also has some valid use cases depending on what you were trying to achieve
y
Ah, I see now. It is the Gradle Javacard plugin with the issue.
👍 1
v
Yes.
> it's legitimate to use on a lifecycle task > ... if the intended semantic is right too If you have a code generation task and make the
classes
lifecycle task depend on it, that would still be wrong. :-)
s
> I would love a consolidated document that takes me through the migration recommendations. And what do you know.. It is mostly in one place -https://docs.gradle.org/8.12/userguide/upgrading_version_8.html#upgrading-gradle (I need to read the release notes more carefully. I skipped right over that link.)
y
c
Or if you have a single file source code checker that depends on classes, that would still be wrong (me looking at the built-in check style plug-in)
v
@ysb33r a fork of it
p
Another question, would Gradle profit from virtual threads (JVM 21+) if they rewrite all threading/daemon code? ðŸĪ”
c
probably in some areas
but I wouldn't expect that until something like version 15 😉
e
it shouldn't require rewriting. but given how heavyweight some other operations are (claasloader switching, launching external processes) I doubt Java thread context switching is noticeable
👍 1