-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
At the moment, all Flutter Android Kotlin templates contain a dependency on the Kotlin support library. E.g.:
flutter/packages/flutter_tools/templates/app_shared/android-kotlin.tmpl/app/build.gradle.tmpl
Lines 67 to 69 in 0e2f51d
| dependencies { | |
| implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | |
| } |
Starting from Kotlin 1.4, the Kotlin Gradle plugin adds the dependency on the standard library automatically by default: (ref)
You no longer need to declare a dependency on the stdlib library in any Kotlin Gradle project, including a multiplatform one. The dependency is added by default.
The automatically added standard library will be the same version of the Kotlin Gradle plugin, since they have the same versioning.
For platform-specific source sets, the corresponding platform-specific variant of the library is used, while a common standard library is added to the rest. The Kotlin Gradle plugin will select the appropriate JVM standard library depending on the kotlinOptions.jvmTarget compiler option of your Gradle build script.
The current Kotlin version in the templates is 1.6.10:
| const String templateKotlinGradlePluginVersion = '1.6.10'; |
So the explicit dependency to the Kotlin support library dependency is no longer required.