From fa325986f372d676727708372b4e38e6fa198a45 Mon Sep 17 00:00:00 2001 From: Mark Vieira Date: Fri, 10 Sep 2021 17:32:37 -0700 Subject: [PATCH] Fix dependency resolution on eclipse for example projects (#77468) (#77598) Co-authored-by: Rene Groeschke --- plugins/examples/build.gradle | 38 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/plugins/examples/build.gradle b/plugins/examples/build.gradle index 511eb340f098b..0aba827dbb584 100644 --- a/plugins/examples/build.gradle +++ b/plugins/examples/build.gradle @@ -1,27 +1,25 @@ import org.elasticsearch.gradle.internal.info.BuildParams // Subprojects aren't published so do not assemble -gradle.projectsEvaluated { - subprojects { p -> - p.tasks.matching { it.name.equals('assemble') }.configureEach { - enabled = false - } - // Disable example project testing with FIPS JVM - tasks.withType(Test) { - onlyIf { - BuildParams.inFipsJvm == false - } +subprojects { p -> + p.tasks.matching { it.name.equals('assemble') }.configureEach { + enabled = false + } + // Disable example project testing with FIPS JVM + tasks.withType(Test) { + onlyIf { + BuildParams.inFipsJvm == false } - - // configure project dependencies for yaml rest test plugin. - // plugin defaults to external available artifacts - p.getPluginManager().withPlugin("elasticsearch.yaml-rest-test", new Action() { - @Override - void execute(AppliedPlugin appliedPlugin) { - p.dependencies.add("yamlRestTestImplementation", project(":test:framework")) - p.dependencies.add("restTestSpecs", p.dependencies.project(path:':rest-api-spec', configuration:'basicRestSpecs')) - } - }) } + + // configure project dependencies for yaml rest test plugin. + // plugin defaults to external available artifacts + p.getPluginManager().withPlugin("elasticsearch.yaml-rest-test", new Action() { + @Override + void execute(AppliedPlugin appliedPlugin) { + p.dependencies.add("yamlRestTestImplementation", project(":test:framework")) + p.dependencies.add("restTestSpecs", p.dependencies.project(path:':rest-api-spec', configuration:'basicRestSpecs')) + } + }) } configure(project('painless-whitelist')) {