Use Java 11 and Kotlin 1.4
'compileJava' task (current target is 11) and 'compileKotlin' task (current target is 1.8) jvm target compatibility should be set to the same Java version.
Since we support AGP 7.x+ https://developer.android.com/studio/releases/gradle-plugin#jdk-11
We can use Java 11 features and no need to add compat. to VERSION_1_8.
Same for Kotlin 1.5, No need to languageVersion = "1.3"
https://developer.android.com/studio/releases/gradle-plugin#incompatibility_with_14x_kotlin_multiplatform_plugin
Should be done for 3.0 GA probably? just to make sure, even if it's breaking :)
Yes if possible, it's not breaking tho, since AGP 7.x requires Java 11, so requiring AGP 7.x is already the breaking change by itself.
Bumping to Java 11 lead me to this issue https://youtrack.jetbrains.com/issue/KT-48745
Bumping to Java 11 lead me to this issue youtrack.jetbrains.com/issue/KT-48745
That is just a warning though, no?
Yes, but since there are many ways of setting source/target compatibility, plus language version compatibility on Kotlin etc, I was unsure of the correct way since the Warning was never gone, not a high priority for now, when Bumping to Kotlin 1.6, the warning should be gone anyways.