Programmatically change dependency versions?

I’m trying implement a “bleeding edge mode”. Normally the dependencies are pinned down to a specific release version, but in this mode I’d like to set all internal dependencies (i.e. other modules developed by the same team) to ‘latest.integration’.

I tried setting dependency.version to ‘latest.integration’ in afterEvaluation, but that of course turns out to be read-only. I can always declare a version property for each module and sets it based on the mode, but before I go down that route, is there any other more automagic way to achieve this?

Or in general, is there a better way to achieve such a “bleeding edge mode”? Thanks.

I’d probably go with dependency resolve rules. See “50.8.2. Using dependency resolve rules” in the Gradle User Guide.

Wonderful… exactly what I was looking for. Thanks.