From dfb80d91f7ff96d7cc58da02907902472c2defab Mon Sep 17 00:00:00 2001 From: ChrisHegarty Date: Sat, 19 Feb 2022 10:23:07 +0000 Subject: [PATCH] first-cut extra-java-module-info --- .../internal/ElasticsearchJavaBasePlugin.java | 2 +- .../internal/InternalPluginBuildPlugin.java | 2 +- build.gradle | 2 +- distribution/tools/ansi-console/build.gradle | 2 +- distribution/tools/geoip-cli/build.gradle | 2 +- distribution/tools/keystore-cli/build.gradle | 2 +- distribution/tools/launchers/build.gradle | 4 +- distribution/tools/plugin-cli/build.gradle | 2 +- libs/build.gradle | 4 ++ libs/cli/build.gradle | 17 +++++- libs/core/build.gradle | 15 ++++- libs/lz4/build.gradle | 12 +++- libs/x-content/build.gradle | 10 +++- libs/x-content/impl/build.gradle | 18 +++--- modules/lang-painless/spi/build.gradle | 2 +- server/build.gradle | 56 +++++++++---------- .../org/elasticsearch/bootstrap/ESPolicy.java | 20 +++++++ x-pack/plugin/analytics/build.gradle | 2 +- x-pack/plugin/async-search/build.gradle | 2 +- x-pack/plugin/async/build.gradle | 2 +- x-pack/plugin/ccr/build.gradle | 2 +- x-pack/plugin/core/build.gradle | 2 +- .../mapper-aggregate-metric/build.gradle | 2 +- x-pack/plugin/rollup/build.gradle | 2 +- .../preallocate/build.gradle | 2 +- x-pack/plugin/security/cli/build.gradle | 2 +- .../snapshot-based-recoveries/build.gradle | 2 +- x-pack/plugin/transform/build.gradle | 2 +- x-pack/qa/freeze-plugin/build.gradle | 2 +- 29 files changed, 133 insertions(+), 63 deletions(-) diff --git a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/ElasticsearchJavaBasePlugin.java b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/ElasticsearchJavaBasePlugin.java index 3dc69e97d3c10..e7c7b011bbb71 100644 --- a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/ElasticsearchJavaBasePlugin.java +++ b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/ElasticsearchJavaBasePlugin.java @@ -41,7 +41,7 @@ public void apply(Project project) { project.getRootProject().getPluginManager().apply(GlobalBuildInfoPlugin.class); // common repositories setup project.getPluginManager().apply(JavaBasePlugin.class); - project.getPluginManager().apply(ElasticsearchJavaModulePlugin.class); + //project.getPluginManager().apply(ElasticsearchJavaModulePlugin.class); project.getPluginManager().apply(RepositoriesSetupPlugin.class); project.getPluginManager().apply(ElasticsearchTestBasePlugin.class); project.getPluginManager().apply(PrecommitTaskPlugin.class); diff --git a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/InternalPluginBuildPlugin.java b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/InternalPluginBuildPlugin.java index 19192a237cfde..51c25274deedf 100644 --- a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/InternalPluginBuildPlugin.java +++ b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/InternalPluginBuildPlugin.java @@ -32,7 +32,7 @@ public void apply(Project project) { // Clear default dependencies added by public PluginBuildPlugin as we add our // own project dependencies for internal builds // TODO remove once we removed default dependencies from PluginBuildPlugin - project.getConfigurations().getByName("moduleCompileOnly").getDependencies().clear(); + //project.getConfigurations().getByName("moduleCompileOnly").getDependencies().clear(); project.getConfigurations().getByName("compileOnly").getDependencies().clear(); project.getConfigurations().getByName("testImplementation").getDependencies().clear(); diff --git a/build.gradle b/build.gradle index 8dd2911ce7d0e..978d2fefee794 100644 --- a/build.gradle +++ b/build.gradle @@ -169,7 +169,7 @@ allprojects { plugins.withType(InternalPluginBuildPlugin).whenPluginAdded { project.dependencies { - moduleCompileOnly project(":server") + compileOnly project(":server") testImplementation project(":test:framework") } } diff --git a/distribution/tools/ansi-console/build.gradle b/distribution/tools/ansi-console/build.gradle index 67eb89cad1976..bfe99784b2713 100644 --- a/distribution/tools/ansi-console/build.gradle +++ b/distribution/tools/ansi-console/build.gradle @@ -11,7 +11,7 @@ apply plugin: 'elasticsearch.build' archivesBaseName = 'elasticsearch-ansi-console' dependencies { - moduleCompileOnly project(":server") + compileOnly project(":server") testImplementation project(":test:framework") // multi-platform (Windows too) terminal detection and output formatting diff --git a/distribution/tools/geoip-cli/build.gradle b/distribution/tools/geoip-cli/build.gradle index 5cab7957f70b9..b285ed95307a6 100644 --- a/distribution/tools/geoip-cli/build.gradle +++ b/distribution/tools/geoip-cli/build.gradle @@ -11,7 +11,7 @@ apply plugin: 'elasticsearch.build' archivesBaseName = 'elasticsearch-geoip-cli' dependencies { - moduleCompileOnly project(":server") + compileOnly project(":server") compileOnly project(":libs:elasticsearch-cli") compileOnly project(":libs:elasticsearch-x-content") testImplementation project(":test:framework") diff --git a/distribution/tools/keystore-cli/build.gradle b/distribution/tools/keystore-cli/build.gradle index 0ac60b0dd4b7e..71c6724248340 100644 --- a/distribution/tools/keystore-cli/build.gradle +++ b/distribution/tools/keystore-cli/build.gradle @@ -9,7 +9,7 @@ apply plugin: 'elasticsearch.build' dependencies { - moduleCompileOnly project(":server") + compileOnly project(":server") compileOnly project(":libs:elasticsearch-cli") testImplementation project(":test:framework") testImplementation "com.google.jimfs:jimfs:${versions.jimfs}" diff --git a/distribution/tools/launchers/build.gradle b/distribution/tools/launchers/build.gradle index 97c7103d47ffd..60fb0685ce13b 100644 --- a/distribution/tools/launchers/build.gradle +++ b/distribution/tools/launchers/build.gradle @@ -10,8 +10,8 @@ import de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis apply plugin: 'elasticsearch.build' dependencies { - moduleCompileOnly project(':distribution:tools:java-version-checker') - moduleImplementation "org.yaml:snakeyaml:${versions.snakeyaml}" + compileOnly project(':distribution:tools:java-version-checker') + implementation "org.yaml:snakeyaml:${versions.snakeyaml}" 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 8f4b963252cc9..d1a53a0e11bd8 100644 --- a/distribution/tools/plugin-cli/build.gradle +++ b/distribution/tools/plugin-cli/build.gradle @@ -11,7 +11,7 @@ apply plugin: 'elasticsearch.build' archivesBaseName = 'elasticsearch-plugin-cli' dependencies { - moduleCompileOnly project(":server") + compileOnly project(":server") compileOnly project(":libs:elasticsearch-cli") api "org.bouncycastle:bcpg-fips:1.0.4" api "org.bouncycastle:bc-fips:1.0.2" diff --git a/libs/build.gradle b/libs/build.gradle index 8a8fef74c2e8c..78ffc447e2614 100644 --- a/libs/build.gradle +++ b/libs/build.gradle @@ -6,6 +6,10 @@ * Side Public License, v 1. */ +plugins { + id "de.jjohannes.extra-java-module-info" version "0.11" +} + configure(subprojects - project('elasticsearch-log4j')) { /* * All subprojects are java projects using Elasticsearch's standard build diff --git a/libs/cli/build.gradle b/libs/cli/build.gradle index 0e96d35892b7d..bc083bc15a544 100644 --- a/libs/cli/build.gradle +++ b/libs/cli/build.gradle @@ -7,10 +7,23 @@ */ apply plugin: 'elasticsearch.build' apply plugin: 'elasticsearch.publish' +apply plugin: "de.jjohannes.extra-java-module-info" + +java { + modularity.inferModulePath = true +} + +tasks.named('compileJava') { + modularity.inferModulePath = true +} + +extraJavaModuleInfo { + automaticModule('jopt-simple-5.0.2.jar', 'jopt.simple') +} dependencies { - moduleApi 'net.sf.jopt-simple:jopt-simple:5.0.2' - moduleApi project(':libs:elasticsearch-core') + api 'net.sf.jopt-simple:jopt-simple:5.0.2' + api project(':libs:elasticsearch-core') } tasks.named("test").configure { enabled = false } diff --git a/libs/core/build.gradle b/libs/core/build.gradle index 9aa2e0c3c4b99..3b9e7b4ca1f20 100644 --- a/libs/core/build.gradle +++ b/libs/core/build.gradle @@ -7,10 +7,23 @@ */ apply plugin: 'elasticsearch.publish' +apply plugin: "de.jjohannes.extra-java-module-info" + +java { + modularity.inferModulePath = true +} + +tasks.named('compileJava') { + modularity.inferModulePath = true +} + +extraJavaModuleInfo { + automaticModule('jsr305-3.0.2.jar', 'jsr305') +} dependencies { // This dependency is used only by :libs:core for null-checking interop with other tools - moduleCompileOnly "com.google.code.findbugs:jsr305:3.0.2" + compileOnly "com.google.code.findbugs:jsr305:3.0.2" testImplementation "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" testImplementation "junit:junit:${versions.junit}" diff --git a/libs/lz4/build.gradle b/libs/lz4/build.gradle index 839672defcc94..3891a0657ba84 100644 --- a/libs/lz4/build.gradle +++ b/libs/lz4/build.gradle @@ -7,9 +7,17 @@ */ apply plugin: 'elasticsearch.publish' +java { + modularity.inferModulePath = true +} + +tasks.named('compileJava') { + modularity.inferModulePath = true +} + dependencies { - moduleApi 'org.lz4:lz4-java:1.8.0' - moduleApi project(':libs:elasticsearch-core') + api 'org.lz4:lz4-java:1.8.0' + api project(':libs:elasticsearch-core') testImplementation(project(":test:framework")) { exclude group: 'org.elasticsearch', module: 'elasticsearch-lz4' diff --git a/libs/x-content/build.gradle b/libs/x-content/build.gradle index 56f9d452c251f..c481790a4ccda 100644 --- a/libs/x-content/build.gradle +++ b/libs/x-content/build.gradle @@ -15,6 +15,14 @@ import java.util.stream.Collectors apply plugin: 'elasticsearch.build' apply plugin: 'elasticsearch.publish' +java { + modularity.inferModulePath = true +} + +tasks.named('compileJava') { + modularity.inferModulePath = true +} + configurations { providerImpl { attributes.attribute(ArtifactTypeDefinition.ARTIFACT_TYPE_ATTRIBUTE, ArtifactTypeDefinition.DIRECTORY_TYPE) @@ -32,7 +40,7 @@ dependencies { }) - moduleApi project(':libs:elasticsearch-core') + api project(':libs:elasticsearch-core') providerImpl project(':libs:elasticsearch-x-content:impl') diff --git a/libs/x-content/impl/build.gradle b/libs/x-content/impl/build.gradle index 20da986388831..d9ac95484d78c 100644 --- a/libs/x-content/impl/build.gradle +++ b/libs/x-content/impl/build.gradle @@ -11,13 +11,13 @@ apply plugin: 'elasticsearch.java' archivesBaseName = "x-content-impl" dependencies { - moduleCompileOnly project(':libs:elasticsearch-core') - moduleCompileOnly project(':libs:elasticsearch-x-content') - moduleImplementation "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" - moduleImplementation "com.fasterxml.jackson.dataformat:jackson-dataformat-smile:${versions.jackson}" - moduleImplementation "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${versions.jackson}" - moduleImplementation "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${versions.jackson}" - moduleImplementation "org.yaml:snakeyaml:${versions.snakeyaml}" + compileOnly project(':libs:elasticsearch-core') + compileOnly project(':libs:elasticsearch-x-content') + implementation "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" + implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-smile:${versions.jackson}" + implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${versions.jackson}" + implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${versions.jackson}" + implementation "org.yaml:snakeyaml:${versions.snakeyaml}" testImplementation(project(":test:framework")) { exclude group: 'org.elasticsearch', module: 'elasticsearch-x-content' @@ -44,3 +44,7 @@ tasks.named("thirdPartyAudit").configure { 'com.fasterxml.jackson.databind.cfg.MapperBuilder' ) } + +java { + modularity.inferModulePath = true +} diff --git a/modules/lang-painless/spi/build.gradle b/modules/lang-painless/spi/build.gradle index 8c9f0d465417c..84700c62ef7c0 100644 --- a/modules/lang-painless/spi/build.gradle +++ b/modules/lang-painless/spi/build.gradle @@ -13,6 +13,6 @@ group = 'org.elasticsearch.plugin' archivesBaseName = 'elasticsearch-scripting-painless-spi' dependencies { - moduleCompileOnly project(":server") + compileOnly project(":server") testImplementation project(":test:framework") } diff --git a/server/build.gradle b/server/build.gradle index 710d563f8d80e..90b4aec367c36 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -24,46 +24,46 @@ archivesBaseName = 'elasticsearch' dependencies { - moduleApi project(':libs:elasticsearch-core') - moduleApi project(':libs:elasticsearch-secure-sm') - moduleApi project(':libs:elasticsearch-x-content') - moduleApi project(":libs:elasticsearch-geo") - moduleApi project(":libs:elasticsearch-lz4") + api project(':libs:elasticsearch-core') + api project(':libs:elasticsearch-secure-sm') + api project(':libs:elasticsearch-x-content') + api project(":libs:elasticsearch-geo") + api project(":libs:elasticsearch-lz4") - moduleImplementation project(':libs:elasticsearch-plugin-classloader') + implementation project(':libs:elasticsearch-plugin-classloader') // lucene - moduleApi "org.apache.lucene:lucene-core:${versions.lucene}" - moduleApi "org.apache.lucene:lucene-analysis-common:${versions.lucene}" - moduleApi "org.apache.lucene:lucene-backward-codecs:${versions.lucene}" - moduleApi "org.apache.lucene:lucene-grouping:${versions.lucene}" - moduleApi "org.apache.lucene:lucene-highlighter:${versions.lucene}" - moduleApi "org.apache.lucene:lucene-join:${versions.lucene}" - moduleApi "org.apache.lucene:lucene-memory:${versions.lucene}" - moduleApi "org.apache.lucene:lucene-misc:${versions.lucene}" - moduleApi "org.apache.lucene:lucene-queries:${versions.lucene}" - moduleApi "org.apache.lucene:lucene-queryparser:${versions.lucene}" - moduleApi "org.apache.lucene:lucene-sandbox:${versions.lucene}" - moduleApi "org.apache.lucene:lucene-spatial3d:${versions.lucene}" - moduleApi "org.apache.lucene:lucene-suggest:${versions.lucene}" + api "org.apache.lucene:lucene-core:${versions.lucene}" + api "org.apache.lucene:lucene-analysis-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-spatial3d:${versions.lucene}" + api "org.apache.lucene:lucene-suggest:${versions.lucene}" // utilities - moduleApi project(":libs:elasticsearch-cli") - moduleApi 'com.carrotsearch:hppc:0.8.1' + api project(":libs:elasticsearch-cli") + api 'com.carrotsearch:hppc:0.8.1' // percentiles aggregation - moduleApi 'com.tdunning:t-digest:3.2' + api 'com.tdunning:t-digest:3.2' // precentil ranks aggregation - moduleApi 'org.hdrhistogram:HdrHistogram:2.1.9' + api 'org.hdrhistogram:HdrHistogram:2.1.9' // logging - moduleApi "org.apache.logging.log4j:log4j-api:${versions.log4j}" - moduleApi "org.apache.logging.log4j:log4j-core:${versions.log4j}" + api "org.apache.logging.log4j:log4j-api:${versions.log4j}" + api "org.apache.logging.log4j:log4j-core:${versions.log4j}" - moduleApi "net.java.dev.jna:jna:${versions.jna}" + api "net.java.dev.jna:jna:${versions.jna}" - moduleApi "co.elastic.logging:log4j2-ecs-layout:${versions.ecsLogging}" - moduleApi "co.elastic.logging:ecs-logging-core:${versions.ecsLogging}" + api "co.elastic.logging:log4j2-ecs-layout:${versions.ecsLogging}" + api "co.elastic.logging:ecs-logging-core:${versions.ecsLogging}" testImplementation(project(":test:framework")) { // tests use the locally compiled version of server diff --git a/server/src/main/java/org/elasticsearch/bootstrap/ESPolicy.java b/server/src/main/java/org/elasticsearch/bootstrap/ESPolicy.java index 2ac6637021848..75276d604f69e 100644 --- a/server/src/main/java/org/elasticsearch/bootstrap/ESPolicy.java +++ b/server/src/main/java/org/elasticsearch/bootstrap/ESPolicy.java @@ -127,9 +127,29 @@ public boolean implies(ProtectionDomain domain, Permission permission) { } // otherwise defer to template + dynamic file permissions + // if (template.implies(domain, permission)) { + // //System.out.println("template implies:" + permission + ", for loc:" + location); + // return true; + // } else if (dynamic.implies(permission)) { + // //System.out.println("dynamic implies:" + permission + ", for loc:" + location); + // return true; + // } else if (system.implies(domain, permission)) { + // //System.out.println("system implies:" + permission + ", for loc:" + location); + // return true; + // } + // if (recurse.get() == false) { + // try { + // recurse.set(true); + // System.out.println("no implies for:" + permission + ", for loc:" + location); + // } finally { + // recurse.set(false); + // } + // } return template.implies(domain, permission) || dynamic.implies(permission) || system.implies(domain, permission); } + private final ThreadLocal recurse = ThreadLocal.withInitial(() -> false); + /** * Classy puzzler to rethrow any checked exception as an unchecked one. */ diff --git a/x-pack/plugin/analytics/build.gradle b/x-pack/plugin/analytics/build.gradle index 65141b19a8959..fd66cf727e5da 100644 --- a/x-pack/plugin/analytics/build.gradle +++ b/x-pack/plugin/analytics/build.gradle @@ -14,7 +14,7 @@ archivesBaseName = 'x-pack-analytics' dependencies { api 'org.apache.commons:commons-math3:3.6.1' compileOnly project(path: xpackModule('core')) - moduleCompileOnly project(":server") + compileOnly project(":server") testImplementation(testArtifact(project(xpackModule('core')))) testImplementation(project(":client:rest-high-level")) } diff --git a/x-pack/plugin/async-search/build.gradle b/x-pack/plugin/async-search/build.gradle index d503aea1dc51a..134cdd0f92748 100644 --- a/x-pack/plugin/async-search/build.gradle +++ b/x-pack/plugin/async-search/build.gradle @@ -11,7 +11,7 @@ archivesBaseName = 'x-pack-async-search' addQaCheckDependencies() dependencies { - moduleCompileOnly project(":server") + compileOnly project(":server") compileOnly project(path: xpackModule('core')) testImplementation(testArtifact(project(xpackModule('core')))) diff --git a/x-pack/plugin/async/build.gradle b/x-pack/plugin/async/build.gradle index 5c32397b683ba..e3ca21c257a4f 100644 --- a/x-pack/plugin/async/build.gradle +++ b/x-pack/plugin/async/build.gradle @@ -9,7 +9,7 @@ esplugin { archivesBaseName = 'x-pack-async' dependencies { - moduleCompileOnly project(":server") + compileOnly project(":server") compileOnly project(path: xpackModule('core')) } diff --git a/x-pack/plugin/ccr/build.gradle b/x-pack/plugin/ccr/build.gradle index 50481636ab4dc..e985d4dcfefd7 100644 --- a/x-pack/plugin/ccr/build.gradle +++ b/x-pack/plugin/ccr/build.gradle @@ -28,7 +28,7 @@ tasks.named('internalClusterTest').configure { addQaCheckDependencies() dependencies { - moduleCompileOnly project(":server") + compileOnly project(":server") compileOnly project(path: xpackModule('core')) testImplementation(testArtifact(project(xpackModule('core')))) diff --git a/x-pack/plugin/core/build.gradle b/x-pack/plugin/core/build.gradle index 01a6752c8e6c0..768bbb936ee0f 100644 --- a/x-pack/plugin/core/build.gradle +++ b/x-pack/plugin/core/build.gradle @@ -27,7 +27,7 @@ tasks.named("dependencyLicenses").configure { } dependencies { - moduleCompileOnly project(":server") + compileOnly project(":server") api project(":libs:elasticsearch-ssl-config") api "org.apache.httpcomponents:httpclient:${versions.httpclient}" api "org.apache.httpcomponents:httpcore:${versions.httpcore}" diff --git a/x-pack/plugin/mapper-aggregate-metric/build.gradle b/x-pack/plugin/mapper-aggregate-metric/build.gradle index 6118cfcaac7cc..0e56638a2f75e 100644 --- a/x-pack/plugin/mapper-aggregate-metric/build.gradle +++ b/x-pack/plugin/mapper-aggregate-metric/build.gradle @@ -20,7 +20,7 @@ esplugin { archivesBaseName = 'x-pack-aggregate-metric' dependencies { - moduleCompileOnly project(":server") + compileOnly project(":server") compileOnly project(path: xpackModule('core')) testImplementation(testArtifact(project(xpackModule('core')))) diff --git a/x-pack/plugin/rollup/build.gradle b/x-pack/plugin/rollup/build.gradle index d1e79e3dc3801..483a84aea9987 100644 --- a/x-pack/plugin/rollup/build.gradle +++ b/x-pack/plugin/rollup/build.gradle @@ -11,7 +11,7 @@ esplugin { archivesBaseName = 'x-pack-rollup' dependencies { - moduleCompileOnly project(":server") + compileOnly project(":server") compileOnly project(path: xpackModule('core')) compileOnly project(path: xpackModule('analytics')) compileOnly project(path: xpackModule('mapper-aggregate-metric')) diff --git a/x-pack/plugin/searchable-snapshots/preallocate/build.gradle b/x-pack/plugin/searchable-snapshots/preallocate/build.gradle index db26041a295af..2794fc7e6ecd4 100644 --- a/x-pack/plugin/searchable-snapshots/preallocate/build.gradle +++ b/x-pack/plugin/searchable-snapshots/preallocate/build.gradle @@ -10,7 +10,7 @@ apply plugin: 'elasticsearch.build' archivesBaseName = 'preallocate' dependencies { - moduleCompileOnly project(":server") + compileOnly project(":server") } tasks.named("testingConventions").configure { enabled = false } diff --git a/x-pack/plugin/security/cli/build.gradle b/x-pack/plugin/security/cli/build.gradle index f0884c8e46839..e2684ce8d54f7 100644 --- a/x-pack/plugin/security/cli/build.gradle +++ b/x-pack/plugin/security/cli/build.gradle @@ -6,7 +6,7 @@ apply plugin: 'elasticsearch.build' archivesBaseName = 'elasticsearch-security-cli' dependencies { - moduleCompileOnly project(":server") + compileOnly project(":server") compileOnly project(path: xpackModule('core')) api "org.bouncycastle:bcpkix-jdk15on:${versions.bouncycastle}" api "org.bouncycastle:bcprov-jdk15on:${versions.bouncycastle}" diff --git a/x-pack/plugin/snapshot-based-recoveries/build.gradle b/x-pack/plugin/snapshot-based-recoveries/build.gradle index 6862d4e479b3e..dee4fbdd84504 100644 --- a/x-pack/plugin/snapshot-based-recoveries/build.gradle +++ b/x-pack/plugin/snapshot-based-recoveries/build.gradle @@ -11,7 +11,7 @@ esplugin { archivesBaseName = 'x-pack-snapshot-based-recoveries' dependencies { - moduleCompileOnly project(":server") + compileOnly project(":server") compileOnly project(path: xpackModule('core')) testImplementation(testArtifact(project(xpackModule('core')))) diff --git a/x-pack/plugin/transform/build.gradle b/x-pack/plugin/transform/build.gradle index f0c5526783eff..2bf28b5a0e6ac 100644 --- a/x-pack/plugin/transform/build.gradle +++ b/x-pack/plugin/transform/build.gradle @@ -8,7 +8,7 @@ esplugin { } dependencies { - moduleCompileOnly project(":server") + compileOnly project(":server") compileOnly project(path: xpackModule('core')) testImplementation(testArtifact(project(xpackModule('core')))) diff --git a/x-pack/qa/freeze-plugin/build.gradle b/x-pack/qa/freeze-plugin/build.gradle index dbd3adada6233..c9642b89922ef 100644 --- a/x-pack/qa/freeze-plugin/build.gradle +++ b/x-pack/qa/freeze-plugin/build.gradle @@ -17,7 +17,7 @@ esplugin { } dependencies { - moduleCompileOnly project(":server") + compileOnly project(":server") compileOnly project(path: xpackModule('core')) }