Skip to content

How to define a task which needs to run other tasks sequentially #4432

Answered by lihaoyi
domagojlatecki asked this question in Q&A
Discussion options

You must be logged in to vote

The basic approach is that dependent tasks need to call each other.

So def generateJooq should call flywayMigrate(), and def compile should call generateJooq() (perhaps indirectly through def generatedSources)

See the docs for examples of how generating sources is meant to work. From your description you aren't doing it the normal way, but it should be easy to follow the normal pattern

This will ensure the tasks get run in the right order despite parallelism/caching

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@domagojlatecki
Comment options

@lihaoyi
Comment options

@domagojlatecki
Comment options

Answer selected by lefou
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #4431 on January 30, 2025 16:01.