I'm working on migrating an Android library to
KMP and reading through the following
guide on the Android developer site has me confused. In the guide the following quote indicates
androidLibrary{}
is no longer recommended.
The guide contains the following excerpts:
Note: Since Kotlin Gradle Plugin version 2.2.0-Beta2 and Android Gradle Plugin version 8.12.0-alpha04, a new configuring block exists called android{}
alongside the androidLibrary{}
one. The androidLibrary{}
block is deprecated and will be removed in a future release of AGP, so migrate to the android{}
block.
This seems contradictory because adding a new
KMP module in my project, it creates build.gradle.kts file that contains an
androidLibrary {}
. I'm using
Android Studio Narwhal 3 Feature Drop and I have the most update to date version of the Kotlin Multiplatform plugin (
0.9-251.26094-AS-85).
Furthermore, there is additional code snippets in the guide that use
androidLibrary {}
. Can anyone lend some expertise on the subject and help clear up my confusion?