How the soong/android.bp build works?
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
- ninja is the new build tools for aosp, which using *.ninja to work;
- for the legacy Android.mk, kati is applied to transform Androd.mk to *.ninja;
- google is now using Android.bp file to describe module compile details, which is also transformed to *.ninja by blueprint/soong;
- after all Android.mk is rewrite to Android.bp, kati will be removed, and we will have blueprint/soong/ninja only;
as this link explains.