This message was deleted.
# general
s
This message was deleted.
v
Depends on how you define "target JVM". There can be multiple JVMs involved in a build. For example if you use Java Toolchains in the build.
d
those are old (rather simple) builds so they won't be using toolchains and it is highly unlikely they would be relying on multiple JVMs
what we are trying to do is automatically figure out the appropriate JVM to build project on GH action
if nothing works we can use a default and ask folks to fix their builds if needed
v
Well, if no toolchains are used and no executable is set on the individual tasks, then the used JVM is the one used to run Gradle
Or did I still misunderstand what you mean?
d
Well, if no toolchains are used and no executable is set on the individual tasks, then the used JVM is the one used to run Gradle
thats our problem 🙂 i.e. if app specifies target JVM 8 and relies on some deprecated features but we try to configure env with Java 17 then the build will blow up
so was hoping we could do something along the lines
gradle properties | grep targetCompatibility
-> set target JVM based on the above
but sadly that doesn't work
v
You can probably use an init script to add a task that gives you the information you want. But you have to consider that you can also set this on various places. But you probably are interested on the value of the compile tasks, not of some property or the java extension.
👍 1