Re: [android-building] Android.bp: target post processing

Skip to first unread message

Jingwen Chen

Aug 9, 2022, 2:48:31 AM8/9/22
If your post-processing is hermetic (i.e. fully defined inputs and outputs, with no interaction with the outside world), then a genrule will do the job.

Otherwise, I don't think it's something that the build system should be responsible for. Can you invert it, i.e. have your script be the entry point, and make it call the build system to post-process the outputs?

On Fri, Aug 5, 2022 at 7:33 AM John Delight <> wrote:
Hi Android Building group,

I am currently investigating to do something after specific target has been built, for exampe, once framework.jar has been built, run a specific script to process it (such as upload it to server for versioning).

After searched bp document,  it seems "genrule" could call a script, but not sure whether it could accept another target file in out dir as input, as I have seen in AOSP that "genrule" is mostly used to generate source file for other target.

I will try "genrule" first, meanwhile do you know the recommended way, or maybe it have hooks for target prost processing? Thanks!


You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

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
To view this discussion on the web visit

John Delight

Aug 11, 2022, 3:15:25 AM8/11/22
It does make sense. Thanks for your help. 

Reply all
Reply to author
0 new messages