What is Ninja?

Ninja is a build system which replaces the GNU make in AOSP

  • Up to Marshmallow / 6,0 the build system was based on GNU Make
  • In Nougat / 7.0 and later, the build is run by ninja
  • Ninja works from a pre-processed manifest generated by kati and soong

kati

kati converts Android.mk files into ninja manifests

soong

soong converts blueprint files (Android.bp) into ninja manifests

Example bp file

https://android.googlesource.com/platform/system/core/+/refs/tags/android-11.0.0_r46/logcat/Android.bp

Further reading

https://ninja-build.org/