Stefán Freyr Stefánsson01/19/2021, 1:14 PM
Dmitry01/19/2021, 1:32 PM
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
accordingly. Those contains additional extension functions for API’s that were added in those Java versions.
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, use
kotlin-stdlib-jdk7, depending on your JDK version (for Kotlin 1.1.x use
kotlin-stdlib-jre8counterparts were introduced in 1.2.0).
Stefán Freyr Stefánsson01/19/2021, 1:36 PM
Vampire01/19/2021, 2:27 PM
Dmitry01/19/2021, 2:35 PM
Stefán Freyr Stefánsson01/22/2021, 9:45 AM
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.
Cannot access built-in declaration 'kotlin.String'. Ensure that you have a dependency on the Kotlin standard library
Vampire01/22/2021, 10:16 AM
Stefán Freyr Stefánsson01/22/2021, 10:17 AM