Search code examples
androidmakefilekotlinbazelbuild-system

Is it possible to build an Android app that uses Kotlin with make or Soong?


I'm working on an Android app that gets built into the system image, and I'd like to add Kotlin support to it.

Currently it builds with Gradle (regular development) and make (Android.mk, system build). Adding Kotlin support to Gradle is very smooth, but I'm stuck on the make based parts. I'm thinking of moving the make based parts to Soong, after seeing that it's somewhat similar to Bazel (at least semantically, what about feature wise?), which seems to support building Android apps. I realize this is a rare setup, and I haven't found any examples where Kotlin is used with make or Soong.


Solution

  • With the latest AOSP it's now possible to build system apps written in Kotlin with Soong, with some limitations. See https://github.com/jzoran/kotlin-privapp for more details.