[TIMOB-24829] Android: Use incremental tasks for Hyperloop build steps #189
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is something i hacked together over the last days and should be treated more of a feature proposal than an actual pull request. Since the whole Android build pipeline currently has little to no caching of its different build steps, i tried to implement an incremental task approach to speed up the Android Hyperloop plugin.
The task and change detection stuff is heavily inspired by Gradle because i think they did a pretty neat job there, so i adopted it to the async nature of Node and simplified everything a little bit. Maybe this can even be integrated in the daemon in the feature by using the fs-watcher stuff from there and use the task system for implementing our build pipelines as plugins.
To sum this up:
Obviously this is not complete yet (missing unit tests for the base tasks, move the file monitor and base tasks to their own module), but i would love to hear some thoughts on this. I had to write so many manual caching logic around builds steps in the Android Builder and in Hyperloop lately that i thought this might be a great thing to have. This is also a good example to see how easy it is to integrate into our existing build pipeline.