Skip to content

Commit 27bf7c7

Browse files
Fix dependency resolution on eclipse for example projects (elastic#77468) (elastic#77596)
Co-authored-by: Rene Groeschke <[email protected]>
1 parent c925675 commit 27bf7c7

File tree

1 file changed

+18
-20
lines changed

1 file changed

+18
-20
lines changed

plugins/examples/build.gradle

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
11
import org.elasticsearch.gradle.internal.info.BuildParams
22
// Subprojects aren't published so do not assemble
3-
gradle.projectsEvaluated {
4-
subprojects { p ->
5-
p.tasks.matching { it.name.equals('assemble') }.configureEach {
6-
enabled = false
7-
}
8-
// Disable example project testing with FIPS JVM
9-
tasks.withType(Test) {
10-
onlyIf {
11-
BuildParams.inFipsJvm == false
12-
}
3+
subprojects { p ->
4+
p.tasks.matching { it.name.equals('assemble') }.configureEach {
5+
enabled = false
6+
}
7+
// Disable example project testing with FIPS JVM
8+
tasks.withType(Test) {
9+
onlyIf {
10+
BuildParams.inFipsJvm == false
1311
}
14-
15-
// configure project dependencies for yaml rest test plugin.
16-
// plugin defaults to external available artifacts
17-
p.getPluginManager().withPlugin("elasticsearch.yaml-rest-test", new Action<AppliedPlugin>() {
18-
@Override
19-
void execute(AppliedPlugin appliedPlugin) {
20-
p.dependencies.add("yamlRestTestImplementation", project(":test:framework"))
21-
p.dependencies.add("restTestSpecs", p.dependencies.project(path:':rest-api-spec', configuration:'basicRestSpecs'))
22-
}
23-
})
2412
}
13+
14+
// configure project dependencies for yaml rest test plugin.
15+
// plugin defaults to external available artifacts
16+
p.getPluginManager().withPlugin("elasticsearch.yaml-rest-test", new Action<AppliedPlugin>() {
17+
@Override
18+
void execute(AppliedPlugin appliedPlugin) {
19+
p.dependencies.add("yamlRestTestImplementation", project(":test:framework"))
20+
p.dependencies.add("restTestSpecs", p.dependencies.project(path:':rest-api-spec', configuration:'basicRestSpecs'))
21+
}
22+
})
2523
}
2624

2725
configure(project('painless-whitelist')) {

0 commit comments

Comments
 (0)