Maven offers dependencyManagment:
making it possible to set version used throughout a project in one pom file. What is the equivalent in gradle, I have looked at this:
but I need to be able to setup dependencies without specifying versions (assuming they have been specified in eg. a common plugin/project).
AFAIK there is no dependency inheritance in Gradle. Gradle uses configuration injection instead, see Cross project configuration. You could define a list of dependencies in the root project and then re-use it when configuring each subproject, this way you will not have to specify a version more than once.
I’m assuming the question is in the context of a multi-project build?
Something that seems to be somewhat of a convention (the gradle source uses this in their build files) is to define some project extension properties on the root project, i.e. something like:
log4jVersion = "1.2.17"
groovyVersion = "2.0.5"
you can then either apply these to all subprojects in the same file:
//in the same build.gradle as the above ext definition
apply plugin: 'groovy'
or use them in a build.gradle for a specific sub project:
This is assuming that your various subprojects do not have the exact same dependencies, but differing subsets of the dependencies but you would always like for a specific dependency (like log4j above) to be fixed to a specific, globally configured version.