I’m new to Kotlin and currently exploring the standard library and noticed that there were JRE 7 and 8 specific extensions which depended on the stdlib.
When I created an Android test project, it specified the JRE7 flavour. My questions are:
- What are these extensions for and where are they documented?
- If for Android we use minSDKVersion of 24 or higher, is the JRE8 extension dependency ok to use?
Thanks!
1 Like
Ditto! Bump, if anyone knows?
They also show as deprecated in Maven Central (https://mvnrepository.com/artifact/org.jetbrains.kotlin) so it adds to the fun.
The standard library extension artifacts are documented as a part of the standard library documentation.
In case of some API is located in the extension artifact it gets the respective badge. For example note JRE8
badge on the kotlin.streams
package.
As for the artifacts themselves, you should use kotlin-stdlib-jdk7/8
as of Kotlin 1.2, and kotlin-stdlib-jre7/8
are deprecated due to the reasons explained in the “What’s new in 1.2” article.
By the way, I recently found, that kotlin-stdlib-jdk8 does not contain all of the methods that are present in kotlin-stdlib-jre8. For example I could not find stream to sequence conversion. Maybe it is fixed already?
Yes, I see it now. Maybe it was older version or dependency cache corruption.