Avoid Androdi.bp execution not being declared in subdirs

392 views
Skip to first unread message

seeker

unread,
Nov 2, 2019, 6:30:37 PM11/2/19
to Android Building
Hello,
lets say a folder X  has a,b,c,d and e as subfolders and  I encountered a case where X's Android.bp includes subdirs=[a,b,c,d] and not e, and when executed on  a whole  despite of not including e in subdirs,  e's Android.bp is getting executed 
How to avoid this?
And Can I get knowledge on how many levels of Android.bp will be included by default? or any Android.bp from top will be included by default?
Thanks in advance:)

Dan Willemsen

unread,
Nov 2, 2019, 6:37:31 PM11/2/19
to Android Building
Which version of Android are you using? Starting in Android P (IIRC), `subdirs` stopped doing anything, and we always load all Android.bp files (nothing really gets executed when they're loaded -- they're just used to build the action graph that we later execute). Depending on your use case, `soong_namespace`s can partition different subtrees of Android.bp files away from others.

- Dan

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-buildi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/59b113e2-aec7-4935-8991-874ff04102ff%40googlegroups.com.

seekers here

unread,
Nov 3, 2019, 1:56:03 PM11/3/19
to android-...@googlegroups.com
Thanks Dan
Initially I tried declaring soong_namespace{ imports :["","",""],}  but faced build errors like module "soong_namespace": namespace does not exist !
Later assigned in the following way
PRODUCT_SOONG_NAMSPACES= a b c d
then I faced the build errors saying variable e is not set. Can u please help me regarding this
Thanks in advance


seekers here

unread,
Nov 4, 2019, 12:28:48 PM11/4/19
to android-...@googlegroups.com
Can u give an example of how and where to use soong_namespace
Thanks in advance

On Sun, Nov 3, 2019 at 4:07 AM 'Dan Willemsen' via Android Building <android-...@googlegroups.com> wrote:
Reply all
Reply to author
Forward
0 new messages