-
Notifications
You must be signed in to change notification settings - Fork 29.1k
Description
$ flutter --version
Flutter 2.10.4 • channel stable • https://github.com/flutter/flutter.git
Framework • revision c860cba910 (12 days ago) • 2022-03-25 00:23:12 -0500
Engine • revision 57d3bac3dd
Tools • Dart 2.16.2 • DevTools 2.9.2
When a new project is created with flutter create ...
the org.jetbrains.kotlin:kotlin-stdlib-jdk7
dependency is added by default in android/app/build.gradle
but it is not strictly correct: as the project by default targets Java 8 it should use the kotlin-stdlib-jdk8
artifact id.
However, it could be best to just remove this dependency altogether because it is added by default by the Kotlin Gradle plugin (https://kotlinlang.org/docs/gradle.html#dependency-on-the-standard-library) - always the correct one and always in the correct version (corresponding to the Kotlin Gradle plugin version). This way any future updates of the artifact id (e.g. when stdlib-jdk11 or whatever comes along and Flutter wants to use it) nothing will need to be done except update the Kotlin plugin version and the target Java version.