'How to use kotlin-android-extensions in AOSP via Android.bp using static_libs?

I am porting my code from using Gradle build system to compiling as a preinstalled app in AOSP builds.

My code is written in Kotlin and uses the functionality of the Gradle plugin kotlin-android-extensions

Till now I found these Kotlin static_libs for putting in the Android.bp file.

static_libs: [
        "kotlin-stdlib",
        "kotlin-reflect",
        "kotlinx_coroutines",
        "kotlinx_coroutines_android",
        "kotlinx_metadata_jvm",
  ],

However, I couldn't find the kotlin-android-extensions static_libs.

How do I enable kotlin-android-extensions on AOSP with Android.bp? Also, I find there is no standard way to find static_libs for specific imports, any help?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source