This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have become accustomed to working with Maven. Our company is now widely adopting Gradle in place of Maven. One of the features I enjoy in Maven is dependency management in a parent project to control dependency versions in subprojects. I am sure that there is an equivalent mechanism in Gradle. What is the preferred way to do that?
Gradle allows to simply define variables and assign dependency artefact names to them. You can then use the variable in subprojects or where you want to define dependencies.
For example for a multiproject build file we could have the following build file: