From c18455f89c41f30f7ca92d82ac6b130c6fac62c4 Mon Sep 17 00:00:00 2001 From: Aurelien FOUCRET Date: Mon, 4 Nov 2024 15:45:48 +0100 Subject: [PATCH] Change the dependency type for antlr4-runtime to api. --- x-pack/plugin/esql-core/build.gradle | 1 + .../xpack/esql/core/querydsl/query/QueryStringQuery.java | 2 -- x-pack/plugin/kql/build.gradle | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/x-pack/plugin/esql-core/build.gradle b/x-pack/plugin/esql-core/build.gradle index 796ec1d137155..77d251e1830f4 100644 --- a/x-pack/plugin/esql-core/build.gradle +++ b/x-pack/plugin/esql-core/build.gradle @@ -17,6 +17,7 @@ dependencies { api "org.antlr:antlr4-runtime:${versions.antlr4}" api project(path: xpackModule('mapper-version')) compileOnly project(path: xpackModule('core')) + compileOnly project(path: xpackModule('kql')) testApi(project(xpackModule('esql-core:test-fixtures'))) { exclude group: 'org.elasticsearch.plugin', module: 'esql-core' } diff --git a/x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/querydsl/query/QueryStringQuery.java b/x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/querydsl/query/QueryStringQuery.java index 839f70341b06a..8ac90e6314174 100644 --- a/x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/querydsl/query/QueryStringQuery.java +++ b/x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/querydsl/query/QueryStringQuery.java @@ -16,7 +16,6 @@ import org.elasticsearch.index.query.QueryStringQueryBuilder; import org.elasticsearch.xpack.esql.core.expression.predicate.fulltext.StringQueryPredicate; import org.elasticsearch.xpack.esql.core.tree.Source; -import org.elasticsearch.xpack.kql.parser.KqlParser; import java.util.Collections; import java.util.Map; @@ -74,7 +73,6 @@ public QueryStringQuery(Source source, String query, Map fields, @Override public QueryBuilder asBuilder() { - KqlParser kqlQueryBuilder = new KqlParser(); final QueryStringQueryBuilder queryBuilder = QueryBuilders.queryStringQuery(query); queryBuilder.fields(fields); options.forEach((k, v) -> { diff --git a/x-pack/plugin/kql/build.gradle b/x-pack/plugin/kql/build.gradle index 198099329c7c0..9d0860346b188 100644 --- a/x-pack/plugin/kql/build.gradle +++ b/x-pack/plugin/kql/build.gradle @@ -17,7 +17,7 @@ base { dependencies { compileOnly project(path: xpackModule('core')) - compileOnly "org.antlr:antlr4-runtime:${versions.antlr4}" + api "org.antlr:antlr4-runtime:${versions.antlr4}" testImplementation "org.antlr:antlr4-runtime:${versions.antlr4}" testImplementation project(':test:framework')