Skip to content

Commit

Permalink
Merge pull request elastic#15087 from rjernst/standalone_tests_intellij
Browse files Browse the repository at this point in the history
Setup standalone tests to compile in intellij
  • Loading branch information
rjernst committed Dec 8, 2015
2 parents 4e80a5e + fa1c708 commit ce78c2b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions build.gradle
Expand Up @@ -184,6 +184,12 @@ tasks.idea.doLast {
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')
}
// add buildSrc itself as a groovy project
task buildSrcIdea(type: GradleBuild) {
buildFile = 'buildSrc/build.gradle'
tasks = ['cleanIdea', 'ideaModule']
}
tasks.idea.dependsOn(buildSrcIdea)


// eclipse configuration
Expand Down
Expand Up @@ -46,6 +46,8 @@ public class StandaloneTestBasePlugin implements Plugin<Project> {

project.eclipse.classpath.sourceSets = [project.sourceSets.test]
project.eclipse.classpath.plusConfigurations = [project.configurations.testRuntime]
project.idea.module.testSourceDirs += project.sourceSets.test.java.srcDirs
project.idea.module.scopes['TEST'] = [plus: [project.configurations.testRuntime]]

PrecommitTasks.create(project, false)
project.check.dependsOn(project.precommit)
Expand Down

0 comments on commit ce78c2b

Please sign in to comment.