Anyway to control Soong when to pick Android.bp and when not?

纵饮孤独 提交于 2020-12-02 10:34:34

问题


With new build system i.e. "Soong", Android replaced Android.mk with Android.bp. Also Android Q onward, Soong will pick all Android.bp files no matter where all are present. Earlier, For 2 level and 3 level modules, it was not picking up Android.bp file unless instructed by "optional_dirs". Now this too has been deprecated. Quoting from android source code's platform/build/soong/root.bp:

// Soong finds all Android.bp and Blueprints files in the source tree,

// subdirs= and optional_subdirs= are obsolete and this file no longer

// needs a list of the top level directories that may contain Android.bp

// files.

I looked into Soong api and found something called "visibility", using which we can make a package private or public or hidden; but either way it won't stop Soong to pick a package's Android.bp. Now there seems no way to say Soong not to pick a specific Android.bp file for a particular target or for any of the target.

Just to put the question clearly, I should be able to pick and unpick any package's Android.bp based on the target selected at build time. Any help on this would be great.

来源:https://stackoverflow.com/questions/59980476/anyway-to-control-soong-when-to-pick-android-bp-and-when-not

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!