Reputation: 7718
I’m trying to understand desugar_jdk_libs
and the impact on a minSdk=23
APK.
Having recently added the kotlinx datetime API, I noticed the app was crashing on older versions of Android due to the lack of java.time.Instant
. So I'm enabling desugaring.
One key area of confusion, is how the gradle properties sourceCompatibility
, targetCompatibility
and kotlinOptions { jvmTarget = ... }
impact the results.
From what I can gather, these should all be set to the same thing.
Similarly, which version of desugar_jdk_libs
to use because 1.1.* is supposedly for JDK 7, whereas 1.2.* is for JDK 11. How do these JDK levels correspond to the ones mentioned above?
I've briefly tested my app using JDK 8, 11 and 17, and they all seem to work.
Which JDK version should I use, and why?
Upvotes: 1
Views: 68