Right now AMBuild does not support prebuild steps - something that runs before every build, no matter what. Arbitrary steps are sort of contrary to our design, since we don't want to mess with the output folder outside of AMBuild's graph structure.
However we can introduce the concept of a command that is "always dirty". Like normal commands, these would still have outputs and still be well-ordered with respect to their dependent commands. However they would be guaranteed to run on every build, and their dirty bit would never be removed.
This patch introduces an ALWAYS_DIRTY nonce on Context objects, which can be passed to the input parameter of AddCommand. Always-dirty commands will not necessarily run as the first step on every build, but they will always run. Like normal commands they'll also run in parallel with non-dependent tasks.
The flag is experimental and may be deprecated for something better - at the moment, I'm hesitant to wrap this in a new API call, names like "AddPrebuildStep" would imply an ordering. But the flag works for now and would not be removed from the 2.1 API.
Right now AMBuild does not support prebuild steps - something that runs before every build, no matter what. Arbitrary steps are sort of contrary to our design, since we don't want to mess with the output folder outside of AMBuild's graph structure.
However we can introduce the concept of a command that is "always dirty". Like normal commands, these would still have outputs and still be well-ordered with respect to their dependent commands. However they would be guaranteed to run on every build, and their dirty bit would never be removed.
This patch introduces an
ALWAYS_DIRTY
nonce onContext
objects, which can be passed to theinput
parameter ofAddCommand
. Always-dirty commands will not necessarily run as the first step on every build, but they will always run. Like normal commands they'll also run in parallel with non-dependent tasks.The flag is experimental and may be deprecated for something better - at the moment, I'm hesitant to wrap this in a new API call, names like "AddPrebuildStep" would imply an ordering. But the flag works for now and would not be removed from the 2.1 API.