Merge pull request #14923 from rjernst/enforce_gradle_idea

Enforce that gradle idea was run before importing in intellij
This commit is contained in:
Ryan Ernst 2015-11-22 19:03:21 -08:00
commit b2ef770f07
1 changed files with 9 additions and 0 deletions

View File

@ -169,6 +169,15 @@ idea {
vcs = 'Git' vcs = 'Git'
} }
} }
// Make sure gradle idea was run before running anything in intellij (including import).
File ideaMarker = new File(projectDir, '.local-idea-is-configured')
tasks.idea.doLast {
ideaMarker.setText('', 'UTF-8')
}
if (System.getProperty('idea.active') != null && ideaMarker.exists() == false) {
throw new GradleException('You must run gradle idea from the root of elasticsearch before importing into IntelliJ')
}
// eclipse configuration // eclipse configuration
allprojects { allprojects {