In A, I have applied the java-library plugin and a custom plugin.
In B i have a dependency to A via a custom configuration called myConfig (I have also tried defining my dependency using the archives configuration, same issue). I have a custom task in B which extracts file from the JAR produced by A.
I have created a composite with A and B with default dependency substitution and with explicit dependency substitution.
The task which extracts the JAR in project B is most of the time run after the task which creates the JAR in A. Therefore I am wondering how I can enforce (without using explicit task dependency) that task from B are run after tasks from A.
For me as soon as there is a dependency substitution all tasks from B should be run after task from A, but it seems not to be the case so I don’t understand how it works.
Yes, it was a matter of corretly defnining dependencies of my task. I added a dependency to a Gradle configuration and it worked magically! Defining task inputs was not enough.
I am quite surprise in fact that I didn’t find any clear example in the Gradle documentation about this kind of scenario. Not event talking about composite build but making a task depend on some configuration.