Closed mr-serjey closed 4 months ago
Hi @boris-petrov and @f4lco, please share your plans regarding this PR, are there any timeline for review, merge, release?
@mr-serjey sorry, I'll merge and release next week.
@mr-serjey thanks again for that! I'll release it the end of this week or beginning of next.
Released! Thanks @mr-serjey!
Gretty plugin run containers as a separate java process using the same java that is used by Gradle.
However since Gradle introduced Toolchains for JVM projects, the expectation is that Gretty plugin will also respect the java toolchain DSL and run containers using the specified JDK instead of one that used by Gradle.
Currently if java toolchain DSL is declared in a project, the classes compiled by the JDK specified there (e.g. v21), at the same time Gretty plugin uses Gradle JDK (e.g. v11), as result the container fails to start since JVM v11 can't load classes of java v21.
This PR purposes changes into Gretty plugin to respect java toolchain DSL:
With the following DSL the project going to use java 21 both to compile classes and to run them in container using Gretty plugin:
Related issue: #261
Complementary changed of tests:
ci.yml
to cover Gradle Java Toolchain functionality (Java 11+17 and java 17+21)docker_integration_tests.sh
that runs all tests inside docker similarly to ci.yml (helped a lot locally on Windows machine)NOTE: This PR is a forward-port of v3.x PR https://github.com/gretty-gradle-plugin/gretty/pull/306