Let's look at the build system of Android.
Android uses a build system named soon.
You might have also heard that Android also uses the build systems like Make Katie and Ninja.
Let's see what role these all systems play in building Android.
The Android Build System uses Android blueprint files and Android make files to build the Android OS.
As you might have already noticed, there are two types of build files that are BP blueprint files and
standard emmc make build files.
Why should Android use two types of build files?
Historically, before Android seven Android use the make build system to build Android.
So that means.
Earlier it was only using download files before Android seven.
So the problem was that the build was pretty slow, error prone and scalable and it was also difficult
to test for the developers.
So Google decided to improve the build system.
So then Google decided to use the new build system named soon.
Sony is basically the replacement of the old Android make build system.
It replaces Android MK files with the Android dot BP files.
So Android P files are similar to the JSON syntax.
The Aosp theme is still converting the make files.
So these make files into the BP files, but it's not yet completed.
That's why there are still many make files in the system.
All the standard files will be gradually cleaned up in one of the future versions of Android.
So that is the reason.
Basically we are seeing two types of files for building the system.
So the Android or BP files are there to stay and Android files will be replaced in future.
The new song Build System passes through the BP files or the blueprint files and outputs a ninja build
file.
Zoom also uses a tool named Katie to convert the make files into ninja files, and these ninja files
are an input to the ninja build system.
Under the build folder we could find make build system and the so built system there are many other
supporting packages as well.
The make build system or the Katie Build system is basically a clone of the original make build system,
so you can find more information about the build system in the read me here.
And the basic purpose of Katie is to convert the make files, the DOT MK files into the Ninja files
and the new songbird system.
So this is basically written in programming language and the song build system basically converts the
standard BP files into the ninja files.
As we understood so far, the DOT BP files and the make files are getting converted into the ninja format.
The simple system converts the BP files into ninja files and the Katie build system converts the make
files into the ninja files.
So at the end there is ninja build file and these ninja build files are the input to the ninja build
system.
You can find all these ninja files under the out folder.
So out folder is where we have all the build intermediate files.
So here you can find the ninja files.
This is generated by Katie and this is how a ninja build file looks like.
And this is the input to the ninja build system.
This ninja built file is then passed by the Ninja Build System to build the required Android OS files.
So these include compiled shared objects, the standard so files, Java archives, the starter jar files
apps, the standard APK files and the executables.
So at the end, the Ninja build system converts all these ninja build input files into the Android OS
files.