Fix faults in incremental and parallel builds #762
Merged
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.
Hello
This commit fixes a couple of faults in the incremental and parallel builds of this project.
First, it makes the time-consuming task
generateCodecs
incremental.Second, it fixes a race condition related to the creation of the sources Jar. In particular,
sourcesJar
must be executed after the taskgenerateCodecs
. Otherwise, the created jar does not include the files generated by this task.These are the files that are missing when
sourcesJar
runs beforegenerateCodecs
:Similarly, the task
shadowJar
conflicts wit the taskjar
. Specifically, the name of the generated shadow jar (i.e.,aeron-all/build/libs/aeron-all-1.24.0-SNAPSHOT.jar
) conflicts with that produced by the naive jar task. So depending on the order in which Gradle processes task, the resulting jar might have incorrect contents.