Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is there no kotlin-stdlib-jdk11?

Tags:

kotlin

I'm using Kotlin for backend development...

Is it because Kotlin 1.4 already supports it? Or kotlin-stdlib-jdk8 would suffice? Or Kotlin does not have plans to support JDK 11?

Please enlighten me.

Thanks!

like image 563
phfsck Avatar asked Jan 15 '21 06:01

phfsck


People also ask

What is kotlin Stdlib?

Kotlin Standard Library. The Kotlin Standard Library provides living essentials for everyday work with Kotlin. These include: Higher-order functions implementing idiomatic patterns (let, apply, use, synchronized, etc). Extension functions providing querying operations for collections (eager) and sequences (lazy).

Does kotlin support Java 11?

Can I use Kotlin for Android development? Yes.

Does kotlin support Java 17?

Increase your visibility. JetBrains has released IntelliJ IDEA 2022.2 featuring support for Java 17 and the latest languages and frameworks such as Scala, Kotlin, Spring 6 and Spring Boot 3.

What is kotlin bom?

The kotlin-bom artifact is a dependency-only POM that aligns all the Kotlin SDK libraries with the same version. See the POM content for version 1.5.


1 Answers

TL;DR kotlin-stdlib-jdk8 can be successfully used with JDK 11.

The motivation of splitting binaries by JDK 1.7 and JDK 1.8 is the dependency of the jdk8 artifact on some APIs not available (e.g., ThreadLocalRandom) in older Java versions.

Currently, there is no need for a special standard library artifact for JDK 11 because Kotlin doesn't provide any APIs depending on it.

Update: just in case, if you use Kotlin Gradle Plugin, you don't need to specify Kotlin's standard library dependency manually since the plugin adds it to all the Kotlin source sets automatically.

like image 173
Commander Tvis Avatar answered Oct 08 '22 23:10

Commander Tvis