1package org.jetbrains 2 3import org.gradle.api.Project 4 5class DependenciesVersionGetter { 6 static Properties getVersions(Project project, String artifactVersionSelector) { 7 def dep = project.dependencies.create(group: 'teamcity', name: 'dependencies', version: artifactVersionSelector, ext: 'properties') 8 def file = project.configurations.detachedConfiguration(dep).resolve().first() 9 10 def prop = new Properties() 11 prop.load(new FileReader(file)) 12 return prop 13 } 14} 15