Propobably would be better for other users of you source tree if conan downloaded content is kept in some repo more or less as cache, so no networking is needed at build time and still git sha1 can uniquely identify state of dependencies.
Maybe conan update should be closer to "repo post-sync" action? BR, K Get Outlook for Android<https://aka.ms/ghei36> ________________________________ From: 'Dan Willemsen' via Android Building <android-building@googlegroups.com> Sent: Friday, September 20, 2019 8:08:52 PM To: Android Building <android-building@googlegroups.com> Subject: Re: [android-building] $shell commands in Android.mk -> Android.bp migration. You'll need to execute conan before running the android build. It's not enforced yet, but the source tree is expected to be read-only during the build -- in particularly we start caching the Android.bp files nearly immediately upon build startup, so adding new ones isn't going to work. Nothing from the Android.bp files are executed before we finish reading all the Android.bp files. - Dan On Fri, Sep 20, 2019 at 1:51 PM 'NIRAJ DESAI' via Android Building <android-building@googlegroups.com<mailto:android-building@googlegroups.com>> wrote: I have a similar need I am trying to integrate the conan package management system. I have written a custom generator for conan that creates an Android.bp file with the appropriate targets that are downloaded via conan I need to run a script that will install these dependencies during build time. My file structure is: - vendor/mycompany/external/Android.bp - vendor/mycompany/external/conanInstallDependencies.sh - vendor/mycompany/conan/conanfile.txt I am able to run the script using $(shell) via Android.mk but I am not sure how to integrate Android.mk and the Android.bp that uses the conan deps to ensure the build order is satisfied It works with Android.mk, but I have to run the build twice. - First build iteration will download the dependencies via Conan and place them in the proper folder location but the build will fail because the Android.bp that is generated by Conan is not executed - Second build iteration will find the existing Android.bp that was generated by Conan and the build will succeed I essentially want to create a target that is called "conanInstallDependencies" This target would be simple, it will only invoke the "conanInstallDependencies.sh" script I would want the Conan-generated Android.bp to "link" or "be dependent" on the "conanInstallDependencies" target so that this Android.bp is always built after the "conanInstallDependencies" Android.bp On Thursday, August 22, 2019 at 11:18:41 AM UTC-7, Dan Willemsen wrote: What is your pre-build-script.sh script doing? Right now, since it has no dependencies and no output files, you're essentially running it on every build, even when the user is only trying to compile a single file in a different section of the tree. That's deprecated since it has a huge performance impact. Generally, if this is something that takes inputs and produces output files, you may be able to use a genrule. But without knowing anything about what this script is doing, I can't help much more than that. - Dan On Tue, Aug 20, 2019 at 2:40 PM Frederic Plourde <fredinf...@gmail.com> wrote: Hi android building ! I used to have this in one of my Android.mk makefiles : $(shell (cd $(LOCAL_PATH)/../../ && ./pre-build-script.sh)) but I just noticed that this practice is now discouraged on the Soong Android.bp build system >From the Build System Best >Practices<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fandroid.googlesource.com%2Fplatform%2Fbuild%2Fsoong%2F%2B%2FHEAD%2Fdocs%2Fbest_practices.md&data=02%7C01%7Ckrzysztof.wesolowski%40volvocars.com%7C6c91d8ebef7742f07d5208d73df5a57a%7C81fa766ea34948678bf4ab35e250a08f%7C0%7C0%7C637045997635575163&sdata=CDZQRa8UbPGHTmJXG5r9A2PsId8dOM4inq5y5gTSyNg%3D&reserved=0> > document, I could read : Don't use $(shell) to write files, create symlinks, etc. We expect to enforce this in the future. Encode these as build rules in the build graph instead. This can be problematic in a number of ways: Could you give me a concrete example of how I could run this "pre-build-script.sh" shell script before *every* build in my new Android.bp file ? thx :) Frederic Plourde Principal Engineer Collabora ltd. -- -- 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-...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-building?hl=en<https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgroups.google.com%2Fgroup%2Fandroid-building%3Fhl%3Den&data=02%7C01%7Ckrzysztof.wesolowski%40volvocars.com%7C6c91d8ebef7742f07d5208d73df5a57a%7C81fa766ea34948678bf4ab35e250a08f%7C0%7C0%7C637045997635575163&sdata=KxCtE3sEk5ttJxWqGiQ6Uw7rW2XiRHfWMW%2FK9BL9SSM%3D&reserved=0> --- 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-...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/1131b0a7-0656-4813-9226-c233f3c2a05c%40googlegroups.com<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fandroid-building%2F1131b0a7-0656-4813-9226-c233f3c2a05c%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=02%7C01%7Ckrzysztof.wesolowski%40volvocars.com%7C6c91d8ebef7742f07d5208d73df5a57a%7C81fa766ea34948678bf4ab35e250a08f%7C0%7C0%7C637045997635575163&sdata=UwAKtYzkzlLyDI9RQ30wg1NcYo%2B1RKU05dF2DMpzO7k%3D&reserved=0>. -- -- You received this message because you are subscribed to the "Android Building" mailing list. To post to this group, send email to android-building@googlegroups.com<mailto:android-building@googlegroups.com> To unsubscribe from this group, send email to android-building+unsubscr...@googlegroups.com<mailto:android-building%2bunsubscr...@googlegroups.com> For more options, visit this group at http://groups.google.com/group/android-building?hl=en<https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgroups.google.com%2Fgroup%2Fandroid-building%3Fhl%3Den&data=02%7C01%7Ckrzysztof.wesolowski%40volvocars.com%7C6c91d8ebef7742f07d5208d73df5a57a%7C81fa766ea34948678bf4ab35e250a08f%7C0%7C0%7C637045997635575163&sdata=KxCtE3sEk5ttJxWqGiQ6Uw7rW2XiRHfWMW%2FK9BL9SSM%3D&reserved=0> --- 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-building+unsubscr...@googlegroups.com<mailto:android-building+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/8627b939-8c30-49fa-86cf-32c142de15c7%40googlegroups.com<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fandroid-building%2F8627b939-8c30-49fa-86cf-32c142de15c7%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=02%7C01%7Ckrzysztof.wesolowski%40volvocars.com%7C6c91d8ebef7742f07d5208d73df5a57a%7C81fa766ea34948678bf4ab35e250a08f%7C0%7C0%7C637045997635575163&sdata=LpLtDSVJnH3G8ltveWoa8AEzy8vd2L55TsjTz9seu%2Bc%3D&reserved=0>. -- -- You received this message because you are subscribed to the "Android Building" mailing list. To post to this group, send email to android-building@googlegroups.com To unsubscribe from this group, send email to android-building+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-building?hl=en<https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgroups.google.com%2Fgroup%2Fandroid-building%3Fhl%3Den&data=02%7C01%7Ckrzysztof.wesolowski%40volvocars.com%7C6c91d8ebef7742f07d5208d73df5a57a%7C81fa766ea34948678bf4ab35e250a08f%7C0%7C0%7C637045997635575163&sdata=KxCtE3sEk5ttJxWqGiQ6Uw7rW2XiRHfWMW%2FK9BL9SSM%3D&reserved=0> --- 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-building+unsubscr...@googlegroups.com<mailto:android-building+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/CALQgHdktduafwpT42mEiFyHrz%3D%2Bht%2BtZRN5PUg%2BZoeXKwg1wBA%40mail.gmail.com<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fandroid-building%2FCALQgHdktduafwpT42mEiFyHrz%253D%252Bht%252BtZRN5PUg%252BZoeXKwg1wBA%2540mail.gmail.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=02%7C01%7Ckrzysztof.wesolowski%40volvocars.com%7C6c91d8ebef7742f07d5208d73df5a57a%7C81fa766ea34948678bf4ab35e250a08f%7C0%7C0%7C637045997635575163&sdata=1HoxLinCmkJqj0XD2HH5DcEFtfK5vYbek%2BqtPTEVeAw%3D&reserved=0>. -- -- You received this message because you are subscribed to the "Android Building" mailing list. To post to this group, send email to android-building@googlegroups.com To unsubscribe from this group, send email to android-building+unsubscr...@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-building+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/VE1P174MB0078583A4CA42E163F9A423591850%40VE1P174MB0078.EURP174.PROD.OUTLOOK.COM.