It's madness to combine application logic with update management in your codebase. Update management is very hard to get right, and there are a lot of corner cases that only show up under extreme conditions with delayed or duplicate delivery of updates. When the update logic is incorrect, you'll occasionally get plausible-but-somewhat-wrong answers that are hard to reproduce. The very worst kind of bug.
It's much better to have the update logic handled in a thoroughly tested library, and build your application logic on top.
It's much better to have the update logic handled in a thoroughly tested library, and build your application logic on top.