From d952b101e618beb63b33de3708465278b7572084 Mon Sep 17 00:00:00 2001 From: Rene Groeschke Date: Tue, 30 Jun 2020 15:57:41 +0200 Subject: [PATCH] Replace compile configuration usage with api (7.x backport) (#58721) * Replace compile configuration usage with api (#58451) - Use java-library instead of plugin to allow api configuration usage - Remove explicit references to runtime configurations in dependency declarations - Make test runtime classpath input for testing convention - required as java library will by default not have build jar file - jar file is now explicit input of the task and gradle will ensure its properly build * Fix compile usages in 7.x branch --- benchmarks/build.gradle | 4 +- build.gradle | 6 +- buildSrc/build.gradle | 29 ++++--- ...ceDeprecationFailuresPluginFuncTest.groovy | 36 ++++---- .../gradle/ElasticsearchJavaPlugin.java | 6 +- .../EnforceDeprecationFailuresPlugin.java | 18 ++-- .../precommit/TestingConventionsTasks.java | 9 +- .../testKit/elasticsearch.build/build.gradle | 4 +- client/benchmark/build.gradle | 18 ++-- client/rest-high-level/build.gradle | 14 +-- client/rest/build.gradle | 12 +-- client/sniffer/build.gradle | 12 +-- client/test/build.gradle | 8 +- client/transport/build.gradle | 14 +-- distribution/build.gradle | 6 +- distribution/tools/launchers/build.gradle | 2 +- distribution/tools/plugin-cli/build.gradle | 4 +- libs/cli/build.gradle | 4 +- libs/grok/build.gradle | 4 +- libs/nio/build.gradle | 2 +- libs/ssl-config/build.gradle | 2 +- libs/x-content/build.gradle | 12 +-- modules/ingest-common/build.gradle | 4 +- modules/ingest-geoip/build.gradle | 8 +- modules/kibana/build.gradle | 2 +- modules/lang-expression/build.gradle | 10 +-- modules/lang-mustache/build.gradle | 2 +- modules/lang-painless/build.gradle | 14 +-- modules/lang-painless/spi/build.gradle | 2 +- modules/percolator/build.gradle | 4 +- modules/reindex/build.gradle | 8 +- modules/transport-netty4/build.gradle | 14 +-- plugins/analysis-icu/build.gradle | 4 +- plugins/analysis-kuromoji/build.gradle | 2 +- plugins/analysis-nori/build.gradle | 2 +- plugins/analysis-phonetic/build.gradle | 4 +- plugins/analysis-smartcn/build.gradle | 2 +- plugins/analysis-stempel/build.gradle | 2 +- plugins/analysis-ukrainian/build.gradle | 8 +- plugins/discovery-azure-classic/build.gradle | 42 ++++----- plugins/discovery-ec2/build.gradle | 18 ++-- .../discovery-ec2/qa/amazon-ec2/build.gradle | 2 +- plugins/discovery-gce/build.gradle | 22 ++--- plugins/discovery-gce/qa/gce/build.gradle | 2 +- plugins/ingest-attachment/build.gradle | 54 ++++++------ plugins/repository-azure/build.gradle | 6 +- plugins/repository-gcs/build.gradle | 52 +++++------ plugins/repository-hdfs/build.gradle | 38 ++++---- plugins/repository-s3/build.gradle | 28 +++--- plugins/transport-nio/build.gradle | 16 ++-- qa/os/build.gradle | 24 +++--- qa/smoke-test-client/build.gradle | 2 +- qa/smoke-test-http/build.gradle | 4 +- qa/smoke-test-ingest-disabled/build.gradle | 2 +- .../build.gradle | 10 +-- qa/wildfly/build.gradle | 20 ++--- server/build.gradle | 60 ++++++------- test/fixtures/azure-fixture/build.gradle | 2 +- test/fixtures/gcs-fixture/build.gradle | 2 +- test/fixtures/hdfs-fixture/build.gradle | 2 +- test/fixtures/old-elasticsearch/build.gradle | 2 +- test/fixtures/s3-fixture/build.gradle | 2 +- test/framework/build.gradle | 28 +++--- test/logger-usage/build.gradle | 8 +- x-pack/license-tools/build.gradle | 6 +- x-pack/plugin/analytics/build.gradle | 2 +- x-pack/plugin/async-search/qa/build.gradle | 2 +- .../async-search/qa/security/build.gradle | 2 +- x-pack/plugin/autoscaling/qa/build.gradle | 2 +- .../plugin/autoscaling/qa/rest/build.gradle | 2 +- x-pack/plugin/ccr/qa/build.gradle | 2 +- .../downgrade-to-basic-license/build.gradle | 2 +- .../plugin/ccr/qa/multi-cluster/build.gradle | 2 +- .../ccr/qa/non-compliant-license/build.gradle | 2 +- x-pack/plugin/ccr/qa/rest/build.gradle | 2 +- x-pack/plugin/ccr/qa/security/build.gradle | 10 ++- x-pack/plugin/core/build.gradle | 33 +++---- x-pack/plugin/enrich/qa/build.gradle | 2 +- x-pack/plugin/enrich/qa/common/build.gradle | 2 +- .../enrich/qa/rest-with-security/build.gradle | 6 +- x-pack/plugin/enrich/qa/rest/build.gradle | 4 +- x-pack/plugin/eql/build.gradle | 12 +-- x-pack/plugin/eql/qa/build.gradle | 2 +- x-pack/plugin/eql/qa/common/build.gradle | 8 +- x-pack/plugin/eql/qa/rest/build.gradle | 4 +- x-pack/plugin/eql/qa/security/build.gradle | 4 +- x-pack/plugin/identity-provider/build.gradle | 52 +++++------ x-pack/plugin/ilm/qa/rest/build.gradle | 2 +- x-pack/plugin/ml/build.gradle | 6 +- .../ml/qa/basic-multi-node/build.gradle | 2 +- x-pack/plugin/ml/qa/disabled/build.gradle | 2 +- .../qa/native-multi-node-tests/build.gradle | 2 +- .../ml/qa/no-bootstrap-tests/build.gradle | 2 +- .../ml/qa/single-node-tests/build.gradle | 2 +- x-pack/plugin/monitoring/build.gradle | 4 +- .../searchable-snapshots/qa/build.gradle | 2 +- x-pack/plugin/security/build.gradle | 74 ++++++++-------- x-pack/plugin/security/cli/build.gradle | 4 +- x-pack/plugin/spatial/build.gradle | 2 +- x-pack/plugin/sql/build.gradle | 12 +-- x-pack/plugin/sql/jdbc/build.gradle | 12 +-- x-pack/plugin/sql/qa/jdbc/build.gradle | 4 +- x-pack/plugin/sql/qa/server/build.gradle | 18 ++-- x-pack/plugin/sql/sql-action/build.gradle | 12 +-- x-pack/plugin/sql/sql-cli/build.gradle | 16 ++-- x-pack/plugin/sql/sql-client/build.gradle | 4 +- x-pack/plugin/sql/sql-proto/build.gradle | 4 +- x-pack/plugin/transform/build.gradle | 4 +- .../qa/multi-node-tests/build.gradle | 2 +- .../qa/single-node-tests/build.gradle | 2 +- x-pack/plugin/watcher/build.gradle | 10 +-- x-pack/qa/build.gradle | 2 +- x-pack/qa/security-client-tests/build.gradle | 2 +- .../build.gradle | 2 +- x-pack/qa/security-migrate-tests/build.gradle | 4 +- .../build.gradle | 2 +- x-pack/qa/third-party/jira/build.gradle | 2 +- x-pack/qa/third-party/pagerduty/build.gradle | 2 +- x-pack/qa/third-party/slack/build.gradle | 2 +- x-pack/qa/transport-client-tests/build.gradle | 2 +- x-pack/snapshot-tool/build.gradle | 86 +++++++++---------- .../qa/google-cloud-storage/build.gradle | 2 +- x-pack/snapshot-tool/qa/s3/build.gradle | 2 +- x-pack/test/feature-aware/build.gradle | 6 +- x-pack/transport-client/build.gradle | 4 +- 125 files changed, 635 insertions(+), 620 deletions(-) diff --git a/benchmarks/build.gradle b/benchmarks/build.gradle index 29d53c73824..1de9a459a45 100644 --- a/benchmarks/build.gradle +++ b/benchmarks/build.gradle @@ -29,12 +29,12 @@ archivesBaseName = 'elasticsearch-benchmarks' test.enabled = false dependencies { - compile(project(":server")) { + api( project(":server")) { // JMH ships with the conflicting version 4.6. This prevents us from using jopt-simple in benchmarks (which should be ok) but allows // us to invoke the JMH uberjar as usual. exclude group: 'net.sf.jopt-simple', module: 'jopt-simple' } - compile "org.openjdk.jmh:jmh-core:$versions.jmh" + api "org.openjdk.jmh:jmh-core:$versions.jmh" annotationProcessor "org.openjdk.jmh:jmh-generator-annprocess:$versions.jmh" // Dependencies of JMH runtime 'net.sf.jopt-simple:jopt-simple:4.6' diff --git a/build.gradle b/build.gradle index 5b79afd5033..0b1760a2e54 100644 --- a/build.gradle +++ b/build.gradle @@ -441,7 +441,11 @@ allprojects { dependsOn tasks.withType(ComposePull) } doLast { - configurations.findAll { it.isCanBeResolved() && !it.name.equals("testCompile") }.each { it.resolve() } + configurations.findAll { + it.isCanBeResolved() && + it.name.equals("testCompile") == false && + it.name.equals("compile") == false + }.each { it.resolve() } } } diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index e34fe7ffad1..f4e2b5d962e 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -108,24 +108,25 @@ repositories { dependencies { if (project.ext.has("isEclipse") == false || project.ext.isEclipse == false) { // eclipse is confused if this is set explicitly - compile sourceSets.minimumRuntime.output + api sourceSets.minimumRuntime.output } - compile localGroovy() + api localGroovy() - compile 'commons-codec:commons-codec:1.12' - compile 'org.apache.commons:commons-compress:1.19' + api 'commons-codec:commons-codec:1.12' + api 'org.apache.commons:commons-compress:1.19' + + api 'com.netflix.nebula:gradle-extra-configurations-plugin:3.0.3' + api 'com.netflix.nebula:nebula-publishing-plugin:4.4.4' + api 'com.netflix.nebula:gradle-info-plugin:7.1.3' + api 'org.apache.rat:apache-rat:0.11' + api "org.elasticsearch:jna:5.5.0" + api 'com.github.jengelman.gradle.plugins:shadow:5.1.0' + api 'de.thetaphi:forbiddenapis:3.0' + api 'com.avast.gradle:gradle-docker-compose-plugin:0.8.12' + api 'org.apache.maven:maven-model:3.6.2' + api 'com.networknt:json-schema-validator:1.0.36' - compile 'com.netflix.nebula:gradle-extra-configurations-plugin:3.0.3' - compile 'com.netflix.nebula:nebula-publishing-plugin:4.4.4' - compile 'com.netflix.nebula:gradle-info-plugin:7.1.3' - compile 'org.apache.rat:apache-rat:0.11' - compile "org.elasticsearch:jna:5.5.0" - compile 'com.github.jengelman.gradle.plugins:shadow:5.1.0' - compile 'de.thetaphi:forbiddenapis:3.0' - compile 'com.avast.gradle:gradle-docker-compose-plugin:0.8.12' - compile 'org.apache.maven:maven-model:3.6.2' - compile 'com.networknt:json-schema-validator:1.0.36' compileOnly "com.puppycrawl.tools:checkstyle:${props.getProperty('checkstyle')}" testImplementation "com.puppycrawl.tools:checkstyle:${props.getProperty('checkstyle')}" testFixturesApi "junit:junit:${props.getProperty('junit')}" diff --git a/buildSrc/src/integTest/groovy/org/elasticsearch/gradle/EnforceDeprecationFailuresPluginFuncTest.groovy b/buildSrc/src/integTest/groovy/org/elasticsearch/gradle/EnforceDeprecationFailuresPluginFuncTest.groovy index 62492cb5891..03087d61978 100644 --- a/buildSrc/src/integTest/groovy/org/elasticsearch/gradle/EnforceDeprecationFailuresPluginFuncTest.groovy +++ b/buildSrc/src/integTest/groovy/org/elasticsearch/gradle/EnforceDeprecationFailuresPluginFuncTest.groovy @@ -23,6 +23,7 @@ import org.gradle.testkit.runner.GradleRunner import org.junit.Rule import org.junit.rules.TemporaryFolder import spock.lang.Specification +import spock.lang.Unroll import java.lang.management.ManagementFactory @@ -44,17 +45,14 @@ class EnforceDeprecationFailuresPluginFuncTest extends Specification { """ } - def "fails on testCompile resolution"() { + @Unroll + def "fails on #compileConfigName resolution"() { given: buildFile << """ apply plugin:'java' - dependencies { - compile "org.acme:some-lib:1.0" - } - task resolve { doLast { - configurations.testCompile.resolve() + configurations.${compileConfigName}.resolve() } } """ @@ -64,25 +62,27 @@ class EnforceDeprecationFailuresPluginFuncTest extends Specification { assertOutputContains(result.output, """ * What went wrong: Execution failed for task ':resolve'. -> Resolving configuration testCompile is no longer supported. Use testImplementation instead. +> Resolving configuration $compileConfigName is no longer supported. Use $implementationConfigName instead. """) + where: + compileConfigName | implementationConfigName + "compile" | "implementation" + "testCompile" | "testImplementation" } - def "fails on testCompile dependency declaration"() { + @Unroll + def "fails on #compileConfigName dependency declaration"() { given: buildFile << """ - apply plugin:'java-base' - sourceSets { - test - } + apply plugin:'java' dependencies { - testCompile "org.acme:some-lib:1.0" + $compileConfigName "org.acme:some-lib:1.0" } - task resolve { + tasks.register("resolve") { doLast { - configurations.testCompile.resolve() + configurations.${compileConfigName}.resolve() } } """ @@ -92,8 +92,12 @@ Execution failed for task ':resolve'. assertOutputContains(result.output, """ * What went wrong: Execution failed for task ':resolve'. -> Declaring dependencies for configuration testCompile is no longer supported. Use testImplementation instead. +> Declaring dependencies for configuration ${compileConfigName} is no longer supported. Use ${implementationConfigName} instead. """) + where: + compileConfigName | implementationConfigName + "compile" | "implementation" + "testCompile" | "testImplementation" } private GradleRunner gradleRunner(String... arguments) { diff --git a/buildSrc/src/main/java/org/elasticsearch/gradle/ElasticsearchJavaPlugin.java b/buildSrc/src/main/java/org/elasticsearch/gradle/ElasticsearchJavaPlugin.java index 609ca49290d..b040e215789 100644 --- a/buildSrc/src/main/java/org/elasticsearch/gradle/ElasticsearchJavaPlugin.java +++ b/buildSrc/src/main/java/org/elasticsearch/gradle/ElasticsearchJavaPlugin.java @@ -42,6 +42,7 @@ import org.gradle.api.artifacts.repositories.MavenArtifactRepository; import org.gradle.api.execution.TaskActionListener; import org.gradle.api.file.FileCollection; import org.gradle.api.plugins.BasePlugin; +import org.gradle.api.plugins.JavaLibraryPlugin; import org.gradle.api.plugins.JavaPlugin; import org.gradle.api.plugins.JavaPluginExtension; import org.gradle.api.tasks.SourceSet; @@ -83,7 +84,7 @@ public class ElasticsearchJavaPlugin implements Plugin { // apply global test task failure listener project.getRootProject().getPluginManager().apply(TestFailureReportingPlugin.class); - project.getPluginManager().apply(JavaPlugin.class); + project.getPluginManager().apply(JavaLibraryPlugin.class); configureConfigurations(project); configureRepositories(project); @@ -141,7 +142,8 @@ public class ElasticsearchJavaPlugin implements Plugin { } }); }; - disableTransitiveDeps.accept(JavaPlugin.COMPILE_CONFIGURATION_NAME); + disableTransitiveDeps.accept(JavaPlugin.API_CONFIGURATION_NAME); + disableTransitiveDeps.accept(JavaPlugin.IMPLEMENTATION_CONFIGURATION_NAME); disableTransitiveDeps.accept(JavaPlugin.COMPILE_ONLY_CONFIGURATION_NAME); disableTransitiveDeps.accept(JavaPlugin.RUNTIME_ONLY_CONFIGURATION_NAME); disableTransitiveDeps.accept(JavaPlugin.TEST_IMPLEMENTATION_CONFIGURATION_NAME); diff --git a/buildSrc/src/main/java/org/elasticsearch/gradle/EnforceDeprecationFailuresPlugin.java b/buildSrc/src/main/java/org/elasticsearch/gradle/EnforceDeprecationFailuresPlugin.java index 443ce093966..88ea2c722e7 100644 --- a/buildSrc/src/main/java/org/elasticsearch/gradle/EnforceDeprecationFailuresPlugin.java +++ b/buildSrc/src/main/java/org/elasticsearch/gradle/EnforceDeprecationFailuresPlugin.java @@ -49,7 +49,7 @@ public class EnforceDeprecationFailuresPlugin implements Plugin { sourceSetContainer.all( sourceSet -> { // TODO: remove that guard once we removed general compile usage from es build - if (sourceSet.getName().equals("test")) { + if (sourceSet.getName().equals("test") || sourceSet.getName().equals("main")) { failOnCompileConfigurationResolution(sourceSet); failOnCompileConfigurationDependencyDeclaration(sourceSet); } @@ -78,15 +78,13 @@ public class EnforceDeprecationFailuresPlugin implements Plugin { .getByName(sourceSet.getCompileConfigurationName()) .getIncoming() .beforeResolve(resolvableDependencies -> { - if (resolvableDependencies.getDependencies().size() > 0) { - throw new GradleException( - "Resolving configuration " - + sourceSet.getCompileConfigurationName() - + " is no longer supported. Use " - + sourceSet.getImplementationConfigurationName() - + " instead." - ); - } + throw new GradleException( + "Resolving configuration " + + sourceSet.getCompileConfigurationName() + + " is no longer supported. Use " + + sourceSet.getImplementationConfigurationName() + + " instead." + ); }); } diff --git a/buildSrc/src/main/java/org/elasticsearch/gradle/precommit/TestingConventionsTasks.java b/buildSrc/src/main/java/org/elasticsearch/gradle/precommit/TestingConventionsTasks.java index 337ba7ac6bd..e31b506b6f6 100644 --- a/buildSrc/src/main/java/org/elasticsearch/gradle/precommit/TestingConventionsTasks.java +++ b/buildSrc/src/main/java/org/elasticsearch/gradle/precommit/TestingConventionsTasks.java @@ -26,6 +26,7 @@ import org.gradle.api.NamedDomainObjectContainer; import org.gradle.api.Task; import org.gradle.api.file.FileCollection; import org.gradle.api.file.FileTree; +import org.gradle.api.tasks.Classpath; import org.gradle.api.tasks.Input; import org.gradle.api.tasks.OutputFile; import org.gradle.api.tasks.SourceSet; @@ -348,12 +349,8 @@ public class TestingConventionsTasks extends DefaultTask { return false; } - private FileCollection getTestsClassPath() { - // Loading the classes depends on the classpath, so we could make this an input annotated with @Classpath. - // The reason we don't is that test classes are already inputs and while the dependencies are needed to load - // the classes these don't influence the checks done by this task. - // A side effect is that we could mark as up-to-date with missing dependencies, but these will be found when - // running the tests. + @Classpath + public FileCollection getTestsClassPath() { return Util.getJavaTestSourceSet(getProject()).get().getRuntimeClasspath(); } diff --git a/buildSrc/src/testKit/elasticsearch.build/build.gradle b/buildSrc/src/testKit/elasticsearch.build/build.gradle index 7d5bfb66c6f..ef8c95536bc 100644 --- a/buildSrc/src/testKit/elasticsearch.build/build.gradle +++ b/buildSrc/src/testKit/elasticsearch.build/build.gradle @@ -7,9 +7,9 @@ ext.licenseFile = file("LICENSE") ext.noticeFile = file("NOTICE") dependencies { - compile "junit:junit:${versions.junit}" + api "junit:junit:${versions.junit}" // missing classes in thirdparty audit - compile 'org.hamcrest:hamcrest-core:1.3' + api 'org.hamcrest:hamcrest-core:1.3' } repositories { diff --git a/client/benchmark/build.gradle b/client/benchmark/build.gradle index 5a89113137e..0f9ec487f5d 100644 --- a/client/benchmark/build.gradle +++ b/client/benchmark/build.gradle @@ -32,18 +32,18 @@ mainClassName = 'org.elasticsearch.client.benchmark.BenchmarkMain' test.enabled = false dependencies { - compile 'org.apache.commons:commons-math3:3.2' + api 'org.apache.commons:commons-math3:3.2' - compile project(":client:rest") + api project(":client:rest") // bottleneck should be the client, not Elasticsearch - compile project(path: ':client:client-benchmark-noop-api-plugin') + api project(path: ':client:client-benchmark-noop-api-plugin') // for transport client - compile project(":server") - compile project(":client:transport") - compile project(path: ':modules:transport-netty4', configuration: 'runtime') - compile project(path: ':modules:reindex', configuration: 'runtime') - compile project(path: ':modules:lang-mustache', configuration: 'runtime') - compile project(path: ':modules:percolator', configuration: 'runtime') + api project(":server") + api project(":client:transport") + api project(':modules:transport-netty4') + api project(':modules:reindex') + api project(':modules:lang-mustache') + api project(':modules:percolator') } // No licenses for our benchmark deps (we don't ship benchmarks) diff --git a/client/rest-high-level/build.gradle b/client/rest-high-level/build.gradle index 976194f3f2d..edfe6af4ba7 100644 --- a/client/rest-high-level/build.gradle +++ b/client/rest-high-level/build.gradle @@ -36,13 +36,13 @@ restResources { } dependencies { - compile project(':server') - compile project(':client:rest') - compile project(':modules:mapper-extras') - compile project(':modules:parent-join') - compile project(':modules:aggs-matrix-stats') - compile project(':modules:rank-eval') - compile project(':modules:lang-mustache') + api project(':server') + api project(':client:rest') + api project(':modules:mapper-extras') + api project(':modules:parent-join') + api project(':modules:aggs-matrix-stats') + api project(':modules:rank-eval') + api project(':modules:lang-mustache') testImplementation project(':client:test') testImplementation project(':test:framework') diff --git a/client/rest/build.gradle b/client/rest/build.gradle index 2641bc4b838..1118369c215 100644 --- a/client/rest/build.gradle +++ b/client/rest/build.gradle @@ -28,12 +28,12 @@ group = 'org.elasticsearch.client' archivesBaseName = 'elasticsearch-rest-client' dependencies { - compile "org.apache.httpcomponents:httpclient:${versions.httpclient}" - compile "org.apache.httpcomponents:httpcore:${versions.httpcore}" - compile "org.apache.httpcomponents:httpasyncclient:${versions.httpasyncclient}" - compile "org.apache.httpcomponents:httpcore-nio:${versions.httpcore}" - compile "commons-codec:commons-codec:${versions.commonscodec}" - compile "commons-logging:commons-logging:${versions.commonslogging}" + api "org.apache.httpcomponents:httpclient:${versions.httpclient}" + api "org.apache.httpcomponents:httpcore:${versions.httpcore}" + api "org.apache.httpcomponents:httpasyncclient:${versions.httpasyncclient}" + api "org.apache.httpcomponents:httpcore-nio:${versions.httpcore}" + api "commons-codec:commons-codec:${versions.commonscodec}" + api "commons-logging:commons-logging:${versions.commonslogging}" testImplementation project(":client:test") testImplementation "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" diff --git a/client/sniffer/build.gradle b/client/sniffer/build.gradle index e16fd566730..a175de8d8ec 100644 --- a/client/sniffer/build.gradle +++ b/client/sniffer/build.gradle @@ -26,12 +26,12 @@ group = 'org.elasticsearch.client' archivesBaseName = 'elasticsearch-rest-client-sniffer' dependencies { - compile project(":client:rest") - compile "org.apache.httpcomponents:httpclient:${versions.httpclient}" - compile "org.apache.httpcomponents:httpcore:${versions.httpcore}" - compile "commons-codec:commons-codec:${versions.commonscodec}" - compile "commons-logging:commons-logging:${versions.commonslogging}" - compile "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" + api project(":client:rest") + api "org.apache.httpcomponents:httpclient:${versions.httpclient}" + api "org.apache.httpcomponents:httpcore:${versions.httpcore}" + api "commons-codec:commons-codec:${versions.commonscodec}" + api "commons-logging:commons-logging:${versions.commonslogging}" + api "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" testImplementation project(":client:test") testImplementation "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" diff --git a/client/test/build.gradle b/client/test/build.gradle index c63226f44aa..5ef20f2aa31 100644 --- a/client/test/build.gradle +++ b/client/test/build.gradle @@ -24,10 +24,10 @@ sourceCompatibility = JavaVersion.VERSION_1_8 group = "${group}.client.test" dependencies { - compile "org.apache.httpcomponents:httpcore:${versions.httpcore}" - compile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" - compile "junit:junit:${versions.junit}" - compile "org.hamcrest:hamcrest:${versions.hamcrest}" + api "org.apache.httpcomponents:httpcore:${versions.httpcore}" + api "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" + api "junit:junit:${versions.junit}" + api "org.hamcrest:hamcrest:${versions.hamcrest}" } tasks.named('forbiddenApisMain').configure { diff --git a/client/transport/build.gradle b/client/transport/build.gradle index aa3b80fa6a6..aa21a3b2fa9 100644 --- a/client/transport/build.gradle +++ b/client/transport/build.gradle @@ -22,13 +22,13 @@ apply plugin: 'nebula.maven-base-publish' group = 'org.elasticsearch.client' dependencies { - compile project(":server") - compile project(":modules:transport-netty4") - compile project(":modules:reindex") - compile project(":modules:lang-mustache") - compile project(":modules:percolator") - compile project(":modules:parent-join") - compile project(":modules:rank-eval") + api project(":server") + api project(":modules:transport-netty4") + api project(":modules:reindex") + api project(":modules:lang-mustache") + api project(":modules:percolator") + api project(":modules:parent-join") + api project(":modules:rank-eval") testImplementation "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" testImplementation "junit:junit:${versions.junit}" testImplementation "org.hamcrest:hamcrest:${versions.hamcrest}" diff --git a/distribution/build.gradle b/distribution/build.gradle index 98d2aca505e..e1af0ffb9c2 100644 --- a/distribution/build.gradle +++ b/distribution/build.gradle @@ -287,13 +287,13 @@ configure(subprojects.findAll { ['archives', 'packages'].contains(it.name) }) { copySpec { // delay by using closures, since they have not yet been configured, so no jar task exists yet from { project(':server').jar } - from { project(':server').configurations.runtime } + from { project(':server').configurations.runtimeClasspath } from { project(':libs:elasticsearch-plugin-classloader').jar } from { project(':distribution:tools:java-version-checker').jar } from { project(':distribution:tools:launchers').jar } into('tools/plugin-cli') { from { project(':distribution:tools:plugin-cli').jar } - from { project(':distribution:tools:plugin-cli').configurations.runtime } + from { project(':distribution:tools:plugin-cli').configurations.runtimeClasspath } } into('tools/keystore-cli') { from { project(':distribution:tools:keystore-cli').jar } @@ -301,7 +301,7 @@ configure(subprojects.findAll { ['archives', 'packages'].contains(it.name) }) { if (oss == false) { into('tools/security-cli') { from { project(':x-pack:plugin:security:cli').jar } - from { project(':x-pack:plugin:security:cli').configurations.compile } + from { project(':x-pack:plugin:security:cli').configurations.compileClasspath } } } } diff --git a/distribution/tools/launchers/build.gradle b/distribution/tools/launchers/build.gradle index fa7b2e15881..02632055210 100644 --- a/distribution/tools/launchers/build.gradle +++ b/distribution/tools/launchers/build.gradle @@ -21,7 +21,7 @@ import de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis apply plugin: 'elasticsearch.build' dependencies { - compile parent.project('java-version-checker') + api parent.project('java-version-checker') testImplementation "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" testImplementation "junit:junit:${versions.junit}" testImplementation "org.hamcrest:hamcrest:${versions.hamcrest}" diff --git a/distribution/tools/plugin-cli/build.gradle b/distribution/tools/plugin-cli/build.gradle index 5116e1ec72f..ae89e92f072 100644 --- a/distribution/tools/plugin-cli/build.gradle +++ b/distribution/tools/plugin-cli/build.gradle @@ -24,8 +24,8 @@ archivesBaseName = 'elasticsearch-plugin-cli' dependencies { compileOnly project(":server") compileOnly project(":libs:elasticsearch-cli") - compile "org.bouncycastle:bcpg-fips:1.0.3" - compile "org.bouncycastle:bc-fips:1.0.1" + api "org.bouncycastle:bcpg-fips:1.0.3" + api "org.bouncycastle:bc-fips:1.0.1" testImplementation project(":test:framework") testImplementation 'com.google.jimfs:jimfs:1.1' testRuntimeOnly 'com.google.guava:guava:18.0' diff --git a/libs/cli/build.gradle b/libs/cli/build.gradle index 87005bf6f54..27e799362e6 100644 --- a/libs/cli/build.gradle +++ b/libs/cli/build.gradle @@ -21,8 +21,8 @@ apply plugin: 'nebula.optional-base' apply plugin: 'elasticsearch.publish' dependencies { - compile 'net.sf.jopt-simple:jopt-simple:5.0.2' - compile project(':libs:elasticsearch-core') + api 'net.sf.jopt-simple:jopt-simple:5.0.2' + api project(':libs:elasticsearch-core') } test.enabled = false diff --git a/libs/grok/build.gradle b/libs/grok/build.gradle index 4816a49cdc9..c9a9c681b17 100644 --- a/libs/grok/build.gradle +++ b/libs/grok/build.gradle @@ -18,9 +18,9 @@ */ dependencies { - compile 'org.jruby.joni:joni:2.1.29' + api 'org.jruby.joni:joni:2.1.29' // joni dependencies: - compile 'org.jruby.jcodings:jcodings:1.0.44' + api 'org.jruby.jcodings:jcodings:1.0.44' testImplementation(project(":test:framework")) { exclude group: 'org.elasticsearch', module: 'elasticsearch-grok' diff --git a/libs/nio/build.gradle b/libs/nio/build.gradle index 21e8e26e80a..03a51c24cdf 100644 --- a/libs/nio/build.gradle +++ b/libs/nio/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'elasticsearch.publish' dependencies { - compile project(':libs:elasticsearch-core') + api project(':libs:elasticsearch-core') testImplementation "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" testImplementation "junit:junit:${versions.junit}" diff --git a/libs/ssl-config/build.gradle b/libs/ssl-config/build.gradle index 93ca2379c24..b6c637a9db5 100644 --- a/libs/ssl-config/build.gradle +++ b/libs/ssl-config/build.gradle @@ -19,7 +19,7 @@ apply plugin: "elasticsearch.publish" dependencies { - compile project(':libs:elasticsearch-core') + api project(':libs:elasticsearch-core') testImplementation(project(":test:framework")) { exclude group: 'org.elasticsearch', module: 'elasticsearch-ssl-config' diff --git a/libs/x-content/build.gradle b/libs/x-content/build.gradle index 45b6862c28b..1b96706b44e 100644 --- a/libs/x-content/build.gradle +++ b/libs/x-content/build.gradle @@ -21,13 +21,13 @@ apply plugin: 'elasticsearch.build' apply plugin: 'elasticsearch.publish' dependencies { - compile project(':libs:elasticsearch-core') + api project(':libs:elasticsearch-core') - compile "org.yaml:snakeyaml:${versions.snakeyaml}" - compile "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" - compile "com.fasterxml.jackson.dataformat:jackson-dataformat-smile:${versions.jackson}" - compile "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${versions.jackson}" - compile "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${versions.jackson}" + api "org.yaml:snakeyaml:${versions.snakeyaml}" + api "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" + api "com.fasterxml.jackson.dataformat:jackson-dataformat-smile:${versions.jackson}" + api "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${versions.jackson}" + api "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${versions.jackson}" testImplementation "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" testImplementation "junit:junit:${versions.junit}" diff --git a/modules/ingest-common/build.gradle b/modules/ingest-common/build.gradle index e22742e3a9a..ddadef788c5 100644 --- a/modules/ingest-common/build.gradle +++ b/modules/ingest-common/build.gradle @@ -25,8 +25,8 @@ esplugin { dependencies { compileOnly project(':modules:lang-painless') - compile project(':libs:elasticsearch-grok') - compile project(':libs:elasticsearch-dissect') + api project(':libs:elasticsearch-grok') + api project(':libs:elasticsearch-dissect') } restResources { diff --git a/modules/ingest-geoip/build.gradle b/modules/ingest-geoip/build.gradle index 6dd15ea5718..58e351c8033 100644 --- a/modules/ingest-geoip/build.gradle +++ b/modules/ingest-geoip/build.gradle @@ -25,11 +25,11 @@ esplugin { } dependencies { - compile('com.maxmind.geoip2:geoip2:2.13.1') + api('com.maxmind.geoip2:geoip2:2.13.1') // geoip2 dependencies: - compile("com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}") - compile("com.fasterxml.jackson.core:jackson-databind:${versions.jackson}") - compile('com.maxmind.db:maxmind-db:1.3.1') + api("com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}") + api("com.fasterxml.jackson.core:jackson-databind:${versions.jackson}") + api('com.maxmind.db:maxmind-db:1.3.1') testImplementation 'org.elasticsearch:geolite2-databases:20191119' } diff --git a/modules/kibana/build.gradle b/modules/kibana/build.gradle index 818f555be1b..8c102080edc 100644 --- a/modules/kibana/build.gradle +++ b/modules/kibana/build.gradle @@ -23,7 +23,7 @@ esplugin { } dependencies { - compile project(path: ':modules:reindex', configuration: 'runtime') + api project(path: ':modules:reindex') } testClusters.integTest { diff --git a/modules/lang-expression/build.gradle b/modules/lang-expression/build.gradle index 25e70719586..b7e66d375a2 100644 --- a/modules/lang-expression/build.gradle +++ b/modules/lang-expression/build.gradle @@ -23,11 +23,11 @@ esplugin { } dependencies { - compile "org.apache.lucene:lucene-expressions:${versions.lucene}" - compile 'org.antlr:antlr4-runtime:4.5.1-1' - compile 'org.ow2.asm:asm:5.0.4' - compile 'org.ow2.asm:asm-commons:5.0.4' - compile 'org.ow2.asm:asm-tree:5.0.4' + api "org.apache.lucene:lucene-expressions:${versions.lucene}" + api 'org.antlr:antlr4-runtime:4.5.1-1' + api 'org.ow2.asm:asm:5.0.4' + api 'org.ow2.asm:asm-commons:5.0.4' + api 'org.ow2.asm:asm-tree:5.0.4' } restResources { restApi { diff --git a/modules/lang-mustache/build.gradle b/modules/lang-mustache/build.gradle index dd29def8a98..2a4fffdebf7 100644 --- a/modules/lang-mustache/build.gradle +++ b/modules/lang-mustache/build.gradle @@ -24,7 +24,7 @@ esplugin { } dependencies { - compile "com.github.spullara.mustache.java:compiler:0.9.6" + api "com.github.spullara.mustache.java:compiler:0.9.6" } restResources { diff --git a/modules/lang-painless/build.gradle b/modules/lang-painless/build.gradle index 8c45935b30d..2b4500946dd 100644 --- a/modules/lang-painless/build.gradle +++ b/modules/lang-painless/build.gradle @@ -33,13 +33,13 @@ testClusters.integTest { } dependencies { - compile 'org.antlr:antlr4-runtime:4.5.3' - compile 'org.ow2.asm:asm-util:7.2' - compile 'org.ow2.asm:asm-tree:7.2' - compile 'org.ow2.asm:asm-commons:7.2' - compile 'org.ow2.asm:asm-analysis:7.2' - compile 'org.ow2.asm:asm:7.2' - compile project('spi') + api 'org.antlr:antlr4-runtime:4.5.3' + api 'org.ow2.asm:asm-util:7.2' + api 'org.ow2.asm:asm-tree:7.2' + api 'org.ow2.asm:asm-commons:7.2' + api 'org.ow2.asm:asm-analysis:7.2' + api 'org.ow2.asm:asm:7.2' + api project('spi') } tasks.named("dependencyLicenses").configure { diff --git a/modules/lang-painless/spi/build.gradle b/modules/lang-painless/spi/build.gradle index ec8a569020f..d0bf8639045 100644 --- a/modules/lang-painless/spi/build.gradle +++ b/modules/lang-painless/spi/build.gradle @@ -24,7 +24,7 @@ group = 'org.elasticsearch.plugin' archivesBaseName = 'elasticsearch-scripting-painless-spi' dependencies { - compile project(":server") + api project(":server") } // no tests...yet? diff --git a/modules/percolator/build.gradle b/modules/percolator/build.gradle index b07fcb36deb..e1b0c81f9f8 100644 --- a/modules/percolator/build.gradle +++ b/modules/percolator/build.gradle @@ -24,8 +24,8 @@ esplugin { } dependencies { - testImplementation project(path: ':modules:parent-join', configuration: 'runtime') - testImplementation project(path: ':modules:geo', configuration: 'runtime') + testImplementation project(':modules:parent-join') + testImplementation project(':modules:geo') } tasks.named('integTestRunner').configure { diff --git a/modules/reindex/build.gradle b/modules/reindex/build.gradle index bc5f77c4ed4..c5539b8933f 100644 --- a/modules/reindex/build.gradle +++ b/modules/reindex/build.gradle @@ -49,12 +49,12 @@ test { } dependencies { - compile project(":client:rest") - compile project(":libs:elasticsearch-ssl-config") + api project(":client:rest") + api project(":libs:elasticsearch-ssl-config") // for http - testing reindex from remote - testImplementation project(path: ':modules:transport-netty4', configuration: 'runtime') + testImplementation project(':modules:transport-netty4') // for parent/child testing - testImplementation project(path: ':modules:parent-join', configuration: 'runtime') + testImplementation project(':modules:parent-join') } restResources { diff --git a/modules/transport-netty4/build.gradle b/modules/transport-netty4/build.gradle index 96163b759cd..d451b183036 100644 --- a/modules/transport-netty4/build.gradle +++ b/modules/transport-netty4/build.gradle @@ -35,13 +35,13 @@ esplugin { dependencies { // network stack - compile "io.netty:netty-buffer:${versions.netty}" - compile "io.netty:netty-codec:${versions.netty}" - compile "io.netty:netty-codec-http:${versions.netty}" - compile "io.netty:netty-common:${versions.netty}" - compile "io.netty:netty-handler:${versions.netty}" - compile "io.netty:netty-resolver:${versions.netty}" - compile "io.netty:netty-transport:${versions.netty}" + api "io.netty:netty-buffer:${versions.netty}" + api "io.netty:netty-codec:${versions.netty}" + api "io.netty:netty-codec-http:${versions.netty}" + api "io.netty:netty-common:${versions.netty}" + api "io.netty:netty-handler:${versions.netty}" + api "io.netty:netty-resolver:${versions.netty}" + api "io.netty:netty-transport:${versions.netty}" } restResources { diff --git a/plugins/analysis-icu/build.gradle b/plugins/analysis-icu/build.gradle index 2c79b79a1a4..1709b9ff23b 100644 --- a/plugins/analysis-icu/build.gradle +++ b/plugins/analysis-icu/build.gradle @@ -32,8 +32,8 @@ tasks.withType(CheckForbiddenApis).configureEach { } dependencies { - compile "org.apache.lucene:lucene-analyzers-icu:${versions.lucene}" - compile "com.ibm.icu:icu4j:${versions.icu4j}" + api "org.apache.lucene:lucene-analyzers-icu:${versions.lucene}" + api "com.ibm.icu:icu4j:${versions.icu4j}" } restResources { diff --git a/plugins/analysis-kuromoji/build.gradle b/plugins/analysis-kuromoji/build.gradle index 02ffa6c9eb8..138c2c0d3a9 100644 --- a/plugins/analysis-kuromoji/build.gradle +++ b/plugins/analysis-kuromoji/build.gradle @@ -23,7 +23,7 @@ esplugin { } dependencies { - compile "org.apache.lucene:lucene-analyzers-kuromoji:${versions.lucene}" + api "org.apache.lucene:lucene-analyzers-kuromoji:${versions.lucene}" } restResources { diff --git a/plugins/analysis-nori/build.gradle b/plugins/analysis-nori/build.gradle index 024f1059a73..2e3fb1d45d6 100644 --- a/plugins/analysis-nori/build.gradle +++ b/plugins/analysis-nori/build.gradle @@ -23,7 +23,7 @@ esplugin { } dependencies { - compile "org.apache.lucene:lucene-analyzers-nori:${versions.lucene}" + api "org.apache.lucene:lucene-analyzers-nori:${versions.lucene}" } restResources { diff --git a/plugins/analysis-phonetic/build.gradle b/plugins/analysis-phonetic/build.gradle index a281d7b111a..06479082288 100644 --- a/plugins/analysis-phonetic/build.gradle +++ b/plugins/analysis-phonetic/build.gradle @@ -23,8 +23,8 @@ esplugin { } dependencies { - compile "org.apache.lucene:lucene-analyzers-phonetic:${versions.lucene}" - compile "commons-codec:commons-codec:${versions.commonscodec}" + api "org.apache.lucene:lucene-analyzers-phonetic:${versions.lucene}" + api "commons-codec:commons-codec:${versions.commonscodec}" } restResources { diff --git a/plugins/analysis-smartcn/build.gradle b/plugins/analysis-smartcn/build.gradle index 2905bd43017..1a03c597b3d 100644 --- a/plugins/analysis-smartcn/build.gradle +++ b/plugins/analysis-smartcn/build.gradle @@ -23,7 +23,7 @@ esplugin { } dependencies { - compile "org.apache.lucene:lucene-analyzers-smartcn:${versions.lucene}" + api "org.apache.lucene:lucene-analyzers-smartcn:${versions.lucene}" } restResources { diff --git a/plugins/analysis-stempel/build.gradle b/plugins/analysis-stempel/build.gradle index 46751d03c1b..c86b502ccb2 100644 --- a/plugins/analysis-stempel/build.gradle +++ b/plugins/analysis-stempel/build.gradle @@ -23,7 +23,7 @@ esplugin { } dependencies { - compile "org.apache.lucene:lucene-analyzers-stempel:${versions.lucene}" + api "org.apache.lucene:lucene-analyzers-stempel:${versions.lucene}" } restResources { diff --git a/plugins/analysis-ukrainian/build.gradle b/plugins/analysis-ukrainian/build.gradle index b69dbc35a98..9728a29bfd6 100644 --- a/plugins/analysis-ukrainian/build.gradle +++ b/plugins/analysis-ukrainian/build.gradle @@ -23,10 +23,10 @@ esplugin { } dependencies { - compile "org.apache.lucene:lucene-analyzers-morfologik:${versions.lucene}" - compile "org.carrot2:morfologik-stemming:2.1.1" - compile "org.carrot2:morfologik-fsa:2.1.1" - compile "ua.net.nlp:morfologik-ukrainian-search:3.7.5" + api "org.apache.lucene:lucene-analyzers-morfologik:${versions.lucene}" + api "org.carrot2:morfologik-stemming:2.1.1" + api "org.carrot2:morfologik-fsa:2.1.1" + api "ua.net.nlp:morfologik-ukrainian-search:3.7.5" } restResources { diff --git a/plugins/discovery-azure-classic/build.gradle b/plugins/discovery-azure-classic/build.gradle index 16910aa9167..a72d5396fc0 100644 --- a/plugins/discovery-azure-classic/build.gradle +++ b/plugins/discovery-azure-classic/build.gradle @@ -31,30 +31,30 @@ versions << [ ] dependencies { - compile "com.microsoft.azure:azure-svc-mgmt-compute:${versions.azure}" - compile "com.microsoft.azure:azure-core:${versions.azure}" - compile "org.apache.httpcomponents:httpclient:${versions.httpclient}" - compile "org.apache.httpcomponents:httpcore:${versions.httpcore}" - compile "commons-logging:commons-logging:${versions.commonslogging}" - compile "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}" - compile "commons-codec:commons-codec:${versions.commonscodec}" - compile "commons-lang:commons-lang:2.6" - compile "commons-io:commons-io:2.4" - compile 'javax.mail:mail:1.4.5' - compile 'javax.inject:javax.inject:1' - compile "com.sun.jersey:jersey-client:${versions.jersey}" - compile "com.sun.jersey:jersey-core:${versions.jersey}" - compile "com.sun.jersey:jersey-json:${versions.jersey}" - compile 'org.codehaus.jettison:jettison:1.1' - compile 'com.sun.xml.bind:jaxb-impl:2.2.3-1' - compile 'org.codehaus.jackson:jackson-core-asl:1.9.2' - compile 'org.codehaus.jackson:jackson-mapper-asl:1.9.2' - compile 'org.codehaus.jackson:jackson-jaxrs:1.9.2' - compile 'org.codehaus.jackson:jackson-xc:1.9.2' + api "com.microsoft.azure:azure-svc-mgmt-compute:${versions.azure}" + api "com.microsoft.azure:azure-core:${versions.azure}" + api "org.apache.httpcomponents:httpclient:${versions.httpclient}" + api "org.apache.httpcomponents:httpcore:${versions.httpcore}" + api "commons-logging:commons-logging:${versions.commonslogging}" + api "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}" + api "commons-codec:commons-codec:${versions.commonscodec}" + api "commons-lang:commons-lang:2.6" + api "commons-io:commons-io:2.4" + api 'javax.mail:mail:1.4.5' + api 'javax.inject:javax.inject:1' + api "com.sun.jersey:jersey-client:${versions.jersey}" + api "com.sun.jersey:jersey-core:${versions.jersey}" + api "com.sun.jersey:jersey-json:${versions.jersey}" + api 'org.codehaus.jettison:jettison:1.1' + api 'com.sun.xml.bind:jaxb-impl:2.2.3-1' + api 'org.codehaus.jackson:jackson-core-asl:1.9.2' + api 'org.codehaus.jackson:jackson-mapper-asl:1.9.2' + api 'org.codehaus.jackson:jackson-jaxrs:1.9.2' + api 'org.codehaus.jackson:jackson-xc:1.9.2' // HACK: javax.xml.bind was removed from default modules in java 9, so we pull the api in here, // and whitelist this hack in JarHell - compile 'javax.xml.bind:jaxb-api:2.2.2' + api 'javax.xml.bind:jaxb-api:2.2.2' } restResources { diff --git a/plugins/discovery-ec2/build.gradle b/plugins/discovery-ec2/build.gradle index b01263e3dec..eef654380b6 100644 --- a/plugins/discovery-ec2/build.gradle +++ b/plugins/discovery-ec2/build.gradle @@ -29,15 +29,15 @@ versions << [ ] dependencies { - compile "com.amazonaws:aws-java-sdk-ec2:${versions.aws}" - compile "com.amazonaws:aws-java-sdk-core:${versions.aws}" - compile "org.apache.httpcomponents:httpclient:${versions.httpclient}" - compile "org.apache.httpcomponents:httpcore:${versions.httpcore}" - compile "commons-logging:commons-logging:${versions.commonslogging}" - compile "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}" - compile "commons-codec:commons-codec:${versions.commonscodec}" - compile "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}" - compile "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}" + api "com.amazonaws:aws-java-sdk-ec2:${versions.aws}" + api "com.amazonaws:aws-java-sdk-core:${versions.aws}" + api "org.apache.httpcomponents:httpclient:${versions.httpclient}" + api "org.apache.httpcomponents:httpcore:${versions.httpcore}" + api "commons-logging:commons-logging:${versions.commonslogging}" + api "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}" + api "commons-codec:commons-codec:${versions.commonscodec}" + api "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}" + api "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}" } restResources { diff --git a/plugins/discovery-ec2/qa/amazon-ec2/build.gradle b/plugins/discovery-ec2/qa/amazon-ec2/build.gradle index 718f8d10edd..4a94ff38874 100644 --- a/plugins/discovery-ec2/qa/amazon-ec2/build.gradle +++ b/plugins/discovery-ec2/qa/amazon-ec2/build.gradle @@ -29,7 +29,7 @@ apply plugin: 'elasticsearch.standalone-rest-test' apply plugin: 'elasticsearch.rest-test' dependencies { - testImplementation project(path: ':plugins:discovery-ec2', configuration: 'runtime') + testImplementation project(':plugins:discovery-ec2') } restResources { diff --git a/plugins/discovery-gce/build.gradle b/plugins/discovery-gce/build.gradle index 3501890c48e..46b83198080 100644 --- a/plugins/discovery-gce/build.gradle +++ b/plugins/discovery-gce/build.gradle @@ -8,17 +8,17 @@ versions << [ ] dependencies { - compile "com.google.apis:google-api-services-compute:v1-rev160-${versions.google}" - compile "com.google.api-client:google-api-client:${versions.google}" - compile "com.google.oauth-client:google-oauth-client:${versions.google}" - compile "com.google.http-client:google-http-client:${versions.google}" - compile "com.google.http-client:google-http-client-jackson2:${versions.google}" - compile 'com.google.code.findbugs:jsr305:1.3.9' - compile "org.apache.httpcomponents:httpclient:${versions.httpclient}" - compile "org.apache.httpcomponents:httpcore:${versions.httpcore}" - compile "commons-logging:commons-logging:${versions.commonslogging}" - compile "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}" - compile "commons-codec:commons-codec:${versions.commonscodec}" + api "com.google.apis:google-api-services-compute:v1-rev160-${versions.google}" + api "com.google.api-client:google-api-client:${versions.google}" + api "com.google.oauth-client:google-oauth-client:${versions.google}" + api "com.google.http-client:google-http-client:${versions.google}" + api "com.google.http-client:google-http-client-jackson2:${versions.google}" + api 'com.google.code.findbugs:jsr305:1.3.9' + api "org.apache.httpcomponents:httpclient:${versions.httpclient}" + api "org.apache.httpcomponents:httpcore:${versions.httpcore}" + api "commons-logging:commons-logging:${versions.commonslogging}" + api "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}" + api "commons-codec:commons-codec:${versions.commonscodec}" } restResources { diff --git a/plugins/discovery-gce/qa/gce/build.gradle b/plugins/discovery-gce/qa/gce/build.gradle index 515d6f2f160..e9925851251 100644 --- a/plugins/discovery-gce/qa/gce/build.gradle +++ b/plugins/discovery-gce/qa/gce/build.gradle @@ -30,7 +30,7 @@ apply plugin: 'elasticsearch.rest-test' final int gceNumberOfNodes = 3 dependencies { - testImplementation project(path: ':plugins:discovery-gce', configuration: 'runtime') + testImplementation project(':plugins:discovery-gce') } restResources { diff --git a/plugins/ingest-attachment/build.gradle b/plugins/ingest-attachment/build.gradle index da2ee6e46c7..703276f6782 100644 --- a/plugins/ingest-attachment/build.gradle +++ b/plugins/ingest-attachment/build.gradle @@ -33,47 +33,47 @@ versions << [ dependencies { // mandatory for tika - compile "org.apache.tika:tika-core:${versions.tika}" + api "org.apache.tika:tika-core:${versions.tika}" // build against Jackson 2.9.5, but still works on our current version - compile "org.apache.tika:tika-parsers:${versions.tika}" - compile 'org.tukaani:xz:1.8' - compile 'commons-io:commons-io:2.6' - compile "org.slf4j:slf4j-api:${versions.slf4j}" + api "org.apache.tika:tika-parsers:${versions.tika}" + api 'org.tukaani:xz:1.8' + api 'commons-io:commons-io:2.6' + api "org.slf4j:slf4j-api:${versions.slf4j}" // character set detection - compile 'com.googlecode.juniversalchardet:juniversalchardet:1.0.3' + api 'com.googlecode.juniversalchardet:juniversalchardet:1.0.3' // external parser libraries // HTML - compile 'org.ccil.cowan.tagsoup:tagsoup:1.2.1' + api 'org.ccil.cowan.tagsoup:tagsoup:1.2.1' // Adobe PDF - compile "org.apache.pdfbox:pdfbox:${versions.pdfbox}" - compile "org.apache.pdfbox:fontbox:${versions.pdfbox}" - compile "org.apache.pdfbox:jempbox:1.8.16" - compile "commons-logging:commons-logging:${versions.commonslogging}" - compile "org.bouncycastle:bcmail-jdk15on:${versions.bouncycastle}" - compile "org.bouncycastle:bcprov-jdk15on:${versions.bouncycastle}" - compile "org.bouncycastle:bcpkix-jdk15on:${versions.bouncycastle}" + api "org.apache.pdfbox:pdfbox:${versions.pdfbox}" + api "org.apache.pdfbox:fontbox:${versions.pdfbox}" + api "org.apache.pdfbox:jempbox:1.8.16" + api "commons-logging:commons-logging:${versions.commonslogging}" + api "org.bouncycastle:bcmail-jdk15on:${versions.bouncycastle}" + api "org.bouncycastle:bcprov-jdk15on:${versions.bouncycastle}" + api "org.bouncycastle:bcpkix-jdk15on:${versions.bouncycastle}" // OpenOffice - compile "org.apache.poi:poi-ooxml:${versions.poi}" - compile "org.apache.poi:poi:${versions.poi}" - compile "org.apache.poi:poi-ooxml-schemas:${versions.poi}" - compile "commons-codec:commons-codec:${versions.commonscodec}" - compile 'org.apache.xmlbeans:xmlbeans:3.0.1' - compile 'org.apache.commons:commons-collections4:4.1' + api "org.apache.poi:poi-ooxml:${versions.poi}" + api "org.apache.poi:poi:${versions.poi}" + api "org.apache.poi:poi-ooxml-schemas:${versions.poi}" + api "commons-codec:commons-codec:${versions.commonscodec}" + api 'org.apache.xmlbeans:xmlbeans:3.0.1' + api 'org.apache.commons:commons-collections4:4.1' // MS Office - compile "org.apache.poi:poi-scratchpad:${versions.poi}" + api "org.apache.poi:poi-scratchpad:${versions.poi}" // Apple iWork - compile 'org.apache.commons:commons-compress:1.19' + api 'org.apache.commons:commons-compress:1.19' // Outlook documents - compile "org.apache.james:apache-mime4j-core:${versions.mime4j}" - compile "org.apache.james:apache-mime4j-dom:${versions.mime4j}" + api "org.apache.james:apache-mime4j-core:${versions.mime4j}" + api "org.apache.james:apache-mime4j-dom:${versions.mime4j}" // EPUB books - compile 'org.apache.commons:commons-lang3:3.9' + api 'org.apache.commons:commons-lang3:3.9' // Microsoft Word files with visio diagrams - compile 'org.apache.commons:commons-math3:3.6.1' + api 'org.apache.commons:commons-math3:3.6.1' // POIs dependency - compile 'com.zaxxer:SparseBitSet:1.2' + api 'com.zaxxer:SparseBitSet:1.2' } restResources { diff --git a/plugins/repository-azure/build.gradle b/plugins/repository-azure/build.gradle index 7b70f71cee2..16acac35da7 100644 --- a/plugins/repository-azure/build.gradle +++ b/plugins/repository-azure/build.gradle @@ -29,10 +29,10 @@ esplugin { } dependencies { - compile 'com.microsoft.azure:azure-storage:8.6.2' - compile 'com.microsoft.azure:azure-keyvault-core:1.0.0' + api 'com.microsoft.azure:azure-storage:8.6.2' + api 'com.microsoft.azure:azure-keyvault-core:1.0.0' runtimeOnly 'com.google.guava:guava:20.0' - compile 'org.apache.commons:commons-lang3:3.4' + api 'org.apache.commons:commons-lang3:3.4' testImplementation project(':test:fixtures:azure-fixture') } diff --git a/plugins/repository-gcs/build.gradle b/plugins/repository-gcs/build.gradle index f0a18b07b9c..7ae94bfedda 100644 --- a/plugins/repository-gcs/build.gradle +++ b/plugins/repository-gcs/build.gradle @@ -35,33 +35,33 @@ esplugin { } dependencies { - compile 'com.google.cloud:google-cloud-storage:1.106.0' - compile 'com.google.cloud:google-cloud-core:1.93.3' + api 'com.google.cloud:google-cloud-storage:1.106.0' + api 'com.google.cloud:google-cloud-core:1.93.3' runtimeOnly 'com.google.guava:guava:26.0-jre' - compile 'com.google.http-client:google-http-client:1.34.2' - compile "commons-logging:commons-logging:${versions.commonslogging}" - compile "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}" - compile "commons-codec:commons-codec:${versions.commonscodec}" - compile 'com.google.api:api-common:1.8.1' - compile 'com.google.api:gax:1.54.0' - compile 'org.threeten:threetenbp:1.4.1' - compile 'com.google.protobuf:protobuf-java-util:3.11.3' - compile 'com.google.protobuf:protobuf-java:3.11.3' - compile 'com.google.code.gson:gson:2.7' - compile 'com.google.api.grpc:proto-google-common-protos:1.16.0' - compile 'com.google.api.grpc:proto-google-iam-v1:0.12.0' - compile 'com.google.cloud:google-cloud-core-http:1.93.3' - compile 'com.google.auth:google-auth-library-credentials:0.20.0' - compile 'com.google.auth:google-auth-library-oauth2-http:0.20.0' - compile 'com.google.oauth-client:google-oauth-client:1.28.0' - compile 'com.google.api-client:google-api-client:1.30.9' - compile 'com.google.http-client:google-http-client-appengine:1.34.2' - compile 'com.google.http-client:google-http-client-jackson2:1.34.2' - compile 'com.google.api:gax-httpjson:0.62.0' - compile 'io.grpc:grpc-context:1.12.0' - compile 'io.opencensus:opencensus-api:0.18.0' - compile 'io.opencensus:opencensus-contrib-http-util:0.18.0' - compile 'com.google.apis:google-api-services-storage:v1-rev20200226-1.30.9' + api 'com.google.http-client:google-http-client:1.34.2' + api "commons-logging:commons-logging:${versions.commonslogging}" + api "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}" + api "commons-codec:commons-codec:${versions.commonscodec}" + api 'com.google.api:api-common:1.8.1' + api 'com.google.api:gax:1.54.0' + api 'org.threeten:threetenbp:1.4.1' + api 'com.google.protobuf:protobuf-java-util:3.11.3' + api 'com.google.protobuf:protobuf-java:3.11.3' + api 'com.google.code.gson:gson:2.7' + api 'com.google.api.grpc:proto-google-common-protos:1.16.0' + api 'com.google.api.grpc:proto-google-iam-v1:0.12.0' + api 'com.google.cloud:google-cloud-core-http:1.93.3' + api 'com.google.auth:google-auth-library-credentials:0.20.0' + api 'com.google.auth:google-auth-library-oauth2-http:0.20.0' + api 'com.google.oauth-client:google-oauth-client:1.28.0' + api 'com.google.api-client:google-api-client:1.30.9' + api 'com.google.http-client:google-http-client-appengine:1.34.2' + api 'com.google.http-client:google-http-client-jackson2:1.34.2' + api 'com.google.api:gax-httpjson:0.62.0' + api 'io.grpc:grpc-context:1.12.0' + api 'io.opencensus:opencensus-api:0.18.0' + api 'io.opencensus:opencensus-contrib-http-util:0.18.0' + api 'com.google.apis:google-api-services-storage:v1-rev20200226-1.30.9' testImplementation project(':test:fixtures:gcs-fixture') } diff --git a/plugins/repository-hdfs/build.gradle b/plugins/repository-hdfs/build.gradle index 0f61a3dabbb..aa3d9bf3fac 100644 --- a/plugins/repository-hdfs/build.gradle +++ b/plugins/repository-hdfs/build.gradle @@ -45,26 +45,26 @@ configurations { } dependencies { - compile "org.apache.hadoop:hadoop-client:${versions.hadoop2}" - compile "org.apache.hadoop:hadoop-common:${versions.hadoop2}" - compile "org.apache.hadoop:hadoop-annotations:${versions.hadoop2}" - compile "org.apache.hadoop:hadoop-auth:${versions.hadoop2}" - compile "org.apache.hadoop:hadoop-hdfs:${versions.hadoop2}" - compile "org.apache.hadoop:hadoop-hdfs-client:${versions.hadoop2}" - compile 'org.apache.htrace:htrace-core4:4.0.1-incubating' + api "org.apache.hadoop:hadoop-client:${versions.hadoop2}" + api "org.apache.hadoop:hadoop-common:${versions.hadoop2}" + api "org.apache.hadoop:hadoop-annotations:${versions.hadoop2}" + api "org.apache.hadoop:hadoop-auth:${versions.hadoop2}" + api "org.apache.hadoop:hadoop-hdfs:${versions.hadoop2}" + api "org.apache.hadoop:hadoop-hdfs-client:${versions.hadoop2}" + api 'org.apache.htrace:htrace-core4:4.0.1-incubating' runtimeOnly 'com.google.guava:guava:11.0.2' - compile 'com.google.protobuf:protobuf-java:2.5.0' - compile 'commons-logging:commons-logging:1.1.3' - compile "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}" - compile 'commons-cli:commons-cli:1.2' - compile "commons-codec:commons-codec:${versions.commonscodec}" - compile 'commons-collections:commons-collections:3.2.2' - compile 'commons-configuration:commons-configuration:1.6' - compile 'commons-io:commons-io:2.4' - compile 'commons-lang:commons-lang:2.6' - compile 'javax.servlet:servlet-api:2.5' - compile "org.slf4j:slf4j-api:${versions.slf4j}" - compile "org.apache.logging.log4j:log4j-slf4j-impl:${versions.log4j}" + api 'com.google.protobuf:protobuf-java:2.5.0' + api 'commons-logging:commons-logging:1.1.3' + api "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}" + api 'commons-cli:commons-cli:1.2' + api "commons-codec:commons-codec:${versions.commonscodec}" + api 'commons-collections:commons-collections:3.2.2' + api 'commons-configuration:commons-configuration:1.6' + api 'commons-io:commons-io:2.4' + api 'commons-lang:commons-lang:2.6' + api 'javax.servlet:servlet-api:2.5' + api "org.slf4j:slf4j-api:${versions.slf4j}" + api "org.apache.logging.log4j:log4j-slf4j-impl:${versions.log4j}" hdfsFixture project(':test:fixtures:hdfs-fixture') // Set the keytab files in the classpath so that we can access them from test code without the security manager diff --git a/plugins/repository-s3/build.gradle b/plugins/repository-s3/build.gradle index e823b919519..33620d40435 100644 --- a/plugins/repository-s3/build.gradle +++ b/plugins/repository-s3/build.gradle @@ -32,23 +32,23 @@ versions << [ ] dependencies { - compile "com.amazonaws:aws-java-sdk-s3:${versions.aws}" - compile "com.amazonaws:aws-java-sdk-core:${versions.aws}" - compile "com.amazonaws:jmespath-java:${versions.aws}" - compile "org.apache.httpcomponents:httpclient:${versions.httpclient}" - compile "org.apache.httpcomponents:httpcore:${versions.httpcore}" - compile "commons-logging:commons-logging:${versions.commonslogging}" - compile "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}" - compile "commons-codec:commons-codec:${versions.commonscodec}" - compile "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" - compile "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}" - compile "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}" - compile "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${versions.jackson}" - compile "joda-time:joda-time:${versions.joda}" + api "com.amazonaws:aws-java-sdk-s3:${versions.aws}" + api "com.amazonaws:aws-java-sdk-core:${versions.aws}" + api "com.amazonaws:jmespath-java:${versions.aws}" + api "org.apache.httpcomponents:httpclient:${versions.httpclient}" + api "org.apache.httpcomponents:httpcore:${versions.httpcore}" + api "commons-logging:commons-logging:${versions.commonslogging}" + api "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}" + api "commons-codec:commons-codec:${versions.commonscodec}" + api "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" + api "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}" + api "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}" + api "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${versions.jackson}" + api "joda-time:joda-time:${versions.joda}" // HACK: javax.xml.bind was removed from default modules in java 9, so we pull the api in here, // and whitelist this hack in JarHell - compile 'javax.xml.bind:jaxb-api:2.2.2' + api 'javax.xml.bind:jaxb-api:2.2.2' testImplementation project(':test:fixtures:s3-fixture') } diff --git a/plugins/transport-nio/build.gradle b/plugins/transport-nio/build.gradle index 76cdaa39c6c..6bd07f4e2ec 100644 --- a/plugins/transport-nio/build.gradle +++ b/plugins/transport-nio/build.gradle @@ -27,16 +27,16 @@ esplugin { } dependencies { - compile project(':libs:elasticsearch-nio') + api project(':libs:elasticsearch-nio') // network stack - compile "io.netty:netty-buffer:${versions.netty}" - compile "io.netty:netty-codec:${versions.netty}" - compile "io.netty:netty-codec-http:${versions.netty}" - compile "io.netty:netty-common:${versions.netty}" - compile "io.netty:netty-handler:${versions.netty}" - compile "io.netty:netty-resolver:${versions.netty}" - compile "io.netty:netty-transport:${versions.netty}" + api "io.netty:netty-buffer:${versions.netty}" + api "io.netty:netty-codec:${versions.netty}" + api "io.netty:netty-codec-http:${versions.netty}" + api "io.netty:netty-common:${versions.netty}" + api "io.netty:netty-handler:${versions.netty}" + api "io.netty:netty-resolver:${versions.netty}" + api "io.netty:netty-transport:${versions.netty}" } tasks.named("dependencyLicenses").configure { diff --git a/qa/os/build.gradle b/qa/os/build.gradle index d02e3f23dd8..36d42903274 100644 --- a/qa/os/build.gradle +++ b/qa/os/build.gradle @@ -22,20 +22,20 @@ plugins { } dependencies { - compile "junit:junit:${versions.junit}" - compile "org.hamcrest:hamcrest:${versions.hamcrest}" - compile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" + api "junit:junit:${versions.junit}" + api "org.hamcrest:hamcrest:${versions.hamcrest}" + api "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" - compile "org.apache.httpcomponents:httpcore:${versions.httpcore}" - compile "org.apache.httpcomponents:httpclient:${versions.httpclient}" - compile "org.apache.httpcomponents:fluent-hc:${versions.httpclient}" - compile "org.apache.logging.log4j:log4j-api:${versions.log4j}" - compile "org.apache.logging.log4j:log4j-core:${versions.log4j}" - compile "org.apache.logging.log4j:log4j-jcl:${versions.log4j}" - compile "commons-codec:commons-codec:${versions.commonscodec}" - compile "commons-logging:commons-logging:${versions.commonslogging}" + api "org.apache.httpcomponents:httpcore:${versions.httpcore}" + api "org.apache.httpcomponents:httpclient:${versions.httpclient}" + api "org.apache.httpcomponents:fluent-hc:${versions.httpclient}" + api "org.apache.logging.log4j:log4j-api:${versions.log4j}" + api "org.apache.logging.log4j:log4j-core:${versions.log4j}" + api "org.apache.logging.log4j:log4j-jcl:${versions.log4j}" + api "commons-codec:commons-codec:${versions.commonscodec}" + api "commons-logging:commons-logging:${versions.commonslogging}" - compile project(':libs:elasticsearch-core') + api project(':libs:elasticsearch-core') testImplementation "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}" testImplementation "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" diff --git a/qa/smoke-test-client/build.gradle b/qa/smoke-test-client/build.gradle index 230b6512109..cbdd9cf5577 100644 --- a/qa/smoke-test-client/build.gradle +++ b/qa/smoke-test-client/build.gradle @@ -25,7 +25,7 @@ apply plugin: 'elasticsearch.rest-test' // TODO: this test works, but it isn't really a rest test...should we have another plugin for "non rest test that just needs N clusters?" dependencies { - testImplementation project(path: ':client:transport', configuration: 'runtime') // randomly swapped in as a transport + testImplementation project(':client:transport') // randomly swapped in as a transport } task singleNodeIntegTest(type: RestIntegTestTask) { diff --git a/qa/smoke-test-http/build.gradle b/qa/smoke-test-http/build.gradle index 0ed84740bf0..bf9afcf5f6f 100644 --- a/qa/smoke-test-http/build.gradle +++ b/qa/smoke-test-http/build.gradle @@ -23,8 +23,8 @@ apply plugin: 'elasticsearch.rest-test' apply plugin: 'elasticsearch.test-with-dependencies' dependencies { - testImplementation project(path: ':modules:transport-netty4', configuration: 'runtime') // for http - testImplementation project(path: ':plugins:transport-nio', configuration: 'runtime') // for http + testImplementation project(path: ':modules:transport-netty4') // for http + testImplementation project(path: ':plugins:transport-nio') // for http } integTest.runner { diff --git a/qa/smoke-test-ingest-disabled/build.gradle b/qa/smoke-test-ingest-disabled/build.gradle index 6885dbb1dfd..5cac835431b 100644 --- a/qa/smoke-test-ingest-disabled/build.gradle +++ b/qa/smoke-test-ingest-disabled/build.gradle @@ -22,7 +22,7 @@ apply plugin: 'elasticsearch.standalone-rest-test' apply plugin: 'elasticsearch.rest-test' dependencies { - testImplementation project(path: ':modules:ingest-common', configuration: 'runtime') + testImplementation project(':modules:ingest-common') } testClusters.integTest { diff --git a/qa/smoke-test-ingest-with-all-dependencies/build.gradle b/qa/smoke-test-ingest-with-all-dependencies/build.gradle index c33eaba4572..d96a673bd05 100644 --- a/qa/smoke-test-ingest-with-all-dependencies/build.gradle +++ b/qa/smoke-test-ingest-with-all-dependencies/build.gradle @@ -22,11 +22,11 @@ apply plugin: 'elasticsearch.standalone-rest-test' apply plugin: 'elasticsearch.rest-test' dependencies { - testImplementation project(path: ':modules:ingest-common', configuration: 'runtime') - testImplementation project(path: ':modules:ingest-geoip', configuration: 'runtime') - testImplementation project(path: ':modules:lang-mustache', configuration: 'runtime') - testImplementation project(path: ':modules:lang-painless', configuration: 'runtime') - testImplementation project(path: ':modules:reindex', configuration: 'runtime') + testImplementation project(':modules:ingest-common') + testImplementation project(':modules:ingest-geoip') + testImplementation project(':modules:lang-mustache') + testImplementation project(':modules:lang-painless') + testImplementation project(':modules:reindex') } testingConventions { diff --git a/qa/wildfly/build.gradle b/qa/wildfly/build.gradle index ce16b69c402..c8fc29c5c90 100644 --- a/qa/wildfly/build.gradle +++ b/qa/wildfly/build.gradle @@ -31,21 +31,21 @@ dependencies { providedCompile 'javax.enterprise:cdi-api:1.2' providedCompile 'org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec:1.0.0.Final' providedCompile 'org.jboss.spec.javax.ws.rs:jboss-jaxrs-api_2.0_spec:1.0.0.Final' - compile('org.jboss.resteasy:resteasy-jackson2-provider:3.0.19.Final') { + api('org.jboss.resteasy:resteasy-jackson2-provider:3.0.19.Final') { exclude module: 'jackson-annotations' exclude module: 'jackson-core' exclude module: 'jackson-databind' exclude module: 'jackson-jaxrs-json-provider' } - compile "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}" - compile "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" - compile "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}" - compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:${versions.jackson}" - compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:${versions.jackson}" - compile "com.fasterxml.jackson.module:jackson-module-jaxb-annotations:${versions.jackson}" - compile "org.apache.logging.log4j:log4j-api:${versions.log4j}" - compile "org.apache.logging.log4j:log4j-core:${versions.log4j}" - compile project(path: ':client:rest-high-level') + api "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}" + api "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" + api "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}" + api "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:${versions.jackson}" + api "com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:${versions.jackson}" + api "com.fasterxml.jackson.module:jackson-module-jaxb-annotations:${versions.jackson}" + api "org.apache.logging.log4j:log4j-api:${versions.log4j}" + api "org.apache.logging.log4j:log4j-core:${versions.log4j}" + api project(path: ':client:rest-high-level') testImplementation project(':test:framework') } diff --git a/server/build.gradle b/server/build.gradle index aa89a871ea9..9457a497ba9 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -45,7 +45,7 @@ if (!isEclipse) { } configurations { - java11Compile.extendsFrom(compile) + java11Compile.extendsFrom(api) } dependencies { @@ -76,52 +76,52 @@ if (!isEclipse) { dependencies { - compile project(':libs:elasticsearch-core') - compile project(':libs:elasticsearch-secure-sm') - compile project(':libs:elasticsearch-x-content') - compile project(":libs:elasticsearch-geo") + api project(':libs:elasticsearch-core') + api project(':libs:elasticsearch-secure-sm') + api project(':libs:elasticsearch-x-content') + api project(":libs:elasticsearch-geo") compileOnly project(':libs:elasticsearch-plugin-classloader') testRuntimeOnly project(':libs:elasticsearch-plugin-classloader') // lucene - compile "org.apache.lucene:lucene-core:${versions.lucene}" - compile "org.apache.lucene:lucene-analyzers-common:${versions.lucene}" - compile "org.apache.lucene:lucene-backward-codecs:${versions.lucene}" - compile "org.apache.lucene:lucene-grouping:${versions.lucene}" - compile "org.apache.lucene:lucene-highlighter:${versions.lucene}" - compile "org.apache.lucene:lucene-join:${versions.lucene}" - compile "org.apache.lucene:lucene-memory:${versions.lucene}" - compile "org.apache.lucene:lucene-misc:${versions.lucene}" - compile "org.apache.lucene:lucene-queries:${versions.lucene}" - compile "org.apache.lucene:lucene-queryparser:${versions.lucene}" - compile "org.apache.lucene:lucene-sandbox:${versions.lucene}" - compile "org.apache.lucene:lucene-spatial-extras:${versions.lucene}" - compile "org.apache.lucene:lucene-spatial3d:${versions.lucene}" - compile "org.apache.lucene:lucene-suggest:${versions.lucene}" + api "org.apache.lucene:lucene-core:${versions.lucene}" + api "org.apache.lucene:lucene-analyzers-common:${versions.lucene}" + api "org.apache.lucene:lucene-backward-codecs:${versions.lucene}" + api "org.apache.lucene:lucene-grouping:${versions.lucene}" + api "org.apache.lucene:lucene-highlighter:${versions.lucene}" + api "org.apache.lucene:lucene-join:${versions.lucene}" + api "org.apache.lucene:lucene-memory:${versions.lucene}" + api "org.apache.lucene:lucene-misc:${versions.lucene}" + api "org.apache.lucene:lucene-queries:${versions.lucene}" + api "org.apache.lucene:lucene-queryparser:${versions.lucene}" + api "org.apache.lucene:lucene-sandbox:${versions.lucene}" + api "org.apache.lucene:lucene-spatial-extras:${versions.lucene}" + api "org.apache.lucene:lucene-spatial3d:${versions.lucene}" + api "org.apache.lucene:lucene-suggest:${versions.lucene}" // utilities - compile project(":libs:elasticsearch-cli") - compile 'com.carrotsearch:hppc:0.8.1' + api project(":libs:elasticsearch-cli") + api 'com.carrotsearch:hppc:0.8.1' // time handling, remove with java 8 time - compile "joda-time:joda-time:${versions.joda}" + api "joda-time:joda-time:${versions.joda}" // percentiles aggregation - compile 'com.tdunning:t-digest:3.2' + api 'com.tdunning:t-digest:3.2' // precentil ranks aggregation - compile 'org.hdrhistogram:HdrHistogram:2.1.9' + api 'org.hdrhistogram:HdrHistogram:2.1.9' // lucene spatial - compile "org.locationtech.spatial4j:spatial4j:${versions.spatial4j}", optional - compile "org.locationtech.jts:jts-core:${versions.jts}", optional + api "org.locationtech.spatial4j:spatial4j:${versions.spatial4j}", optional + api "org.locationtech.jts:jts-core:${versions.jts}", optional // logging - compile "org.apache.logging.log4j:log4j-api:${versions.log4j}" - compile "org.apache.logging.log4j:log4j-core:${versions.log4j}", optional + api "org.apache.logging.log4j:log4j-api:${versions.log4j}" + api "org.apache.logging.log4j:log4j-core:${versions.log4j}", optional // repackaged jna with native bits linked against all elastic supported platforms - compile "org.elasticsearch:jna:${versions.jna}" + api "org.elasticsearch:jna:${versions.jna}" if (!isEclipse) { java11Compile sourceSets.main.output @@ -324,7 +324,7 @@ if (BuildParams.runtimeJavaVersion > JavaVersion.VERSION_1_8) { tasks.named("dependencyLicenses").configure { mapping from: /lucene-.*/, to: 'lucene' - dependencies = project.configurations.runtime.fileCollection { + dependencies = project.configurations.runtimeClasspath.fileCollection { it.group.startsWith('org.elasticsearch') == false || // keep the following org.elasticsearch jars in (it.name == 'jna' || diff --git a/test/fixtures/azure-fixture/build.gradle b/test/fixtures/azure-fixture/build.gradle index a01954ba289..33025686ba6 100644 --- a/test/fixtures/azure-fixture/build.gradle +++ b/test/fixtures/azure-fixture/build.gradle @@ -23,7 +23,7 @@ description = 'Fixture for Azure external service' test.enabled = false dependencies { - compile project(':server') + api project(':server') } preProcessFixture { diff --git a/test/fixtures/gcs-fixture/build.gradle b/test/fixtures/gcs-fixture/build.gradle index 35eaf4c3a2f..3d6493f5f3c 100644 --- a/test/fixtures/gcs-fixture/build.gradle +++ b/test/fixtures/gcs-fixture/build.gradle @@ -23,7 +23,7 @@ description = 'Fixture for Google Cloud Storage service' test.enabled = false dependencies { - compile project(':server') + api project(':server') } preProcessFixture { diff --git a/test/fixtures/hdfs-fixture/build.gradle b/test/fixtures/hdfs-fixture/build.gradle index 8aa0caad8ab..c885a285c4a 100644 --- a/test/fixtures/hdfs-fixture/build.gradle +++ b/test/fixtures/hdfs-fixture/build.gradle @@ -20,7 +20,7 @@ apply plugin: 'elasticsearch.build' dependencies { - compile "org.apache.hadoop:hadoop-minicluster:2.8.5" + api "org.apache.hadoop:hadoop-minicluster:2.8.5" } test.enabled = false diff --git a/test/fixtures/old-elasticsearch/build.gradle b/test/fixtures/old-elasticsearch/build.gradle index 5cfc02bbba3..76c71e1c126 100644 --- a/test/fixtures/old-elasticsearch/build.gradle +++ b/test/fixtures/old-elasticsearch/build.gradle @@ -28,5 +28,5 @@ test.enabled = false dependencies { // Just for the constants.... - compile "org.apache.lucene:lucene-core:${versions.lucene}" + api "org.apache.lucene:lucene-core:${versions.lucene}" } diff --git a/test/fixtures/s3-fixture/build.gradle b/test/fixtures/s3-fixture/build.gradle index cf4f6f42bb2..5bb7e114a15 100644 --- a/test/fixtures/s3-fixture/build.gradle +++ b/test/fixtures/s3-fixture/build.gradle @@ -23,7 +23,7 @@ description = 'Fixture for S3 Storage service' test.enabled = false dependencies { - compile project(':server') + api project(':server') } preProcessFixture { diff --git a/test/framework/build.gradle b/test/framework/build.gradle index a15844d3484..5cb0e685683 100644 --- a/test/framework/build.gradle +++ b/test/framework/build.gradle @@ -19,20 +19,20 @@ import org.elasticsearch.gradle.info.BuildParams; dependencies { - compile project(":client:rest") - compile project(":client:sniffer") - compile project(':libs:elasticsearch-nio') - compile project(":server") - compile project(":libs:elasticsearch-cli") - compile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" - compile "junit:junit:${versions.junit}" - compile "org.hamcrest:hamcrest:${versions.hamcrest}" - compile "org.apache.lucene:lucene-test-framework:${versions.lucene}" - compile "org.apache.lucene:lucene-codecs:${versions.lucene}" - compile "commons-logging:commons-logging:${versions.commonslogging}" - compile "commons-codec:commons-codec:${versions.commonscodec}" - compile "org.elasticsearch:securemock:${versions.securemock}" - compile "org.elasticsearch:mocksocket:${versions.mocksocket}" + api project(":client:rest") + api project(":client:sniffer") + api project(':libs:elasticsearch-nio') + api project(":server") + api project(":libs:elasticsearch-cli") + api "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" + api "junit:junit:${versions.junit}" + api "org.hamcrest:hamcrest:${versions.hamcrest}" + api "org.apache.lucene:lucene-test-framework:${versions.lucene}" + api "org.apache.lucene:lucene-codecs:${versions.lucene}" + api "commons-logging:commons-logging:${versions.commonslogging}" + api "commons-codec:commons-codec:${versions.commonscodec}" + api "org.elasticsearch:securemock:${versions.securemock}" + api "org.elasticsearch:mocksocket:${versions.mocksocket}" } compileJava.options.compilerArgs << '-Xlint:-cast,-rawtypes,-unchecked' diff --git a/test/logger-usage/build.gradle b/test/logger-usage/build.gradle index 2808b4c9932..fa12225ced3 100644 --- a/test/logger-usage/build.gradle +++ b/test/logger-usage/build.gradle @@ -18,10 +18,10 @@ */ dependencies { - compile 'org.ow2.asm:asm:7.1' - compile 'org.ow2.asm:asm-tree:7.1' - compile 'org.ow2.asm:asm-analysis:7.1' - compile "org.apache.logging.log4j:log4j-api:${versions.log4j}" + api 'org.ow2.asm:asm:7.1' + api 'org.ow2.asm:asm-tree:7.1' + api 'org.ow2.asm:asm-analysis:7.1' + api "org.apache.logging.log4j:log4j-api:${versions.log4j}" testImplementation project(":test:framework") } diff --git a/x-pack/license-tools/build.gradle b/x-pack/license-tools/build.gradle index fe74a868edc..cb3c749c94c 100644 --- a/x-pack/license-tools/build.gradle +++ b/x-pack/license-tools/build.gradle @@ -1,8 +1,8 @@ apply plugin: 'elasticsearch.build' dependencies { - compile project(':x-pack:plugin:core') - compile project(':server') + api project(':x-pack:plugin:core') + api project(':server') testImplementation project(':test:framework') } @@ -16,7 +16,7 @@ task buildZip(type: Zip, dependsOn: jar) { String parentDir = "license-tools-${archiveVersion}" into(parentDir + '/lib') { from jar - from configurations.runtime + from configurations.runtimeClasspath } into(parentDir + '/bin') { from 'bin' diff --git a/x-pack/plugin/analytics/build.gradle b/x-pack/plugin/analytics/build.gradle index d2d8ef871bb..06ba7469e43 100644 --- a/x-pack/plugin/analytics/build.gradle +++ b/x-pack/plugin/analytics/build.gradle @@ -19,7 +19,7 @@ dependencies { compileOnly project(path: xpackModule('core'), configuration: 'default') testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') - compile 'org.apache.commons:commons-math3:3.2' + api 'org.apache.commons:commons-math3:3.2' } integTest.enabled = false diff --git a/x-pack/plugin/async-search/qa/build.gradle b/x-pack/plugin/async-search/qa/build.gradle index 79ff4091f6d..75d524cc115 100644 --- a/x-pack/plugin/async-search/qa/build.gradle +++ b/x-pack/plugin/async-search/qa/build.gradle @@ -4,5 +4,5 @@ apply plugin: 'elasticsearch.build' test.enabled = false dependencies { - compile project(':test:framework') + api project(':test:framework') } diff --git a/x-pack/plugin/async-search/qa/security/build.gradle b/x-pack/plugin/async-search/qa/security/build.gradle index 0870fae96f8..8f2d0fb7285 100644 --- a/x-pack/plugin/async-search/qa/security/build.gradle +++ b/x-pack/plugin/async-search/qa/security/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'elasticsearch.rest-test' dependencies { testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') - testImplementation project(path: xpackModule('async-search'), configuration: 'runtime') + testImplementation project(xpackModule('async-search')) testImplementation project(':x-pack:plugin:async-search:qa') } diff --git a/x-pack/plugin/autoscaling/qa/build.gradle b/x-pack/plugin/autoscaling/qa/build.gradle index e1c6fb4f95b..53a1915bb2a 100644 --- a/x-pack/plugin/autoscaling/qa/build.gradle +++ b/x-pack/plugin/autoscaling/qa/build.gradle @@ -2,5 +2,5 @@ apply plugin: 'elasticsearch.build' test.enabled = false dependencies { - compile project(':test:framework') + api project(':test:framework') } diff --git a/x-pack/plugin/autoscaling/qa/rest/build.gradle b/x-pack/plugin/autoscaling/qa/rest/build.gradle index b25ffe403de..79a3bb98cd5 100644 --- a/x-pack/plugin/autoscaling/qa/rest/build.gradle +++ b/x-pack/plugin/autoscaling/qa/rest/build.gradle @@ -6,7 +6,7 @@ apply plugin: 'elasticsearch.standalone-test' dependencies { testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') - testImplementation project(path: xpackModule('autoscaling'), configuration: 'runtime') + testImplementation project(xpackModule('autoscaling')) } restResources { diff --git a/x-pack/plugin/ccr/qa/build.gradle b/x-pack/plugin/ccr/qa/build.gradle index e1c6fb4f95b..53a1915bb2a 100644 --- a/x-pack/plugin/ccr/qa/build.gradle +++ b/x-pack/plugin/ccr/qa/build.gradle @@ -2,5 +2,5 @@ apply plugin: 'elasticsearch.build' test.enabled = false dependencies { - compile project(':test:framework') + api project(':test:framework') } diff --git a/x-pack/plugin/ccr/qa/downgrade-to-basic-license/build.gradle b/x-pack/plugin/ccr/qa/downgrade-to-basic-license/build.gradle index 0ddcd62a031..28e6e7a65fe 100644 --- a/x-pack/plugin/ccr/qa/downgrade-to-basic-license/build.gradle +++ b/x-pack/plugin/ccr/qa/downgrade-to-basic-license/build.gradle @@ -6,7 +6,7 @@ apply plugin: 'elasticsearch.standalone-test' dependencies { testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') - testImplementation project(path: xpackModule('ccr'), configuration: 'runtime') + testImplementation project(xpackModule('ccr')) testImplementation project(':x-pack:plugin:ccr:qa') } diff --git a/x-pack/plugin/ccr/qa/multi-cluster/build.gradle b/x-pack/plugin/ccr/qa/multi-cluster/build.gradle index 1f1849759f3..1fcccf36376 100644 --- a/x-pack/plugin/ccr/qa/multi-cluster/build.gradle +++ b/x-pack/plugin/ccr/qa/multi-cluster/build.gradle @@ -5,7 +5,7 @@ apply plugin: 'elasticsearch.standalone-test' dependencies { testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') - testImplementation project(path: xpackModule('ccr'), configuration: 'runtime') + testImplementation project(xpackModule('ccr')) testImplementation project(':x-pack:plugin:ccr:qa') } diff --git a/x-pack/plugin/ccr/qa/non-compliant-license/build.gradle b/x-pack/plugin/ccr/qa/non-compliant-license/build.gradle index 51fdcbec4ba..293efbd847f 100644 --- a/x-pack/plugin/ccr/qa/non-compliant-license/build.gradle +++ b/x-pack/plugin/ccr/qa/non-compliant-license/build.gradle @@ -5,7 +5,7 @@ apply plugin: 'elasticsearch.standalone-test' dependencies { testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') - testImplementation project(path: xpackModule('ccr'), configuration: 'runtime') + testImplementation project(xpackModule('ccr')) testImplementation project(':x-pack:plugin:ccr:qa:') } diff --git a/x-pack/plugin/ccr/qa/rest/build.gradle b/x-pack/plugin/ccr/qa/rest/build.gradle index 3433afbd774..5d7b237075d 100644 --- a/x-pack/plugin/ccr/qa/rest/build.gradle +++ b/x-pack/plugin/ccr/qa/rest/build.gradle @@ -12,7 +12,7 @@ restResources { dependencies { testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') - testImplementation project(path: xpackModule('ccr'), configuration: 'runtime') + testImplementation project(path: xpackModule('ccr')) } task restTest(type: RestIntegTestTask) { diff --git a/x-pack/plugin/ccr/qa/security/build.gradle b/x-pack/plugin/ccr/qa/security/build.gradle index 85c1f01ebf4..01368adeed6 100644 --- a/x-pack/plugin/ccr/qa/security/build.gradle +++ b/x-pack/plugin/ccr/qa/security/build.gradle @@ -5,10 +5,18 @@ apply plugin: 'elasticsearch.standalone-test' dependencies { testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') - testImplementation project(path: xpackModule('ccr'), configuration: 'runtime') + testImplementation project(path: xpackModule('ccr')) testImplementation project(':x-pack:plugin:ccr:qa') } +task resolve { + doLast { + configurations.testCompileClasspath.files.each { + println it + } + println "configurations.testCompileClasspath.files " + configurations.testCompileClasspath.files.size() + } +} task 'leader-cluster'(type: RestIntegTestTask) { mustRunAfter(precommit) runner { diff --git a/x-pack/plugin/core/build.gradle b/x-pack/plugin/core/build.gradle index 5e7fdda0f69..81000f1539d 100644 --- a/x-pack/plugin/core/build.gradle +++ b/x-pack/plugin/core/build.gradle @@ -25,20 +25,20 @@ tasks.named("dependencyLicenses").configure { dependencies { compileOnly project(":server") - compile project(":libs:elasticsearch-ssl-config") - compile "org.apache.httpcomponents:httpclient:${versions.httpclient}" - compile "org.apache.httpcomponents:httpcore:${versions.httpcore}" - compile "org.apache.httpcomponents:httpcore-nio:${versions.httpcore}" - compile "org.apache.httpcomponents:httpasyncclient:${versions.httpasyncclient}" + api project(":libs:elasticsearch-ssl-config") + api "org.apache.httpcomponents:httpclient:${versions.httpclient}" + api "org.apache.httpcomponents:httpcore:${versions.httpcore}" + api "org.apache.httpcomponents:httpcore-nio:${versions.httpcore}" + api "org.apache.httpcomponents:httpasyncclient:${versions.httpasyncclient}" - compile "commons-logging:commons-logging:${versions.commonslogging}" - compile "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}" - compile "commons-codec:commons-codec:${versions.commonscodec}" + api "commons-logging:commons-logging:${versions.commonslogging}" + api "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}" + api "commons-codec:commons-codec:${versions.commonscodec}" // security deps - compile 'com.unboundid:unboundid-ldapsdk:4.0.8' - compile project(path: ':modules:transport-netty4', configuration: 'runtime') - compile(project(path: ':plugins:transport-nio', configuration: 'runtime')) { + api 'com.unboundid:unboundid-ldapsdk:4.0.8' + api project(path: ':modules:transport-netty4') + api( project(path: ':plugins:transport-nio')) { // TODO: core exclusion should not be necessary, since it is a transitive dep of all plugins exclude group: "org.elasticsearch", module: "elasticsearch-core" } @@ -47,11 +47,12 @@ dependencies { testImplementation "org.elasticsearch:mocksocket:${versions.mocksocket}" testImplementation "org.apache.logging.log4j:log4j-slf4j-impl:${versions.log4j}" testImplementation "org.slf4j:slf4j-api:${versions.slf4j}" - testImplementation project(path: ':modules:reindex', configuration: 'runtime') - testImplementation project(path: ':modules:parent-join', configuration: 'runtime') - testImplementation project(path: ':modules:lang-mustache', configuration: 'runtime') - testImplementation project(path: ':modules:analysis-common', configuration: 'runtime') - testImplementation project(':client:rest-high-level') + testImplementation project(path: ':modules:reindex') + testImplementation project(path: ':modules:parent-join') + testImplementation project(path: ':modules:lang-mustache') + testImplementation project(path: ':modules:analysis-common') + testImplementation project(":client:rest-high-level") + testImplementation(project(':x-pack:license-tools')) { transitive = false } diff --git a/x-pack/plugin/enrich/qa/build.gradle b/x-pack/plugin/enrich/qa/build.gradle index 79ff4091f6d..75d524cc115 100644 --- a/x-pack/plugin/enrich/qa/build.gradle +++ b/x-pack/plugin/enrich/qa/build.gradle @@ -4,5 +4,5 @@ apply plugin: 'elasticsearch.build' test.enabled = false dependencies { - compile project(':test:framework') + api project(':test:framework') } diff --git a/x-pack/plugin/enrich/qa/common/build.gradle b/x-pack/plugin/enrich/qa/common/build.gradle index e1c6fb4f95b..53a1915bb2a 100644 --- a/x-pack/plugin/enrich/qa/common/build.gradle +++ b/x-pack/plugin/enrich/qa/common/build.gradle @@ -2,5 +2,5 @@ apply plugin: 'elasticsearch.build' test.enabled = false dependencies { - compile project(':test:framework') + api project(':test:framework') } diff --git a/x-pack/plugin/enrich/qa/rest-with-security/build.gradle b/x-pack/plugin/enrich/qa/rest-with-security/build.gradle index 2bcc86b95a5..901a4a88557 100644 --- a/x-pack/plugin/enrich/qa/rest-with-security/build.gradle +++ b/x-pack/plugin/enrich/qa/rest-with-security/build.gradle @@ -3,9 +3,9 @@ apply plugin: 'elasticsearch.standalone-rest-test' apply plugin: 'elasticsearch.rest-test' dependencies { - testImplementation project(path: xpackModule('enrich'), configuration: 'runtime') - testImplementation project(path: xpackModule('core'), configuration: 'runtime') - testImplementation project(path: xpackModule('enrich:qa:common'), configuration: 'runtime') + testImplementation project(path: xpackModule('enrich')) + testImplementation project(path: xpackModule('core')) + testImplementation project(path: xpackModule('enrich:qa:common')) } testClusters.integTest { diff --git a/x-pack/plugin/enrich/qa/rest/build.gradle b/x-pack/plugin/enrich/qa/rest/build.gradle index 6cf561519c8..aceca6945b0 100644 --- a/x-pack/plugin/enrich/qa/rest/build.gradle +++ b/x-pack/plugin/enrich/qa/rest/build.gradle @@ -10,8 +10,8 @@ restResources { } dependencies { - testImplementation project(path: xpackModule('enrich'), configuration: 'runtime') - testImplementation project(path: xpackModule('enrich:qa:common'), configuration: 'runtime') + testImplementation project(path: xpackModule('enrich')) + testImplementation project(path: xpackModule('enrich:qa:common')) } testClusters.integTest { diff --git a/x-pack/plugin/eql/build.gradle b/x-pack/plugin/eql/build.gradle index eadf6605393..ecb517d462f 100644 --- a/x-pack/plugin/eql/build.gradle +++ b/x-pack/plugin/eql/build.gradle @@ -32,18 +32,18 @@ dependencies { compileOnly(project(':modules:lang-painless')) { exclude group: "org.ow2.asm" } - compile "org.antlr:antlr4-runtime:${antlrVersion}" + api "org.antlr:antlr4-runtime:${antlrVersion}" compileOnly project(path: xpackModule('ql'), configuration: 'default') testImplementation project(':test:framework') testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') testImplementation project(path: xpackModule('security'), configuration: 'testArtifacts') testImplementation project(path: xpackModule('ql'), configuration: 'testArtifacts') - testImplementation project(path: ':modules:reindex', configuration: 'runtime') - testImplementation project(path: ':modules:parent-join', configuration: 'runtime') - testImplementation project(path: ':modules:analysis-common', configuration: 'runtime') - testImplementation project(path: ':modules:transport-netty4', configuration: 'runtime') // for http in RestEqlCancellationIT - testImplementation project(path: ':plugins:transport-nio', configuration: 'runtime') // for http in RestEqlCancellationIT + testImplementation project(path: ':modules:reindex') + testImplementation project(path: ':modules:parent-join') + testImplementation project(path: ':modules:analysis-common') + testImplementation project(path: ':modules:transport-netty4') // for http in RestEqlCancellationIT + testImplementation project(path: ':plugins:transport-nio') // for http in RestEqlCancellationIT } diff --git a/x-pack/plugin/eql/qa/build.gradle b/x-pack/plugin/eql/qa/build.gradle index 79ff4091f6d..75d524cc115 100644 --- a/x-pack/plugin/eql/qa/build.gradle +++ b/x-pack/plugin/eql/qa/build.gradle @@ -4,5 +4,5 @@ apply plugin: 'elasticsearch.build' test.enabled = false dependencies { - compile project(':test:framework') + api project(':test:framework') } diff --git a/x-pack/plugin/eql/qa/common/build.gradle b/x-pack/plugin/eql/qa/common/build.gradle index 6d980017391..d41a69643ba 100644 --- a/x-pack/plugin/eql/qa/common/build.gradle +++ b/x-pack/plugin/eql/qa/common/build.gradle @@ -2,10 +2,10 @@ apply plugin: 'elasticsearch.build' test.enabled = false dependencies { - compile project(':test:framework') - compile project(path: xpackModule('core'), configuration: 'default') - compile project(path: xpackModule('core'), configuration: 'testArtifacts') + api project(':test:framework') + api project(path: xpackModule('core'), configuration: 'default') + api project(path: xpackModule('core'), configuration: 'testArtifacts') // TOML parser for EqlActionIT tests - compile 'io.ous:jtoml:2.0.0' + api 'io.ous:jtoml:2.0.0' } diff --git a/x-pack/plugin/eql/qa/rest/build.gradle b/x-pack/plugin/eql/qa/rest/build.gradle index efa7e712dbe..3bc5401a172 100644 --- a/x-pack/plugin/eql/qa/rest/build.gradle +++ b/x-pack/plugin/eql/qa/rest/build.gradle @@ -12,8 +12,8 @@ restResources { } dependencies { - testImplementation project(path: xpackModule('eql'), configuration: 'runtime') - testImplementation project(path: xpackModule('eql:qa:common'), configuration: 'runtime') + testImplementation project(path: xpackModule('eql')) + testImplementation project(path: xpackModule('eql:qa:common')) } testClusters.integTest { diff --git a/x-pack/plugin/eql/qa/security/build.gradle b/x-pack/plugin/eql/qa/security/build.gradle index 4a20f5adc63..a6048a2ca14 100644 --- a/x-pack/plugin/eql/qa/security/build.gradle +++ b/x-pack/plugin/eql/qa/security/build.gradle @@ -5,8 +5,8 @@ apply plugin: 'elasticsearch.standalone-rest-test' apply plugin: 'elasticsearch.rest-test' dependencies { - testImplementation project(path: xpackModule('eql'), configuration: 'runtime') - testImplementation project(path: xpackModule('eql:qa:common'), configuration: 'runtime') + testImplementation project(path: xpackModule('eql')) + testImplementation project(path: xpackModule('eql:qa:common')) } testClusters.integTest { diff --git a/x-pack/plugin/identity-provider/build.gradle b/x-pack/plugin/identity-provider/build.gradle index 87bf1f62ac1..6f064807362 100644 --- a/x-pack/plugin/identity-provider/build.gradle +++ b/x-pack/plugin/identity-provider/build.gradle @@ -20,34 +20,34 @@ dependencies { testImplementation project(path: xpackModule('security'), configuration: 'testArtifacts') // the following are all SAML dependencies - might as well download the whole internet - compile "org.opensaml:opensaml-core:3.4.5" - compile "org.opensaml:opensaml-saml-api:3.4.5" - compile "org.opensaml:opensaml-saml-impl:3.4.5" - compile "org.opensaml:opensaml-messaging-api:3.4.5" - compile "org.opensaml:opensaml-messaging-impl:3.4.5" - compile "org.opensaml:opensaml-security-api:3.4.5" - compile "org.opensaml:opensaml-security-impl:3.4.5" - compile "org.opensaml:opensaml-profile-api:3.4.5" - compile "org.opensaml:opensaml-profile-impl:3.4.5" - compile "org.opensaml:opensaml-xmlsec-api:3.4.5" - compile "org.opensaml:opensaml-xmlsec-impl:3.4.5" - compile "org.opensaml:opensaml-soap-api:3.4.5" - compile "org.opensaml:opensaml-soap-impl:3.4.5" - compile "org.opensaml:opensaml-storage-api:3.4.5" - compile "org.opensaml:opensaml-storage-impl:3.4.5" - compile "net.shibboleth.utilities:java-support:7.5.1" - compile "org.apache.santuario:xmlsec:2.1.4" - compile "io.dropwizard.metrics:metrics-core:3.2.2" - compile ("org.cryptacular:cryptacular:1.2.4") { + api "org.opensaml:opensaml-core:3.4.5" + api "org.opensaml:opensaml-saml-api:3.4.5" + api "org.opensaml:opensaml-saml-impl:3.4.5" + api "org.opensaml:opensaml-messaging-api:3.4.5" + api "org.opensaml:opensaml-messaging-impl:3.4.5" + api "org.opensaml:opensaml-security-api:3.4.5" + api "org.opensaml:opensaml-security-impl:3.4.5" + api "org.opensaml:opensaml-profile-api:3.4.5" + api "org.opensaml:opensaml-profile-impl:3.4.5" + api "org.opensaml:opensaml-xmlsec-api:3.4.5" + api "org.opensaml:opensaml-xmlsec-impl:3.4.5" + api "org.opensaml:opensaml-soap-api:3.4.5" + api "org.opensaml:opensaml-soap-impl:3.4.5" + api "org.opensaml:opensaml-storage-api:3.4.5" + api "org.opensaml:opensaml-storage-impl:3.4.5" + api "net.shibboleth.utilities:java-support:7.5.1" + api "org.apache.santuario:xmlsec:2.1.4" + api "io.dropwizard.metrics:metrics-core:3.2.2" + api ("org.cryptacular:cryptacular:1.2.4") { exclude group: 'org.bouncycastle' } - compile "org.slf4j:slf4j-api:${versions.slf4j}" - compile "org.apache.logging.log4j:log4j-slf4j-impl:${versions.log4j}" - compile "org.apache.httpcomponents:httpclient:${versions.httpclient}" - compile "org.apache.httpcomponents:httpcore:${versions.httpcore}" - compile "org.apache.httpcomponents:httpasyncclient:${versions.httpasyncclient}" - compile "org.apache.httpcomponents:httpcore-nio:${versions.httpcore}" - compile "org.apache.httpcomponents:httpclient-cache:${versions.httpclient}" + api "org.slf4j:slf4j-api:${versions.slf4j}" + api "org.apache.logging.log4j:log4j-slf4j-impl:${versions.log4j}" + api "org.apache.httpcomponents:httpclient:${versions.httpclient}" + api "org.apache.httpcomponents:httpcore:${versions.httpcore}" + api "org.apache.httpcomponents:httpasyncclient:${versions.httpasyncclient}" + api "org.apache.httpcomponents:httpcore-nio:${versions.httpcore}" + api "org.apache.httpcomponents:httpclient-cache:${versions.httpclient}" runtimeOnly 'com.google.guava:guava:19.0' testImplementation 'org.elasticsearch:securemock:1.2' diff --git a/x-pack/plugin/ilm/qa/rest/build.gradle b/x-pack/plugin/ilm/qa/rest/build.gradle index 7776f5e145f..a39262682ef 100644 --- a/x-pack/plugin/ilm/qa/rest/build.gradle +++ b/x-pack/plugin/ilm/qa/rest/build.gradle @@ -5,7 +5,7 @@ apply plugin: 'elasticsearch.standalone-test' dependencies { testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') - testImplementation project(path: xpackModule('ilm'), configuration: 'runtime') + testImplementation project(path: xpackModule('ilm')) } restResources { diff --git a/x-pack/plugin/ml/build.gradle b/x-pack/plugin/ml/build.gradle index 84335ece7b5..837d6becf99 100644 --- a/x-pack/plugin/ml/build.gradle +++ b/x-pack/plugin/ml/build.gradle @@ -56,9 +56,9 @@ dependencies { testImplementation project(path: xpackModule('security'), configuration: 'testArtifacts') // ml deps - compile project(':libs:elasticsearch-grok') - compile "com.ibm.icu:icu4j:${versions.icu4j}" - compile "net.sf.supercsv:super-csv:${versions.supercsv}" + api project(':libs:elasticsearch-grok') + api "com.ibm.icu:icu4j:${versions.icu4j}" + api "net.sf.supercsv:super-csv:${versions.supercsv}" nativeBundle("org.elasticsearch.ml:ml-cpp:${project.version}@zip") { changing = true } diff --git a/x-pack/plugin/ml/qa/basic-multi-node/build.gradle b/x-pack/plugin/ml/qa/basic-multi-node/build.gradle index 2f5c4f78be1..074d1a4cf8a 100644 --- a/x-pack/plugin/ml/qa/basic-multi-node/build.gradle +++ b/x-pack/plugin/ml/qa/basic-multi-node/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'elasticsearch.rest-test' dependencies { testImplementation project(":x-pack:plugin:core") - testImplementation project(path: xpackModule('ml'), configuration: 'runtime') + testImplementation project(path: xpackModule('ml')) } testClusters.integTest { diff --git a/x-pack/plugin/ml/qa/disabled/build.gradle b/x-pack/plugin/ml/qa/disabled/build.gradle index 0f6270d9ef5..b53d322c8fa 100644 --- a/x-pack/plugin/ml/qa/disabled/build.gradle +++ b/x-pack/plugin/ml/qa/disabled/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'elasticsearch.rest-test' dependencies { testImplementation project(":x-pack:plugin:core") - testImplementation project(path: xpackModule('ml'), configuration: 'runtime') + testImplementation project(path: xpackModule('ml')) } testClusters.integTest { diff --git a/x-pack/plugin/ml/qa/native-multi-node-tests/build.gradle b/x-pack/plugin/ml/qa/native-multi-node-tests/build.gradle index 2cb4ff5ce87..2ebb8eb9a9f 100644 --- a/x-pack/plugin/ml/qa/native-multi-node-tests/build.gradle +++ b/x-pack/plugin/ml/qa/native-multi-node-tests/build.gradle @@ -5,7 +5,7 @@ apply plugin: 'elasticsearch.rest-test' dependencies { testImplementation project(path: xpackModule('core'), configuration: 'default') testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') - testImplementation project(path: xpackModule('ml'), configuration: 'runtime') + testImplementation project(path: xpackModule('ml')) testImplementation project(path: xpackModule('ml'), configuration: 'testArtifacts') testImplementation project(path: ':modules:ingest-common') } diff --git a/x-pack/plugin/ml/qa/no-bootstrap-tests/build.gradle b/x-pack/plugin/ml/qa/no-bootstrap-tests/build.gradle index a2ca102829d..4d2fdd603db 100644 --- a/x-pack/plugin/ml/qa/no-bootstrap-tests/build.gradle +++ b/x-pack/plugin/ml/qa/no-bootstrap-tests/build.gradle @@ -2,5 +2,5 @@ apply plugin: 'elasticsearch.standalone-test' dependencies { testImplementation project(":x-pack:plugin:core") - testImplementation project(path: xpackModule('ml'), configuration: 'runtime') + testImplementation project(path: xpackModule('ml')) } diff --git a/x-pack/plugin/ml/qa/single-node-tests/build.gradle b/x-pack/plugin/ml/qa/single-node-tests/build.gradle index ba9fe256a09..ddb0cf9b1b1 100644 --- a/x-pack/plugin/ml/qa/single-node-tests/build.gradle +++ b/x-pack/plugin/ml/qa/single-node-tests/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'elasticsearch.rest-test' dependencies { testImplementation project(":x-pack:plugin:core") - testImplementation project(path: xpackModule('ml'), configuration: 'runtime') + testImplementation project(path: xpackModule('ml')) } testClusters.integTest { diff --git a/x-pack/plugin/monitoring/build.gradle b/x-pack/plugin/monitoring/build.gradle index 148cdd30f98..6a25fc5b438 100644 --- a/x-pack/plugin/monitoring/build.gradle +++ b/x-pack/plugin/monitoring/build.gradle @@ -15,8 +15,8 @@ dependencies { testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') // monitoring deps - compile project(':client:rest') - compile project(':client:sniffer') + api project(':client:rest') + api project(':client:sniffer') // baz - this goes away after we separate out the actions #27759 testImplementation project(xpackModule('watcher')) diff --git a/x-pack/plugin/searchable-snapshots/qa/build.gradle b/x-pack/plugin/searchable-snapshots/qa/build.gradle index e1c6fb4f95b..53a1915bb2a 100644 --- a/x-pack/plugin/searchable-snapshots/qa/build.gradle +++ b/x-pack/plugin/searchable-snapshots/qa/build.gradle @@ -2,5 +2,5 @@ apply plugin: 'elasticsearch.build' test.enabled = false dependencies { - compile project(':test:framework') + api project(':test:framework') } diff --git a/x-pack/plugin/security/build.gradle b/x-pack/plugin/security/build.gradle index 373a5bfe6fe..7a0cb4ad60b 100644 --- a/x-pack/plugin/security/build.gradle +++ b/x-pack/plugin/security/build.gradle @@ -16,56 +16,56 @@ archivesBaseName = 'x-pack-security' dependencies { compileOnly project(path: xpackModule('core'), configuration: 'default') - compileOnly project(path: ':modules:transport-netty4', configuration: 'runtime') - compileOnly project(path: ':plugins:transport-nio', configuration: 'runtime') + compileOnly project(path: ':modules:transport-netty4') + compileOnly project(path: ':plugins:transport-nio') testImplementation project(path: xpackModule('monitoring')) testImplementation project(path: xpackModule('sql:sql-action')) testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') - compile 'com.unboundid:unboundid-ldapsdk:4.0.8' + api 'com.unboundid:unboundid-ldapsdk:4.0.8' // the following are all SAML dependencies - might as well download the whole internet - compile "org.opensaml:opensaml-core:3.4.5" - compile "org.opensaml:opensaml-saml-api:3.4.5" - compile "org.opensaml:opensaml-saml-impl:3.4.5" - compile "org.opensaml:opensaml-messaging-api:3.4.5" - compile "org.opensaml:opensaml-messaging-impl:3.4.5" - compile "org.opensaml:opensaml-security-api:3.4.5" - compile "org.opensaml:opensaml-security-impl:3.4.5" - compile "org.opensaml:opensaml-profile-api:3.4.5" - compile "org.opensaml:opensaml-profile-impl:3.4.5" - compile "org.opensaml:opensaml-xmlsec-api:3.4.5" - compile "org.opensaml:opensaml-xmlsec-impl:3.4.5" - compile "org.opensaml:opensaml-soap-api:3.4.5" - compile "org.opensaml:opensaml-soap-impl:3.4.5" - compile "org.opensaml:opensaml-storage-api:3.4.5" - compile "org.opensaml:opensaml-storage-impl:3.4.5" - compile "net.shibboleth.utilities:java-support:7.5.1" - compile "org.apache.santuario:xmlsec:2.1.4" - compile "io.dropwizard.metrics:metrics-core:3.2.2" - compile ("org.cryptacular:cryptacular:1.2.4") { + api "org.opensaml:opensaml-core:3.4.5" + api "org.opensaml:opensaml-saml-api:3.4.5" + api "org.opensaml:opensaml-saml-impl:3.4.5" + api "org.opensaml:opensaml-messaging-api:3.4.5" + api "org.opensaml:opensaml-messaging-impl:3.4.5" + api "org.opensaml:opensaml-security-api:3.4.5" + api "org.opensaml:opensaml-security-impl:3.4.5" + api "org.opensaml:opensaml-profile-api:3.4.5" + api "org.opensaml:opensaml-profile-impl:3.4.5" + api "org.opensaml:opensaml-xmlsec-api:3.4.5" + api "org.opensaml:opensaml-xmlsec-impl:3.4.5" + api "org.opensaml:opensaml-soap-api:3.4.5" + api "org.opensaml:opensaml-soap-impl:3.4.5" + api "org.opensaml:opensaml-storage-api:3.4.5" + api "org.opensaml:opensaml-storage-impl:3.4.5" + api "net.shibboleth.utilities:java-support:7.5.1" + api "org.apache.santuario:xmlsec:2.1.4" + api "io.dropwizard.metrics:metrics-core:3.2.2" + api ("org.cryptacular:cryptacular:1.2.4") { exclude group: 'org.bouncycastle' } - compile "org.slf4j:slf4j-api:${versions.slf4j}" - compile "org.apache.logging.log4j:log4j-slf4j-impl:${versions.log4j}" - compile "org.apache.httpcomponents:httpclient:${versions.httpclient}" - compile "org.apache.httpcomponents:httpcore:${versions.httpcore}" - compile "org.apache.httpcomponents:httpasyncclient:${versions.httpasyncclient}" - compile "org.apache.httpcomponents:httpcore-nio:${versions.httpcore}" - compile "org.apache.httpcomponents:httpclient-cache:${versions.httpclient}" + api "org.slf4j:slf4j-api:${versions.slf4j}" + api "org.apache.logging.log4j:log4j-slf4j-impl:${versions.log4j}" + api "org.apache.httpcomponents:httpclient:${versions.httpclient}" + api "org.apache.httpcomponents:httpcore:${versions.httpcore}" + api "org.apache.httpcomponents:httpasyncclient:${versions.httpasyncclient}" + api "org.apache.httpcomponents:httpcore-nio:${versions.httpcore}" + api "org.apache.httpcomponents:httpclient-cache:${versions.httpclient}" runtimeOnly 'com.google.guava:guava:19.0' // Dependencies for oidc - compile "com.nimbusds:oauth2-oidc-sdk:7.0.2" - compile "com.nimbusds:nimbus-jose-jwt:8.6" - compile "com.nimbusds:lang-tag:1.4.4" - compile "com.sun.mail:jakarta.mail:1.6.3" - compile "net.jcip:jcip-annotations:1.0" - compile "net.minidev:json-smart:2.3" - compile "net.minidev:accessors-smart:1.2" - compile "org.ow2.asm:asm:7.3.1" + api "com.nimbusds:oauth2-oidc-sdk:7.0.2" + api "com.nimbusds:nimbus-jose-jwt:8.6" + api "com.nimbusds:lang-tag:1.4.4" + api "com.sun.mail:jakarta.mail:1.6.3" + api "net.jcip:jcip-annotations:1.0" + api "net.minidev:json-smart:2.3" + api "net.minidev:accessors-smart:1.2" + api "org.ow2.asm:asm:7.3.1" testImplementation 'org.elasticsearch:securemock:1.2' testImplementation "org.elasticsearch:mocksocket:${versions.mocksocket}" diff --git a/x-pack/plugin/security/cli/build.gradle b/x-pack/plugin/security/cli/build.gradle index 9c9b46e7a4e..1cc90e62e69 100644 --- a/x-pack/plugin/security/cli/build.gradle +++ b/x-pack/plugin/security/cli/build.gradle @@ -8,8 +8,8 @@ archivesBaseName = 'elasticsearch-security-cli' dependencies { compileOnly project(":server") compileOnly project(path: xpackModule('core'), configuration: 'default') - compile "org.bouncycastle:bcpkix-jdk15on:${versions.bouncycastle}" - compile "org.bouncycastle:bcprov-jdk15on:${versions.bouncycastle}" + api "org.bouncycastle:bcpkix-jdk15on:${versions.bouncycastle}" + api "org.bouncycastle:bcprov-jdk15on:${versions.bouncycastle}" testImplementation('com.google.jimfs:jimfs:1.1') { // this is provided by the runtime classpath, from the security project exclude group: 'com.google.guava', module: 'guava' diff --git a/x-pack/plugin/spatial/build.gradle b/x-pack/plugin/spatial/build.gradle index a6669b4c461..644317b1b97 100644 --- a/x-pack/plugin/spatial/build.gradle +++ b/x-pack/plugin/spatial/build.gradle @@ -12,7 +12,7 @@ esplugin { dependencies { compileOnly project(path: xpackModule('core'), configuration: 'default') testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') - compile project(path: ':modules:geo', configuration: 'default') + api project(path: ':modules:geo', configuration: 'default') restTestConfig project(path: ':modules:geo', configuration: 'restTests') } diff --git a/x-pack/plugin/sql/build.gradle b/x-pack/plugin/sql/build.gradle index a5320298bd9..ef940572720 100644 --- a/x-pack/plugin/sql/build.gradle +++ b/x-pack/plugin/sql/build.gradle @@ -36,17 +36,17 @@ dependencies { // exclude ASM to not affect featureAware task on Java 10+ exclude group: "org.ow2.asm" } - compile project('sql-action') - compile project(':modules:aggs-matrix-stats') - compile "org.antlr:antlr4-runtime:${antlrVersion}" + api project('sql-action') + api project(':modules:aggs-matrix-stats') + api "org.antlr:antlr4-runtime:${antlrVersion}" compileOnly project(path: xpackModule('ql'), configuration: 'default') testImplementation project(':test:framework') testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') testImplementation project(path: xpackModule('security'), configuration: 'testArtifacts') testImplementation project(path: xpackModule('ql'), configuration: 'testArtifacts') - testImplementation project(path: ':modules:reindex', configuration: 'runtime') - testImplementation project(path: ':modules:parent-join', configuration: 'runtime') - testImplementation project(path: ':modules:analysis-common', configuration: 'runtime') + testImplementation project(path: ':modules:reindex') + testImplementation project(path: ':modules:parent-join') + testImplementation project(path: ':modules:analysis-common') bin(project(path: xpackModule('sql:sql-cli'), configuration: 'shadow')) } diff --git a/x-pack/plugin/sql/jdbc/build.gradle b/x-pack/plugin/sql/jdbc/build.gradle index db97f35c16f..28158b9a309 100644 --- a/x-pack/plugin/sql/jdbc/build.gradle +++ b/x-pack/plugin/sql/jdbc/build.gradle @@ -11,20 +11,20 @@ tasks.named('forbiddenApisMain').configure { } dependencies { - compile(xpackProject('plugin:sql:sql-client')) { + api(xpackProject('plugin:sql:sql-client')) { transitive = false } - compile(xpackProject('plugin:sql:sql-proto')) { + api(xpackProject('plugin:sql:sql-proto')) { transitive = false } - compile(project(':libs:elasticsearch-x-content')) { + api(project(':libs:elasticsearch-x-content')) { transitive = false } - compile(project(':libs:elasticsearch-geo')) { + api(project(':libs:elasticsearch-geo')) { transitive = false } - compile project(':libs:elasticsearch-core') - compile "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${versions.jackson}" + api project(':libs:elasticsearch-core') + api "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${versions.jackson}" runtime "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" testImplementation project(":test:framework") testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') diff --git a/x-pack/plugin/sql/qa/jdbc/build.gradle b/x-pack/plugin/sql/qa/jdbc/build.gradle index 875c15e0345..d0abe3126e9 100644 --- a/x-pack/plugin/sql/qa/jdbc/build.gradle +++ b/x-pack/plugin/sql/qa/jdbc/build.gradle @@ -5,10 +5,10 @@ apply plugin: 'elasticsearch.build' group = "org.elasticsearch.x-pack.qa.sql.jdbc" dependencies { - compile project(":test:framework") + api project(":test:framework") // JDBC testing dependencies - compile project(path: xpackModule('sql:jdbc')) + api project(path: xpackModule('sql:jdbc')) } /* disable unit tests because these are all integration tests used diff --git a/x-pack/plugin/sql/qa/server/build.gradle b/x-pack/plugin/sql/qa/server/build.gradle index 1e2c8754445..984a7d005d2 100644 --- a/x-pack/plugin/sql/qa/server/build.gradle +++ b/x-pack/plugin/sql/qa/server/build.gradle @@ -7,28 +7,28 @@ tasks.named('forbiddenApisMain').configure { } dependencies { - compile project(":test:framework") + api project(":test:framework") // JDBC testing dependencies - compile project(path: xpackModule('sql:jdbc')) + api project(path: xpackModule('sql:jdbc')) - compile "net.sourceforge.csvjdbc:csvjdbc:${csvjdbcVersion}" + api "net.sourceforge.csvjdbc:csvjdbc:${csvjdbcVersion}" // CLI testing dependencies - compile project(path: xpackModule('sql:sql-cli')) + api project(path: xpackModule('sql:sql-cli')) // H2GIS testing dependencies - compile("org.orbisgis:h2gis:${h2gisVersion}") { + api( "org.orbisgis:h2gis:${h2gisVersion}") { exclude group: "org.locationtech.jts" } // select just the parts of JLine that are needed - compile("org.jline:jline-terminal-jna:${jlineVersion}") { + api( "org.jline:jline-terminal-jna:${jlineVersion}") { exclude group: "net.java.dev.jna" } - compile "org.jline:jline-terminal:${jlineVersion}" - compile "org.jline:jline-reader:${jlineVersion}" - compile "org.jline:jline-style:${jlineVersion}" + api "org.jline:jline-terminal:${jlineVersion}" + api "org.jline:jline-reader:${jlineVersion}" + api "org.jline:jline-style:${jlineVersion}" testRuntime "org.elasticsearch:jna:${versions.jna}" } diff --git a/x-pack/plugin/sql/sql-action/build.gradle b/x-pack/plugin/sql/sql-action/build.gradle index 2c451cba2f3..16c770df263 100644 --- a/x-pack/plugin/sql/sql-action/build.gradle +++ b/x-pack/plugin/sql/sql-action/build.gradle @@ -9,18 +9,18 @@ description = 'Request and response objects shared by the cli, jdbc ' + dependencies { /* We'd like to just depend on xcontent but there are some bits of * :server that we rely on.... */ - compile(project(':server')) { + api(project(':server')) { transitive = false } - compile(project(':libs:elasticsearch-core')) { + api(project(':libs:elasticsearch-core')) { transitive = false } - compile(project(':libs:elasticsearch-x-content')) { + api(project(':libs:elasticsearch-x-content')) { transitive = false } - compile xpackProject('plugin:sql:sql-proto') - compile "org.apache.lucene:lucene-core:${versions.lucene}" - compile "joda-time:joda-time:${versions.joda}" + api xpackProject('plugin:sql:sql-proto') + api "org.apache.lucene:lucene-core:${versions.lucene}" + api "joda-time:joda-time:${versions.joda}" runtime "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" runtime "org.apache.logging.log4j:log4j-api:${versions.log4j}" runtime "org.apache.logging.log4j:log4j-core:${versions.log4j}" diff --git a/x-pack/plugin/sql/sql-cli/build.gradle b/x-pack/plugin/sql/sql-cli/build.gradle index 8424aa10863..40af9f5f0d4 100644 --- a/x-pack/plugin/sql/sql-cli/build.gradle +++ b/x-pack/plugin/sql/sql-cli/build.gradle @@ -19,17 +19,17 @@ description = 'Command line interface to Elasticsearch that speaks SQL' dependencies { // select just the parts of JLine that are needed - compile "org.jline:jline-terminal:${jlineVersion}" - compile("org.jline:jline-terminal-jna:${jlineVersion}") { + api "org.jline:jline-terminal:${jlineVersion}" + api( "org.jline:jline-terminal-jna:${jlineVersion}") { exclude group: "net.java.dev.jna" } - compile "org.jline:jline-reader:${jlineVersion}" - compile "org.jline:jline-style:${jlineVersion}" + api "org.jline:jline-reader:${jlineVersion}" + api "org.jline:jline-style:${jlineVersion}" - compile xpackProject('plugin:sql:sql-client') - compile xpackProject('plugin:sql:sql-action') - compile project(":libs:elasticsearch-cli") - compile project(':libs:elasticsearch-x-content') + api xpackProject('plugin:sql:sql-client') + api xpackProject('plugin:sql:sql-action') + api project(":libs:elasticsearch-cli") + api project(':libs:elasticsearch-x-content') runtime "org.elasticsearch:jna:${versions.jna}" testImplementation project(":test:framework") } diff --git a/x-pack/plugin/sql/sql-client/build.gradle b/x-pack/plugin/sql/sql-client/build.gradle index 793bf14d2c9..dee9c08a439 100644 --- a/x-pack/plugin/sql/sql-client/build.gradle +++ b/x-pack/plugin/sql/sql-client/build.gradle @@ -7,8 +7,8 @@ apply plugin: 'elasticsearch.build' description = 'Code shared between jdbc and cli' dependencies { - compile xpackProject('plugin:sql:sql-proto') - compile "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" + api xpackProject('plugin:sql:sql-proto') + api "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" testImplementation project(":test:framework") testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') } diff --git a/x-pack/plugin/sql/sql-proto/build.gradle b/x-pack/plugin/sql/sql-proto/build.gradle index 87e971aff2c..828ee5fa694 100644 --- a/x-pack/plugin/sql/sql-proto/build.gradle +++ b/x-pack/plugin/sql/sql-proto/build.gradle @@ -7,10 +7,10 @@ description = 'Request and response objects shared by the cli, jdbc ' + 'and the Elasticsearch plugin' dependencies { - compile(project(':libs:elasticsearch-core')) { + api(project(':libs:elasticsearch-core')) { transitive = false } - compile(project(':libs:elasticsearch-x-content')) { + api( project(':libs:elasticsearch-x-content')) { transitive = false } runtime "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" diff --git a/x-pack/plugin/transform/build.gradle b/x-pack/plugin/transform/build.gradle index 93251a19e58..d1dae19956d 100644 --- a/x-pack/plugin/transform/build.gradle +++ b/x-pack/plugin/transform/build.gradle @@ -13,8 +13,8 @@ dependencies { compileOnly project(path: xpackModule('core'), configuration: 'default') testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') - testImplementation project(path: xpackModule('analytics'), configuration: 'runtime') - testImplementation project(path: ':modules:aggs-matrix-stats', configuration: 'runtime') + testImplementation project(path: xpackModule('analytics')) + testImplementation project(path: ':modules:aggs-matrix-stats') } // xpack modules are installed in real clusters as the meta plugin, so diff --git a/x-pack/plugin/transform/qa/multi-node-tests/build.gradle b/x-pack/plugin/transform/qa/multi-node-tests/build.gradle index d24a013487f..75a78673b40 100644 --- a/x-pack/plugin/transform/qa/multi-node-tests/build.gradle +++ b/x-pack/plugin/transform/qa/multi-node-tests/build.gradle @@ -5,7 +5,7 @@ apply plugin: 'elasticsearch.rest-test' dependencies { testImplementation project(path: xpackModule('core'), configuration: 'default') testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') - testImplementation project(path: xpackModule('transform'), configuration: 'runtime') + testImplementation project(xpackModule('transform')) testImplementation project(':client:rest-high-level') } diff --git a/x-pack/plugin/transform/qa/single-node-tests/build.gradle b/x-pack/plugin/transform/qa/single-node-tests/build.gradle index b16b57674e6..4cb27bc9a0a 100644 --- a/x-pack/plugin/transform/qa/single-node-tests/build.gradle +++ b/x-pack/plugin/transform/qa/single-node-tests/build.gradle @@ -5,7 +5,7 @@ apply plugin: 'elasticsearch.rest-test' dependencies { testImplementation project(path: xpackModule('core'), configuration: 'default') testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') - testImplementation project(path: xpackModule('transform'), configuration: 'runtime') + testImplementation project(xpackModule('transform')) testImplementation project(':client:rest-high-level') } diff --git a/x-pack/plugin/watcher/build.gradle b/x-pack/plugin/watcher/build.gradle index 0c17e7349d8..9933f018348 100644 --- a/x-pack/plugin/watcher/build.gradle +++ b/x-pack/plugin/watcher/build.gradle @@ -26,18 +26,18 @@ tasks.named("dependencyLicenses").configure { dependencies { compileOnly project(':server') compileOnly project(path: xpackModule('core'), configuration: 'default') - compileOnly project(path: ':modules:transport-netty4', configuration: 'runtime') - compileOnly project(path: ':plugins:transport-nio', configuration: 'runtime') + compileOnly project(path: ':modules:transport-netty4') + compileOnly project(path: ':plugins:transport-nio') testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') testImplementation project(xpackModule('ilm')) // watcher deps - compile 'com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:20191001.1' + api 'com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:20191001.1' runtimeOnly 'com.google.guava:guava:27.1-jre' // needed by watcher for the html sanitizer runtimeOnly 'com.google.guava:failureaccess:1.0.1' - compile 'com.sun.mail:jakarta.mail:1.6.4' - compile 'com.sun.activation:jakarta.activation:1.2.1' + api 'com.sun.mail:jakarta.mail:1.6.4' + api 'com.sun.activation:jakarta.activation:1.2.1' compileOnly "org.apache.httpcomponents:httpclient:${versions.httpclient}" compileOnly "org.apache.httpcomponents:httpcore:${versions.httpcore}" diff --git a/x-pack/qa/build.gradle b/x-pack/qa/build.gradle index f933cac8d31..908bc14d45e 100644 --- a/x-pack/qa/build.gradle +++ b/x-pack/qa/build.gradle @@ -5,5 +5,5 @@ apply plugin: 'elasticsearch.build' test.enabled = false dependencies { - compile project(':test:framework') + api project(':test:framework') } diff --git a/x-pack/qa/security-client-tests/build.gradle b/x-pack/qa/security-client-tests/build.gradle index 54948b4f2de..f90c29844f7 100644 --- a/x-pack/qa/security-client-tests/build.gradle +++ b/x-pack/qa/security-client-tests/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'elasticsearch.rest-test' dependencies { testImplementation project(xpackModule('core')) - testImplementation project(path: xpackProject('transport-client').path, configuration: 'runtime') + testImplementation project(xpackProject('transport-client').path) } String outputDir = "${buildDir}/generated-resources/${project.name}" diff --git a/x-pack/qa/security-example-spi-extension/build.gradle b/x-pack/qa/security-example-spi-extension/build.gradle index 81b95cb5a94..0361f9e9f7e 100644 --- a/x-pack/qa/security-example-spi-extension/build.gradle +++ b/x-pack/qa/security-example-spi-extension/build.gradle @@ -10,7 +10,7 @@ esplugin { dependencies { compileOnly project(':x-pack:plugin:core') - testImplementation project(path: xpackProject('transport-client').path, configuration: 'runtime') + testImplementation project(xpackProject('transport-client').path) } diff --git a/x-pack/qa/security-migrate-tests/build.gradle b/x-pack/qa/security-migrate-tests/build.gradle index 80fa3179d64..65256fc8b55 100644 --- a/x-pack/qa/security-migrate-tests/build.gradle +++ b/x-pack/qa/security-migrate-tests/build.gradle @@ -3,8 +3,8 @@ apply plugin: 'elasticsearch.rest-test' dependencies { testImplementation project(xpackModule('core')) - testImplementation project(path: xpackModule('security'), configuration: 'runtime') - testImplementation project(path: xpackProject('transport-client').path, configuration: 'runtime') + testImplementation project(path: xpackModule('security')) + testImplementation project(path: xpackProject('transport-client').path) } testClusters.integTest { diff --git a/x-pack/qa/security-setup-password-tests/build.gradle b/x-pack/qa/security-setup-password-tests/build.gradle index 4e520f76e81..0641d9d937f 100644 --- a/x-pack/qa/security-setup-password-tests/build.gradle +++ b/x-pack/qa/security-setup-password-tests/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'elasticsearch.rest-test' dependencies { testImplementation project(path: xpackModule('core'), configuration: 'default') - testImplementation project(path: xpackModule('security'), configuration: 'runtime') + testImplementation project(path: xpackModule('security')) testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') } diff --git a/x-pack/qa/third-party/jira/build.gradle b/x-pack/qa/third-party/jira/build.gradle index b5e53328b86..3aa4a9f506d 100644 --- a/x-pack/qa/third-party/jira/build.gradle +++ b/x-pack/qa/third-party/jira/build.gradle @@ -9,7 +9,7 @@ apply plugin: 'elasticsearch.rest-test' dependencies { testImplementation project(':x-pack:plugin:core') - testImplementation project(path: xpackModule('watcher'), configuration: 'runtime') + testImplementation project(path: xpackModule('watcher')) } restResources { diff --git a/x-pack/qa/third-party/pagerduty/build.gradle b/x-pack/qa/third-party/pagerduty/build.gradle index fdaec66a97f..b35f1b6c871 100644 --- a/x-pack/qa/third-party/pagerduty/build.gradle +++ b/x-pack/qa/third-party/pagerduty/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'elasticsearch.rest-test' dependencies { testImplementation project(':x-pack:plugin:core') - testImplementation project(path: xpackModule('watcher'), configuration: 'runtime') + testImplementation project(path: xpackModule('watcher')) } String pagerDutyServiceKey = System.getenv('pagerduty_service_api_key') diff --git a/x-pack/qa/third-party/slack/build.gradle b/x-pack/qa/third-party/slack/build.gradle index 1e42d69519e..0028c2a6802 100644 --- a/x-pack/qa/third-party/slack/build.gradle +++ b/x-pack/qa/third-party/slack/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'elasticsearch.rest-test' dependencies { testImplementation project(':x-pack:plugin:core') - testImplementation project(path: xpackModule('watcher'), configuration: 'runtime') + testImplementation project(path: xpackModule('watcher')) } restResources { diff --git a/x-pack/qa/transport-client-tests/build.gradle b/x-pack/qa/transport-client-tests/build.gradle index 05b7aff4ede..d12b28cd6b3 100644 --- a/x-pack/qa/transport-client-tests/build.gradle +++ b/x-pack/qa/transport-client-tests/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'elasticsearch.rest-test' dependencies { testImplementation project(xpackModule('core')) - testImplementation project(path: xpackProject('transport-client').path, configuration: 'runtime') + testImplementation project(path: xpackProject('transport-client').path) } testClusters.integTest { diff --git a/x-pack/snapshot-tool/build.gradle b/x-pack/snapshot-tool/build.gradle index 63d75f8a124..c80157feff6 100644 --- a/x-pack/snapshot-tool/build.gradle +++ b/x-pack/snapshot-tool/build.gradle @@ -13,56 +13,56 @@ import org.elasticsearch.gradle.ElasticsearchDistribution apply plugin: 'elasticsearch.build' dependencies { - compile project(":server") - compile project(":libs:elasticsearch-cli") + api project(":server") + api project(":libs:elasticsearch-cli") testImplementation project(":test:framework") - compile "com.amazonaws:aws-java-sdk-s3:${versions.aws}" - compile "com.amazonaws:aws-java-sdk-core:${versions.aws}" - compile "com.amazonaws:jmespath-java:${versions.aws}" - compile "org.apache.httpcomponents:httpclient:${versions.httpclient}" - compile "org.apache.httpcomponents:httpcore:${versions.httpcore}" - compile "commons-logging:commons-logging:${versions.commonslogging}" - compile "commons-codec:commons-codec:${versions.commonscodec}" - compile "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}" - compile "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" - compile "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}" - compile "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}" + api "com.amazonaws:aws-java-sdk-s3:${versions.aws}" + api "com.amazonaws:aws-java-sdk-core:${versions.aws}" + api "com.amazonaws:jmespath-java:${versions.aws}" + api "org.apache.httpcomponents:httpclient:${versions.httpclient}" + api "org.apache.httpcomponents:httpcore:${versions.httpcore}" + api "commons-logging:commons-logging:${versions.commonslogging}" + api "commons-codec:commons-codec:${versions.commonscodec}" + api "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}" + api "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" + api "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}" + api "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}" // GCS dependencies - compile 'com.google.cloud:google-cloud-storage:1.106.0' - compile 'com.google.cloud:google-cloud-core:1.93.3' - compile 'com.google.http-client:google-http-client:1.34.2' - compile "org.apache.httpcomponents:httpclient:${versions.httpclient}" - compile "org.apache.httpcomponents:httpcore:${versions.httpcore}" - compile "commons-logging:commons-logging:${versions.commonslogging}" - compile "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}" - compile "commons-codec:commons-codec:${versions.commonscodec}" - compile 'com.google.api:api-common:1.8.1' - compile 'com.google.api:gax:1.54.0' - compile 'org.threeten:threetenbp:1.4.1' - compile 'com.google.protobuf:protobuf-java-util:3.11.3' - compile 'com.google.protobuf:protobuf-java:3.11.3' - compile 'com.google.code.gson:gson:2.7' - compile 'com.google.api.grpc:proto-google-common-protos:1.16.0' - compile 'com.google.api.grpc:proto-google-iam-v1:0.12.0' - compile 'com.google.cloud:google-cloud-core-http:1.93.3' - compile 'com.google.auth:google-auth-library-credentials:0.20.0' - compile 'com.google.auth:google-auth-library-oauth2-http:0.20.0' - compile 'com.google.oauth-client:google-oauth-client:1.28.0' - compile 'com.google.api-client:google-api-client:1.30.9' - compile 'com.google.http-client:google-http-client-appengine:1.34.2' - compile 'com.google.http-client:google-http-client-jackson2:1.34.2' - compile 'com.google.api:gax-httpjson:0.62.0' - compile 'io.grpc:grpc-context:1.12.0' - compile 'io.opencensus:opencensus-api:0.18.0' - compile 'io.opencensus:opencensus-contrib-http-util:0.18.0' - compile 'com.google.apis:google-api-services-storage:v1-rev20200226-1.30.9' + api 'com.google.cloud:google-cloud-storage:1.106.0' + api 'com.google.cloud:google-cloud-core:1.93.3' + api 'com.google.http-client:google-http-client:1.34.2' + api "org.apache.httpcomponents:httpclient:${versions.httpclient}" + api "org.apache.httpcomponents:httpcore:${versions.httpcore}" + api "commons-logging:commons-logging:${versions.commonslogging}" + api "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}" + api "commons-codec:commons-codec:${versions.commonscodec}" + api 'com.google.api:api-common:1.8.1' + api 'com.google.api:gax:1.54.0' + api 'org.threeten:threetenbp:1.4.1' + api 'com.google.protobuf:protobuf-java-util:3.11.3' + api 'com.google.protobuf:protobuf-java:3.11.3' + api 'com.google.code.gson:gson:2.7' + api 'com.google.api.grpc:proto-google-common-protos:1.16.0' + api 'com.google.api.grpc:proto-google-iam-v1:0.12.0' + api 'com.google.cloud:google-cloud-core-http:1.93.3' + api 'com.google.auth:google-auth-library-credentials:0.20.0' + api 'com.google.auth:google-auth-library-oauth2-http:0.20.0' + api 'com.google.oauth-client:google-oauth-client:1.28.0' + api 'com.google.api-client:google-api-client:1.30.9' + api 'com.google.http-client:google-http-client-appengine:1.34.2' + api 'com.google.http-client:google-http-client-jackson2:1.34.2' + api 'com.google.api:gax-httpjson:0.62.0' + api 'io.grpc:grpc-context:1.12.0' + api 'io.opencensus:opencensus-api:0.18.0' + api 'io.opencensus:opencensus-contrib-http-util:0.18.0' + api 'com.google.apis:google-api-services-storage:v1-rev20200226-1.30.9' runtimeOnly 'com.google.guava:guava:26.0-jre' // HACK: javax.xml.bind was removed from default modules in java 9, so we pull the api in here, // and whitelist this hack in JarHell - compile 'javax.xml.bind:jaxb-api:2.2.2' + api 'javax.xml.bind:jaxb-api:2.2.2' } dependencyLicenses { @@ -107,7 +107,7 @@ task copyRuntimeLibs(type: Copy) { Files.createDirectories(vendorPath) } into vendorPath.toString() - from configurations.compile, configurations.runtime + from configurations.runtimeClasspath } task buildTarArchive(dependsOn: copyRuntimeLibs, type: Tar) { diff --git a/x-pack/snapshot-tool/qa/google-cloud-storage/build.gradle b/x-pack/snapshot-tool/qa/google-cloud-storage/build.gradle index 09b9ad96f7b..5fb00e37f2a 100644 --- a/x-pack/snapshot-tool/qa/google-cloud-storage/build.gradle +++ b/x-pack/snapshot-tool/qa/google-cloud-storage/build.gradle @@ -8,7 +8,7 @@ import java.nio.file.Files apply plugin: 'elasticsearch.build' dependencies { - compile project(":plugins:repository-gcs") + api project(":plugins:repository-gcs") testImplementation project(":test:framework") testImplementation project(':x-pack:snapshot-tool') testImplementation files(project(':x-pack:snapshot-tool').sourceSets.test.output) diff --git a/x-pack/snapshot-tool/qa/s3/build.gradle b/x-pack/snapshot-tool/qa/s3/build.gradle index da5cf937ce8..ff866cf5041 100644 --- a/x-pack/snapshot-tool/qa/s3/build.gradle +++ b/x-pack/snapshot-tool/qa/s3/build.gradle @@ -6,7 +6,7 @@ apply plugin: 'elasticsearch.build' dependencies { - compile project(":plugins:repository-s3") + api project(":plugins:repository-s3") testImplementation project(":test:framework") testImplementation project(':x-pack:snapshot-tool') testImplementation files(project(':x-pack:snapshot-tool').sourceSets.test.output) diff --git a/x-pack/test/feature-aware/build.gradle b/x-pack/test/feature-aware/build.gradle index fde122df113..71fe0db4a22 100644 --- a/x-pack/test/feature-aware/build.gradle +++ b/x-pack/test/feature-aware/build.gradle @@ -1,9 +1,9 @@ apply plugin: 'elasticsearch.build' dependencies { - compile 'org.ow2.asm:asm:7.3.1' - compile project(':server') - compile project(':x-pack:plugin:core') + api 'org.ow2.asm:asm:7.3.1' + api project(':server') + api project(':x-pack:plugin:core') testImplementation project(':test:framework') } diff --git a/x-pack/transport-client/build.gradle b/x-pack/transport-client/build.gradle index 65393636946..640116673d8 100644 --- a/x-pack/transport-client/build.gradle +++ b/x-pack/transport-client/build.gradle @@ -7,8 +7,8 @@ archivesBaseName = 'x-pack-transport' dependencies { // this "api" dependency looks weird, but it is correct, as it contains // all of x-pack for now, and transport client will be going away in the future. - compile project(xpackModule('core')) - compile project(':client:transport') + api project(xpackModule('core')) + api project(':client:transport') testImplementation "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" testImplementation "junit:junit:${versions.junit}" testImplementation "org.hamcrest:hamcrest:${versions.hamcrest}"