From Android 7.0 Google started using a new approach/solution as a build system to make it easier to test and get rid of error-prone. To understand and have a big picture of what’s going on in the Android build system we need to speak about 3 different tools: Soong, Kati and Ninja. Don’t worry the last one doesn’t relate to any combat sport.
Soong Build System
As I mentioned before Google has utilized a new solution after Android 7.0. Before that Android was using GNU Make but by introducing Soong build system more flexibility has been brought to it and a faster process at the Android scale has been provided. To explain what it means, we need to know what GNU has been replaced. The answer is Soong & BluePrint file. Makefiles (.mk) will be replaced in the not too far future with blue-print (.bp) files however many of them have been converted to blue-print until now. I’ll discuss BluePrint files in another article.
You can find more information in the link below
https://android.googlesource.com/platform/build/soong/+/refs/heads/master/README.md
Kati
Google came to the conclusion that the GNU Make system is too slow for a specific project such as Android. Because it was important to have a good performance in null build and either full build. Sometimes you might have a situation in between. Some options were brought to the table. Developing a new build system from scratch, optimizing GNU Make or having a short-term solution. The third one was what they decided to work on. So, Kati as a short-term project was born by aiming to convert Makefiles (.mk) to ninja files (.ninja). The first version was developed by Go but due to the slowness of Go in processing long make files and etc, the project was rewritten with C++. Finally, Kati has brought a better incremental building to Android.
Kati project link :
https://github.com/google/kati
Ninja
In two major respects, Ninja was started developing by Evan Martin: to run builds as fast as possible and being like an assembler using the generated output of high-level tools. Besides, it has another improvement regarding the incremental building. nowadays many build systems such as CMake, Blade build, Kati, Blueprint, make and many others can generate ninja-compatible output files to be used in the Ninja build system.
Link to Ninja project: