heihei blog

Blog icon by Unsplash https://unsplash.com/@virussinside

Kotlin 1.4からStdlibの依存の記述がいらなくなるらしいメモ

f:id:shoheikawano:20200930231113j:plain

Photo by Marc Reichelt on Unsplash

タイトルのとおりですが、Kotlin 1.4のバージョンから、Kotlin Gradle projectではStandard Library org.jetbrains.kotlin:kotlin-stdlib-* の依存の指定が要らなくなるようです。 これは、Kotlin 1.4の記事にも記載されています。

What's New in Kotlin 1.4 - Kotlin Programming Language

Dependency on the standard library added by default 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.

以下のコミットをたまたま見つけて、調べてみたら、あらそう書いてある、という感じでした。

github.com

Android、KMPなどのKotlinを使ったプロジェクトを開発している方はgradleまわりの記述を少し減らせるかもしれませんね。 雑メモ以上です〜✍