Skip to content

Commit

Permalink
Fix dependency resolution on eclipse for example projects (#77468) (#…
Browse files Browse the repository at this point in the history
…77598)

Co-authored-by: Rene Groeschke <[email protected]>
  • Loading branch information
mark-vieira and breskeby authored Sep 11, 2021
1 parent a529389 commit fa32598
Showing 1 changed file with 18 additions and 20 deletions.
38 changes: 18 additions & 20 deletions plugins/examples/build.gradle
Original file line number Diff line number Diff line change
@@ -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<AppliedPlugin>() {
@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<AppliedPlugin>() {
@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')) {
Expand Down

0 comments on commit fa32598

Please sign in to comment.