Fix nasty errors when importing into IntelliJ

This commit is contained in:
Mark Vieira 2020-03-23 21:31:04 -07:00
parent b33fbe7026
commit ccceba4b74
No known key found for this signature in database
GPG Key ID: CA947EF7E6D4B105
2 changed files with 2 additions and 22 deletions

1
.gitignore vendored
View File

@ -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/*

View File

@ -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 {