Checking if the root project has .idea folder

fixes #286
This commit is contained in:
Marcin Grzejszczak
2017-05-30 13:23:03 +02:00
parent 4dc8ea4b9b
commit 84b0cc6478
2 changed files with 3 additions and 3 deletions

View File

@@ -68,7 +68,7 @@ class SpringCloudContractVerifierGradlePlugin implements Plugin<Project> {
}
private addIdeaTestSources(Project project, extension) {
def hasIdea = new File(project.projectDir, ".idea").exists()
def hasIdea = new File(project.rootDir, ".idea").exists()
if (hasIdea) {
project.apply(plugin: 'idea')
project.idea {

View File

@@ -36,7 +36,7 @@ import spock.lang.Specification
/**
* @author Marcin Grzejszczak
*/
@ContextConfiguration(classes = Config, loader = SpringBootContextLoader)
@ContextConfiguration(classes = MocoConfig, loader = SpringBootContextLoader)
// tag::[classpath_stub_runner]
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE)
// to use stubs from classpath just provide ids without passing any other properties to
@@ -75,7 +75,7 @@ class MocoHttpServerStubSpec extends Specification {
@Configuration
@EnableAutoConfiguration
@EnableBinding(Sink.class)
static class Config {
static class MocoConfig {
@Bean
MyListener myListener() {