Skip to content

Commit efea88c

Browse files
authored
don't rely on rubyUtils.gradle loading the versions (logstash-plugins#19)
1 parent f8c42fb commit efea88c

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

build.gradle

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ buildscript {
66
mavenCentral()
77
gradlePluginPortal()
88
}
9+
dependencies {
10+
classpath "org.yaml:snakeyaml:2.2"
11+
}
912
}
1013

1114
plugins {
@@ -14,10 +17,14 @@ plugins {
1417
}
1518

1619
ext {
17-
snakeYamlVersion = '2.2'
1820
shadowGradlePluginVersion = '8.1.1'
1921
}
2022

23+
// load versions.yml from core before loading rubyUtils.gradle
24+
import org.yaml.snakeyaml.Yaml
25+
26+
def versionsFile = file(LOGSTASH_CORE_PATH + "/../versions.yml")
27+
gradle.ext.versions = new Yaml().load(versionsFile.text)
2128

2229
apply from: LOGSTASH_CORE_PATH + "/../rubyUtils.gradle"
2330

@@ -60,7 +67,7 @@ dependencies {
6067
implementation fileTree(dir: LOGSTASH_CORE_PATH, include: "**/logstash-core.jar")
6168

6269
testImplementation 'junit:junit:4.12'
63-
testImplementation 'org.jruby:jruby-complete:9.4.7.0'
70+
testImplementation "org.jruby:jruby-complete:${gradle.ext.versions.jruby.version}"
6471
}
6572

6673
clean {

0 commit comments

Comments
 (0)