Closed wyaeld closed 11 months ago
@wyaeld I've created a PR to set the JVM target version for Kotlin templates through Gradle/Maven.
I could reproduce your error. Calling an inline method without setting the JVM target version, I got the same error as you did test.TemplateEngineTest#helloInlineMethod$kte_runtime_test_gradle_kotlin_convention_test
. After setting the JVM target version the test passes.
It would be nice to adopt this setting from Gradle automatically. I left a note on the PR, if you have an idea how to accomplish this, let me know :-)
Fix looks nice and easy to use, I'm afraid I'm as lost as you are trying to understand how to interact with Gradle on something like this.
Sorry, merging the PR automatically closed this issue.
I'll release a new jte version this evening after work.
@wyaeld I just released jte 3.1.4 containing a fix for this issue.
I pulled in 3.1.4 and confirmed it fixes the jte issue, thanks.
This is in a multi module project with a lot of Ktor
I'm encountering this error
Now
page.href
is a function that is proxying of the Ktor Resources Plugin, it looks like the below code. The catch is that the underlying function needs theinline
andreified
modifies.I have tried everything I can think of to get Jte to compile at a Jvm Target of 17, to match the rest our project. I'm a little stumped why none of these work. Right now I - temporarily - have all of this in file
None of it makes a difference. Both precompiled templates and the runtime ones with DirectoryCodeResolver emit at Java 8 level.