aboutsummaryrefslogtreecommitdiff
path: root/buildSrc/src
diff options
context:
space:
mode:
Diffstat (limited to 'buildSrc/src')
-rw-r--r--buildSrc/src/main/groovy/org/jetbrains/DependenciesVersionGetter.groovy14
1 files changed, 14 insertions, 0 deletions
diff --git a/buildSrc/src/main/groovy/org/jetbrains/DependenciesVersionGetter.groovy b/buildSrc/src/main/groovy/org/jetbrains/DependenciesVersionGetter.groovy
new file mode 100644
index 00000000..194f11af
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/jetbrains/DependenciesVersionGetter.groovy
@@ -0,0 +1,14 @@
+package org.jetbrains
+
+import org.gradle.api.Project
+
+class DependenciesVersionGetter {
+ static Properties getVersions(Project project, String artifactVersionSelector) {
+ def dep = project.dependencies.create(group: 'teamcity', name: 'dependencies', version: artifactVersionSelector, ext: 'properties')
+ def file = project.configurations.detachedConfiguration(dep).resolve().first()
+
+ def prop = new Properties()
+ prop.load(new FileReader(file))
+ return prop
+ }
+}