sentry-android-gradle-plugin icon indicating copy to clipboard operation
sentry-android-gradle-plugin copied to clipboard

Use Java 11 and Kotlin 1.4

Open marandaneto opened this issue 3 years ago • 5 comments

'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

marandaneto avatar Feb 04 '22 08:02 marandaneto

Should be done for 3.0 GA probably? just to make sure, even if it's breaking :)

romtsn avatar Feb 04 '22 09:02 romtsn

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.

marandaneto avatar Feb 04 '22 09:02 marandaneto

Bumping to Java 11 lead me to this issue https://youtrack.jetbrains.com/issue/KT-48745

marandaneto avatar Mar 02 '22 13:03 marandaneto

Bumping to Java 11 lead me to this issue youtrack.jetbrains.com/issue/KT-48745

That is just a warning though, no?

cortinico avatar Mar 02 '22 23:03 cortinico

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.

marandaneto avatar Mar 03 '22 07:03 marandaneto