Browse Source

Fixes for IntelliJ IDEA 2020.1 support (#55077)

Mark Vieira 5 years ago
parent
commit
396619182f
3 changed files with 8 additions and 2 deletions
  1. 7 1
      gradle/ide.gradle
  2. 1 0
      x-pack/plugin/build.gradle
  3. 0 1
      x-pack/qa/evil-tests/build.gradle

+ 7 - 1
gradle/ide.gradle

@@ -38,6 +38,12 @@ if (System.getProperty('idea.active') == 'true') {
     }
   }
 
+  tasks.register('buildDependencyArtifacts') {
+    group = 'ide'
+    description = 'Builds artifacts needed as dependency for IDE modules'
+    dependsOn ':client:rest-high-level:shadowJar'
+  }
+
   idea {
     project {
       vcs = 'Git'
@@ -49,7 +55,7 @@ if (System.getProperty('idea.active') == 'true') {
           testRunner = 'choose_per_test'
         }
         taskTriggers {
-          afterSync tasks.named('configureIdeaGradleJvm')
+          afterSync tasks.named('configureIdeaGradleJvm'), tasks.named('buildDependencyArtifacts')
         }
         codeStyle {
           java {

+ 1 - 0
x-pack/plugin/build.gradle

@@ -7,6 +7,7 @@ apply plugin: 'elasticsearch.rest-test'
 archivesBaseName = 'x-pack'
 
 dependencies {
+  testCompile project(xpackModule('core')) // this redundant dependency is here to make IntelliJ happy
   testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
 }
 

+ 0 - 1
x-pack/qa/evil-tests/build.gradle

@@ -1,7 +1,6 @@
 apply plugin: 'elasticsearch.standalone-test'
 
 dependencies {
-  testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
   testCompile project(path: xpackModule('security'), configuration: 'testArtifacts')
 }