diff --git a/build.gradle b/build.gradle index dc6af31..3ab5890 100644 --- a/build.gradle +++ b/build.gradle @@ -4,12 +4,14 @@ import static java.nio.file.StandardCopyOption.REPLACE_EXISTING buildscript { ext { - snakeYamlVersion = '1.33' shadowGradlePluginVersion = '8.1.1' } repositories { mavenCentral() } + dependencies { + classpath "org.yaml:snakeyaml:2.2" + } } plugins { @@ -17,6 +19,11 @@ plugins { id 'java' } +// load versions.yml from core before loading rubyUtils.gradle +import org.yaml.snakeyaml.Yaml +def versionsFile = file(LOGSTASH_CORE_PATH + "/../versions.yml") +gradle.ext.versions = new Yaml().load(versionsFile.text) + apply from: LOGSTASH_CORE_PATH + "/../rubyUtils.gradle" // =========================================================================== @@ -36,8 +43,8 @@ pluginInfo.pluginName = "java_codec_example" // must match the @LogstashPlu // =========================================================================== java { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 } repositories { @@ -49,16 +56,16 @@ shadowJar { } dependencies { - implementation 'org.apache.logging.log4j:log4j-api:2.9.1' - implementation 'org.apache.logging.log4j:log4j-core:2.9.1' - implementation "com.fasterxml.jackson.core:jackson-core:2.9.5" - implementation "com.fasterxml.jackson.core:jackson-databind:2.9.5" - implementation "com.fasterxml.jackson.core:jackson-annotations:2.9.5" - implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.9.5" - implementation fileTree(dir: LOGSTASH_CORE_PATH, include: "**/logstash-core-?.?.?.jar") + implementation 'org.apache.logging.log4j:log4j-api:2.17.0' + implementation 'org.apache.logging.log4j:log4j-core:2.17.0' + implementation "com.fasterxml.jackson.core:jackson-core:${gradle.ext.versions.jackson}" + implementation "com.fasterxml.jackson.core:jackson-databind:${gradle.ext.versions['jackson-databind']}" + implementation "com.fasterxml.jackson.core:jackson-annotations:${gradle.ext.versions.jackson}" + implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${gradle.ext.versions.jackson}" + implementation fileTree(dir: LOGSTASH_CORE_PATH, include: "**/logstash-core.jar") testImplementation 'junit:junit:4.12' - testImplementation 'org.jruby:jruby-complete:9.1.13.0' + testImplementation "org.jruby:jruby-complete:${gradle.ext.versions.jruby.version}" } clean {