From ccceba4b74384b194686fbb7b99ff68d424baae0 Mon Sep 17 00:00:00 2001 From: Mark Vieira Date: Mon, 23 Mar 2020 21:31:04 -0700 Subject: [PATCH] Fix nasty errors when importing into IntelliJ --- .gitignore | 1 + gradle/ide.gradle | 23 +---------------------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/.gitignore b/.gitignore index 309342f3b61..ff9e964289f 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ out/ # include shared intellij config !.idea/scopes/x_pack.xml !.idea/inspectionProfiles/Project_Default.xml +!.idea/runConfigurations/Debug_Elasticsearch.xml # These files are generated in the main tree by IntelliJ benchmarks/src/main/generated/* diff --git a/gradle/ide.gradle b/gradle/ide.gradle index 62c0caa37ec..c73d6e5a1bf 100644 --- a/gradle/ide.gradle +++ b/gradle/ide.gradle @@ -35,27 +35,6 @@ tasks.register('configureIdeaGradleJvm') { } } -tasks.register('configureIdeaRunConfigs') { - group = 'ide' - description = 'Configures default run configuration settings' - - doLast { - modifyXml('.idea/workspace.xml') { xml -> - def runManager = xml.component.find { it.'@name' == 'RunManager' } - if (runManager == null) { - throw new GradleException("IntelliJ 'RunManager' configuration is missing from workspace.xml. You may need to refresh your Gradle project.") - } - - def debugConfig = runManager.configuration.find { it.'@name' == 'Debug Elasticsearch' } - // Enable "auto restart" on remote debug run configuration - if (debugConfig.option.any { it.'@name' == 'AUTO_RESTART' && it.'@value' == 'true'} == false) { - def restart = new NodeBuilder().option(name: 'AUTO_RESTART', value: 'true') - debugConfig.append(restart) - } - } - } -} - idea { project { vcs = 'Git' @@ -67,7 +46,7 @@ idea { testRunner = 'choose_per_test' } taskTriggers { - afterSync tasks.named('configureIdeaGradleJvm'), tasks.named('configureIdeaRunConfigs') + afterSync tasks.named('configureIdeaGradleJvm') } codeStyle { java {