I’ve got a multi-project build and would like to be able to use dependency substitution based on which task is being executed
e.g. if I run ‘gradle mysubproject:build’ then it would build normally, if I run ‘gradle mysubproject:myspecialbuild’ then it would perform a dependency substitution.
The problem is that as far as I know, dependency substitution is run at configuration time, so you can’t change it within a task - Is that correct?
I’ve also considered having a separate configuration - the standard compile etc. WITHOUT dependency substitution and a custom one extending from compile WITH dependency substitution. The issue then is that you can’t just call build on the custom configuration and expect it to work…I think?
So, are my assumptions correct, and can you see any way of making this work?