/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ description = """Logstash X-Pack""" repositories { mavenCentral() } buildscript { repositories { mavenCentral() } } configurations { geolite2 } dependencies { testImplementation project(':logstash-core') testImplementation 'org.assertj:assertj-core:3.8.0' testImplementation 'junit:junit:4.12' geolite2('org.elasticsearch:geolite2-databases:20191119') { transitive = false } } test { exclude '/**' } tasks.register("unzipGeolite", Copy) { from(zipTree(configurations.geolite2.singleFile)) { include "GeoLite2-ASN.mmdb" include "GeoLite2-City.mmdb" } into file("${projectDir}/spec/filters/geoip/vendor") } tasks.register("rubyTests", Test) { dependsOn unzipGeolite inputs.files fileTree("${projectDir}/spec") inputs.files fileTree("${projectDir}/lib") inputs.files fileTree("${projectDir}/modules") systemProperty 'logstash.core.root.dir', projectDir.absolutePath include '/org/logstash/xpack/test/RSpecTests.class' } tasks.register("rubyIntegrationTests", Test) { if ((JavaVersion.current().getMajorVersion() as int) >= 17) { jvmArgs = ['--add-opens', 'java.base/sun.nio.ch=ALL-UNNAMED', '--add-opens', 'java.base/java.io=ALL-UNNAMED'] } dependsOn (":copyEs") inputs.files fileTree("${projectDir}/qa") inputs.files fileTree("${projectDir}/lib") inputs.files fileTree("${projectDir}/modules") systemProperty 'logstash.core.root.dir', projectDir.absolutePath include '/org/logstash/xpack/test/RSpecIntegrationTests.class' }