Avatar ·

How to configure JVM compatibility for compileJava (Java 11) and compileKotlin (Kotlin 1.8) in build.gradle.kts?

Hi everyone! I'm new to Kotlin and Gradle, and I'm having trouble configuring JVM version compatibility for Java and Kotlin in a project. I'm using Gradle with Kotlin DSL (build.gradle.kts). The project has mixed code: mainly Kotlin 1.8, and a few Java 11 classes. When I run the build, Gradle throws errors that compileJava and compileKotlin tasks use different target JVM versions. For example: - compileJava is configured for Java 11 (target = 11) - compileKotlin is configured for Java 8 (default) I want both compilers to use the same JVM version, for example Java 11. But how do I properly configure this in build.gradle.kts? I've tried different options but nothing works. Here's my current build.gradle.kts file: ```kotlin plugins { java kotlin("jvm") version