Stefán Freyr Stefánsson
01/19/2021, 1:14 PMDmitry
01/19/2021, 1:32 PMjdk-8 currently is what you want to use.
To answer “why” we want to talk about history a bit.
Main “stdlib” can be used for Java 1.6.
This is important to keep backward compatibility, especially when we think about folks developing for android back in the days when Kotlin first emerged.
But Java moved forward and Java 1.7, and then Java 1.8 released.
So, you get stdlib-jdk7 and stdlib-jdk8 accordingly.
Those contains additional extension functions for API’s that were added in those Java versions.Dmitry
01/19/2021, 1:34 PMDmitry
01/19/2021, 1:35 PMMaven page: https://kotlinlang.org/docs/reference/using-maven.html
If you’re targeting JDK 7 or JDK 8, you can use extended versions of the Kotlin standard library which contain additional extension functions for APIs added in new JDK versions. Instead of, usekotlin-stdliborkotlin-stdlib-jdk7, depending on your JDK version (for Kotlin 1.1.x usekotlin-stdlib-jdk8andkotlin-stdlib-jre7as thekotlin-stdlib-jre8counterparts were introduced in 1.2.0).jdk
Stefán Freyr Stefánsson
01/19/2021, 1:36 PMVampire
01/19/2021, 2:27 PMDmitry
01/19/2021, 2:35 PMStefán Freyr Stefánsson
01/22/2021, 9:45 AMCannot access built-in declaration 'kotlin.String'. Ensure that you have a dependency on the Kotlin standard library
Doesn’t seem to work for me. Is this maybe new in 1.4 @Vampire? I have a Quarkus project that seems to still be dependant on 1.3.Vampire
01/22/2021, 10:16 AMStefán Freyr Stefánsson
01/22/2021, 10:17 AM