File tree Expand file tree Collapse file tree 2 files changed +18
-21
lines changed
buildSrc/src/main/groovy/org/elasticsearch/gradle Expand file tree Collapse file tree 2 files changed +18
-21
lines changed Original file line number Diff line number Diff line change @@ -506,27 +506,6 @@ allprojects {
506506 tasks. eclipse. dependsOn(cleanEclipse, copyEclipseSettings)
507507}
508508
509- allprojects {
510- /*
511- * IntelliJ and Eclipse don't know about the shadow plugin so when we're
512- * in "IntelliJ mode" or "Eclipse mode" add "runtime" dependencies
513- * eveywhere where we see a "shadow" dependency which will cause them to
514- * reference shadowed projects directly rather than rely on the shadowing
515- * to include them. This is the correct thing for it to do because it
516- * doesn't run the jar shadowing at all. This isn't needed for the project
517- * itself because the IDE configuration is done by SourceSets but it is
518- * *is* needed for projects that depends on the project doing the shadowing.
519- * Without this they won't properly depend on the shadowed project.
520- */
521- if (isEclipse || isIdea) {
522- project. plugins. withType(ShadowPlugin ). whenPluginAdded {
523- project. plugins. withType(BuildPlugin ). whenPluginAdded {
524- project. configurations. compile. extendsFrom project. configurations. bundle
525- }
526- }
527- }
528- }
529-
530509// we need to add the same --debug-jvm option as
531510// the real RunTask has, so we can pass it through
532511class Run extends DefaultTask {
Original file line number Diff line number Diff line change @@ -395,6 +395,24 @@ class BuildPlugin implements Plugin<Project> {
395395 project. plugins. withType(ShadowPlugin ). whenPluginAdded {
396396 Configuration bundle = project. configurations. create(' bundle' )
397397 bundle. dependencies. all(disableTransitiveDeps)
398+ boolean isEclipse = project. ext. has(' isEclipse' ) ? project. isEclipse : false
399+ boolean isIdea = project. ext. has(' isIdea' ) ? project. isIdea : false
400+ if (isEclipse || isIdea) {
401+ /*
402+ * IntelliJ and Eclipse don't know about the shadow plugin so
403+ * when we're in "IntelliJ mode" or "Eclipse mode" add
404+ * "runtime" dependencies eveywhere where we see a "shadow"
405+ * dependency which will cause them to reference shadowed
406+ * projects directly rather than rely on the shadowing to
407+ * include them. This is the correct thing for it to do
408+ * because it doesn't run the jar shadowing at all. This isn't
409+ * needed for the project itself because the IDE configuration
410+ * is done by SourceSets but it is *is* needed for projects
411+ * that depends on the project doing the shadowing. Without
412+ * this they won't properly depend on the shadowed project.
413+ */
414+ project. configurations. compile. extendsFrom project. configurations. bundle
415+ }
398416 }
399417 }
400418
You can’t perform that action at this time.
0 commit comments