There is not a variable. Your only way to determine where the file is, is to resolve the dependency.
For instance configuration.runtimeClasspath.resolve().find { it.name == 'mydependency-1,0,0.jar'} will resolve that configuration and then return you the loclation of that file. Becasue of this you should only do this during execution time and not configuration time.