Android.bp files for interlinked subdirectories

1,797 views
Skip to first unread message

Mohammed Shakir

unread,
Aug 8, 2019, 12:50:39 PM8/8/19
to Android Building
Hi Sir/Madam,

I am working on a project where multiple interlinked modules are present. I am trying to make it compile.

For example, my directory structure is like below.

Root
|
|---> Android.bp
|
|---> Module1
|     |
|     |---> Android.bp
|     |
|     |---> inc
|     |
|     |---> src
|     |
|     |---> SubModule
|           |
|           |---> Android.bp
|           |
|           |---> inc
|           |
|           |---> src
|
|---> Module2
|     |
|     |---> Android.bp
|     |
|     |---> inc
|     |
|     |---> src
|
|---> Module3
      |
      |---> Android.bp
      |
      |---> inc
      |
      |---> src


In my case, all three modules linked to each other, so they need to share their header files with each other.

I have tried to use include_dirs: ["inc", "SubModule/inc", "../Module2/inc", "../Module3/inc"] in the Android.bp of Module1, I got 'module
"MyTestApplication" variant "android_common": Path is outside directory
'

Could you please check in to it and give a proper method on how to include these directories to my Makefile.

Colin Cross

unread,
Aug 8, 2019, 1:42:04 PM8/8/19
to android-...@googlegroups.com
Each module should have export_include_dirs: ["inc"], and then anything that links against it will get those headers.

--
--
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/1b012337-ca35-4c4e-84e5-cb0550a27d33%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages