Google introduced Soong build system the replacement of old makefile system.
Have any idea about how it works? What is this Android.bp in the sources?
What is Soong? The Soong build system was introduced in Android 7.0 (Nougat) to replace Make. It leverages the Kati GNU Make clone tool and Ninja build system component to speed up builds of Android.
Android now uses the Soong build system for simpler test configuration. Soong uses Blueprint or . bp files, which are JSON-like simple declarative descriptions of modules to build. This format replaces the Make-based system used in previous releases.
The syntax of the Android.mk allows you to group your sources into modules. A module is either a static library, a shared library, or a standalone executable. You can define one or more modules in each Android.mk file, and you can use the same source file in multiple modules.
Android Studio uses Gradle, an advanced build toolkit, to automate and manage the build process, while allowing you to define flexible custom build configurations. Each build configuration can define its own set of code and resources, while reusing the parts common to all versions of your app.
as this link explains.
Only Googlers can probably explain, some basic documentation is here:
https://android.googlesource.com/platform/build/soong/
Try search Google groups as well:
https://groups.google.com/forum/#!topic/android-building/0Hy7kLwlBBk
Note that in Oreo Android.mk files continue to work and can depend on Android.bp files, however Android.bp files cannot depend on Android.mk files. Apparently more and more of the build system will be converted to Android.bp as time goes on, hopefully Google does a better job with documentation.
UPDATE Jan 2020
More info added by Google here: https://source.android.com/setup/build/index
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With