[AOSP] Android Build System - Soong

정은·2024년 3월 4일
0
post-thumbnail

posted based on udemy video - Android OS Internals 😁

Android Build System

The Android Build System uses Android blueprint files (Android.bp) and Android make files (Android.mk) to build the Android OS.

💡 Why should Android use two types of build files?

Before Android 7.0 (Nougat), Android use the Make Build System to build Android.

Earlier it(.mk) was only using download files before Android 7.

Problem

  • pretty slow
  • errorprone
  • unscalable
  • difficult to test

And then Google decided to use the new build system named Soong.
Soong is basically the replacement of the old Android Make Build System.

Androd.mkAndroid.bp

Android.bp files are similar to the JSON syntax.

The theme is still converting the Make Files.
So make files into the .bp files, but it's not yet completed.
That's why there are still many make files in the system.

So that is the reason, Basically we are seeing two types of files for building the system.
The Android.bp files are there to stay and Android.mk files will be replaced in future.

Soong Build System

  • [Input] *.bp (blueprint files)soong build logic[Output] *.ninja build files
  • [Input] *.mk (make files)Kati[Output] *.ninja build files
  • [Input] *.ninja build files → Ninja build System[Output] *.so, *.apk, *.jar

The Ninja build system converts all these ninja build input files into the Android OS.

profile
정니의 이런거 저런거 기록 일지 😛

0개의 댓글