This is from a Android using kotlin.
From the screenshot below the Java version would be the JDK that I have currently configured in my Android Studio IDE.
The Java Version is the version of the JDK, and the Gradle Version is referring to the gradle wrapper
In my gradle.wrapper properties I have the following
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
That means I should set my JDK to use version 16

The gradle version would be referring to what I have set in the gradle wrapper.
And the embedded kotlin version would be referring to the version of kotlin currently I have the following:
val kotlin_version = "1.5.20" So my Gradle wrapper should be 7.0
But I am unsure of the third column koltin language version As the latest version of kotlin is 1.8

That means I should set my JDK to use version 16
No. The list that you show is meant the other way: If you have installed JDK version 16, you must use Gradle version 7.0 or later. But you can still use Java 1.8 to run Gradle 7.6.
According to the very first sentence at https://docs.gradle.org/current/userguide/compatibility.html:
A Java version between 8 and 19 is required to execute Gradle. Java 20 and later versions are not yet supported.
And for the Kotlin version: that is the Kotlin version that Gradle uses internally (for internal tooling and .kts build scripts).
Nothing prevents you from using the latest Kotlin version 1.8 in your project files.
The compatibility between Kotlin and Java is a separate topic.
The release notes for Kotlin 1.8 (https://kotlinlang.org/docs/whatsnew18.html) state:
Starting with version 1.8.0, the compiler can generate classes with a bytecode version corresponding to JVM 19.
And (under https://kotlinlang.org/docs/whatsnew18.html#updated-jvm-compilation-target):
In Kotlin 1.8.0, the standard libraries (kotlin-stdlib, kotlin-reflect, and kotlin-script-*) are compiled with JVM target 1.8. Previously, the standard libraries were compiled with JVM target 1.6.
Kotlin 1.8.0 no longer supports JVM targets 1.6 and 1.7.
Together that means that you can use Kotlin 1.8 with JDK version 1.8 to 19.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With