https://kotlinlang.org logo
Title
l

louiscad

05/14/2020, 7:39 PM
@jw I've seen you often advocate for usage of
stdlib-jdk8
in Android, but @mbonnin research came to the conclusion that
stdlib
(not
stdlib-jdk7
) is often the best. I think I disagree since
Autocloseable.use { ... }
is quite useful for some Android APIs exposing it, and is part of
stdlib-jdk7
, but I've yet to see content
stdlib-jdk8
being used in actual Android apps, and it seems the best it has to offer is not used by Android apps because of ineffective way to determine runtime capabilities as ART isn't technically a JRE-8. If you can confirm what this article says, who can/should make the
stdlib-jdk8
content work on Android as it should? The D8/R8 team? The Kotlin team? The platform team, meaning only Android several years from now will get it? https://medium.com/@mbonnin/the-different-kotlin-stdlibs-explained-83d7c6bf293
m

mbonnin

05/14/2020, 10:56 PM
stdlib
 (not 
stdlib-jdk7
) is often the best.
Depends your use cases of course but if not using anything from
stdlib-jdk7
or
stdlib-jdk8
, I don't really see the point of including them indeed
Autoclosable.use { ... }
 is quite useful for some Android APIs exposing it
Do you have an example ?
l

louiscad

05/15/2020, 6:48 AM
@mbonnin Camera2 API has a bunch of
AutoCloseable
classes
👍 1