Fixed the test resources for Gradle
wiuthout this change Intellij support wasn't great if one hasn't applied the idea plugin with this change if someone's using Intellij (we check that by verifying the presence of .idea folder) then we apply the plugin automatically fixes #286
This commit is contained in:
@@ -23,7 +23,7 @@ ext {
|
||||
]
|
||||
}
|
||||
|
||||
project.version = findProperty('verifierVersion') ?: '1.0.4.BUILD-SNAPSHOT'
|
||||
project.version = findProperty('verifierVersion') ?: '1.0.5.BUILD-SNAPSHOT'
|
||||
apply plugin: 'groovy'
|
||||
apply from: "$rootDir/gradle/release.gradle"
|
||||
apply plugin: 'eclipse'
|
||||
|
||||
@@ -16,5 +16,5 @@
|
||||
|
||||
nexusUsername =
|
||||
nexusPassword =
|
||||
verifierVersion=1.0.4.BUILD-SNAPSHOT
|
||||
verifierVersion=1.0.5.BUILD-SNAPSHOT
|
||||
org.gradle.daemon=false
|
||||
@@ -75,14 +75,13 @@ class SpringCloudContractVerifierGradlePlugin implements Plugin<Project> {
|
||||
}
|
||||
|
||||
private addIdeaTestSources(Project project, extension) {
|
||||
project.afterEvaluate {
|
||||
def hasIdea = project.plugins.findPlugin(IDEA_PLUGIN_CLASS)
|
||||
if (hasIdea) {
|
||||
project.idea {
|
||||
module {
|
||||
testSourceDirs += extension.generatedTestSourcesDir
|
||||
testSourceDirs += extension.contractsDslDir
|
||||
}
|
||||
def hasIdea = new File(project.projectDir, ".idea").exists()
|
||||
if (hasIdea) {
|
||||
project.apply(plugin: 'idea')
|
||||
project.idea {
|
||||
module {
|
||||
testSourceDirs += extension.generatedTestSourcesDir
|
||||
testSourceDirs += extension.contractsDslDir
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user