I have two cases in which I’d like to change the dependency resolution logic. I don’t know if these are supported by the DSL or if I should be writing some custom code.
We are using dynamic versions (1.0.+) to specify some of our dependencies.
Case 1: For some dependencies I would like to include snapshot builds, but not for other dependencies.
compile 'com.mycompany:projecta:1.0.+'
// use 1.0.*-SNAPSHOT if it exists
compile 'com.mycompany:projectb:1.0.+'
// do not use 1.0.*-SNAPSHOT even if it exists
Snapshot and release builds are in different repositories, but both need to be included since I need artifacts out of both.
Is there DSL syntax I can use to do change the logic? Do I need to write a custom resolver (how do I do that)?
Case 2: We have introduced a custom type of build which includes the suffix LOCAL in the version number. So in addition to resolving amongst 1.0.10 and 1.0.10-SNAPSHOT we have 1.0.10-LOCAL. How can I specify that, for example, LOCAL takes precedence over SNAPSHOT?
Related query: pointers to the exact Gradle classes which perform dependency resolution would be appreciated.