hey guys:
• using java 20, trying to play with project panama
• using kotlin
• built some code with rust
• want: use gradle to compile some kotlin running against java 20 with
java.lang.foreign
(an --enable-preview in java 20)
I have this very strange behaviour where intelliJ (with a gradle imported project) is able to find
java.lang.foreign
, but gradle is not. I do have gradle itself running on java 17, (I Believe), and I've used `
i guess... does a beta gradle 8.0.0 support java 20?
t
tapchicoma
10/12/2022, 3:54 PM
better to ask it in Gradle community slack
tapchicoma
10/12/2022, 3:57 PM
for Kotlin specifically you could try to use:
Copy code
tasks.withType<UsesKotlinJavaToolchain>().configureEach {
kotlinJavaToolchain.jdk.use(
"/path/to/local/jdk20", // Put a path to your JDK
JavaVersion.VERSION_20
)
}
g
groostav
10/24/2022, 8:04 PM
@tapchicoma thanks, i didnt get back but this worked. I specified that I wanted java 20 and then added a 'custom" java 20 to the toolchain in a config file somewhere (any readers, ping me and ill dig it up for you)