Velocity icon indicating copy to clipboard operation
Velocity copied to clipboard

Set proxy to build with Java 11 compatibility

Open BBaoVanC opened this issue 3 years ago • 9 comments

Not sure if this is the correct way to do it, but I use Java 18 on my system and building Velocity results in the proxy jar not being compatible with Java 17.

BBaoVanC avatar Jul 31 '22 20:07 BBaoVanC

I don't think this change is so necessary, it would only affect custom builds, and in that case, everyone can modify Velocity as required

4drian3d avatar Jul 31 '22 20:07 4drian3d

What do you mean by custom builds?

BBaoVanC avatar Jul 31 '22 20:07 BBaoVanC

I mean that if you clone the project directly or through a fork it will affect when compiling on your own, but for the official Velocity distribution it will not have any effect

4drian3d avatar Jul 31 '22 20:07 4drian3d

to my understanding, one should set it through the toolchain, that way it can do other stuff like ensuring that pulled in stuff is compatible with 11 and that the final output supports 11

electronicboy avatar Jul 31 '22 20:07 electronicboy

to my understanding, one should set it through the toolchain, that way it can do other stuff like ensuring that pulled in stuff is compatible with 11 and that the final output supports 11

So do you mean that I should set my system's Java version instead when building? It's kind of annoying to do that, I feel like it makes the most sense for it to build properly automatically, instead of needing to be set properly in CI, or on your own system or whatever.

BBaoVanC avatar Jul 31 '22 20:07 BBaoVanC

No, I mean using he gradle toolchain system, which basically properly sets the JVM release, etc, properly

electronicboy avatar Jul 31 '22 20:07 electronicboy

Like this, in 8b87ca3e87bb5ac189c5170a904f02619572686f?

BBaoVanC avatar Jul 31 '22 21:07 BBaoVanC

yes

electronicboy avatar Jul 31 '22 21:07 electronicboy

I also see that in api/build.gradle and native/build.gradle, it uses sourceCompatibility and targetCompatibility to set the Java version. Should this be changed to Gradle toolchain as well?

BBaoVanC avatar Aug 19 '22 00:08 BBaoVanC

I went ahead and made this change as part of the conversion of Velocity to use Gradle's Kotlin DSL

astei avatar Jan 01 '23 23:01 astei