Removed adding the dependency by the Gradle plugin
This commit is contained in:
@@ -31,12 +31,6 @@ import org.gradle.jvm.tasks.Jar
|
||||
* <li>generate stubs</li>
|
||||
* </ul>
|
||||
*
|
||||
* Also adds the necessary {@code testCompile} dependencies
|
||||
*
|
||||
* <ul>
|
||||
* <li>JSON Assert</li>
|
||||
* </ul>
|
||||
*
|
||||
* @author Jakub Kubrynski, codearte.io
|
||||
* @author Marcin Grzejszczak
|
||||
*
|
||||
@@ -70,7 +64,6 @@ class SpringCloudContractVerifierGradlePlugin implements Plugin<Project> {
|
||||
createGenerateTestsTask(extension, copyContracts)
|
||||
Task clientTask = createAndConfigureGenerateClientStubsFromDslTask(extension, copyContracts)
|
||||
createAndConfigureGenerateWireMockClientStubsFromDslTask(extension, clientTask)
|
||||
addProjectDependencies(project)
|
||||
addIdeaTestSources(project, extension)
|
||||
}
|
||||
|
||||
@@ -88,10 +81,6 @@ class SpringCloudContractVerifierGradlePlugin implements Plugin<Project> {
|
||||
}
|
||||
}
|
||||
|
||||
private void addProjectDependencies(Project project) {
|
||||
project.dependencies.add("testCompile", "com.toomuchcoding.jsonassert:jsonassert:0.4.7")
|
||||
}
|
||||
|
||||
private void setConfigurationDefaults(ContractVerifierExtension extension) {
|
||||
extension.with {
|
||||
generatedTestSourcesDir = generatedTestSourcesDir ?: project.file("${project.buildDir}/generated-test-sources/contracts")
|
||||
|
||||
@@ -109,16 +109,6 @@ class ContractVerifierSpec extends Specification {
|
||||
publications.findByName("stubs") != null
|
||||
}
|
||||
|
||||
def "should add jsonassert as a testCompile dependency"() {
|
||||
given:
|
||||
project.plugins.apply(SpringCloudContractVerifierGradlePlugin)
|
||||
|
||||
expect:
|
||||
project.configurations.testCompile.dependencies.find {
|
||||
it.group == "com.toomuchcoding.jsonassert" && it.name == "jsonassert"
|
||||
} != null
|
||||
}
|
||||
|
||||
def "should compile"() {
|
||||
given:
|
||||
ContractVerifierExtension extension = new ContractVerifierExtension()
|
||||
|
||||
@@ -21,12 +21,13 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "org.springframework:spring-web:$springVersion"
|
||||
compile "org.springframework:spring-context-support:$springVersion"
|
||||
compile "org.springframework:spring-web"
|
||||
compile "org.springframework:spring-context-support"
|
||||
compile "org.codehaus.groovy:groovy-all:2.4.5"
|
||||
compile 'com.jayway.jsonpath:json-path-assert:2.2.0'
|
||||
|
||||
testCompile "com.github.tomakehurst:wiremock:2.5.1"
|
||||
testCompile "com.github.tomakehurst:wiremock:${wiremockVersion}"
|
||||
testCompile "com.toomuchcoding.jsonassert:jsonassert:${jsonAssertVersion}"
|
||||
testCompile "org.spockframework:spock-spring:1.0-groovy-2.4"
|
||||
testCompile "com.jayway.restassured:rest-assured:$restAssuredVersion"
|
||||
testCompile "com.jayway.restassured:spring-mock-mvc:$restAssuredVersion"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
wiremockVersion=2.5.1
|
||||
jsonAssertVersion=0.4.8
|
||||
|
||||
groupId=org.springframework.cloud.testprojects
|
||||
|
||||
springBootVersion=1.4.3.RELEASE
|
||||
@@ -31,7 +31,6 @@ allprojects {
|
||||
ext {
|
||||
restAssuredVersion = '2.5.0'
|
||||
spockVersion = '1.0-groovy-2.4'
|
||||
wiremockVersion = '2.5.1'
|
||||
|
||||
contractVerifierStubsBaseDirectory = 'src/test/resources/stubs'
|
||||
}
|
||||
@@ -48,7 +47,8 @@ subprojects {
|
||||
testCompile 'org.codehaus.groovy:groovy-all:2.4.5'
|
||||
testCompile "org.spockframework:spock-core:$spockVersion"
|
||||
testCompile 'junit:junit:4.12'
|
||||
testCompile "com.github.tomakehurst:wiremock:$wiremockVersion"
|
||||
testCompile "com.github.tomakehurst:wiremock:${wiremockVersion}"
|
||||
testCompile "com.toomuchcoding.jsonassert:jsonassert:${jsonAssertVersion}"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# Copyright 2013-2017 the original author or authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
wiremockVersion=2.5.1
|
||||
jsonAssertVersion=0.4.8
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ buildscript {
|
||||
ext {
|
||||
restAssuredVersion = '2.5.0'
|
||||
spockVersion = '1.0-groovy-2.4'
|
||||
wiremockVersion = '2.5.1'
|
||||
|
||||
contractVerifierStubsBaseDirectory = 'src/test/resources/stubs'
|
||||
}
|
||||
@@ -46,7 +45,8 @@ subprojects {
|
||||
testCompile "org.codehaus.groovy:groovy-all:2.4.5"
|
||||
testCompile "org.spockframework:spock-core:$spockVersion"
|
||||
testCompile("junit:junit:4.12")
|
||||
testCompile "com.github.tomakehurst:wiremock:$wiremockVersion"
|
||||
testCompile "com.github.tomakehurst:wiremock:${wiremockVersion}"
|
||||
testCompile "com.toomuchcoding.jsonassert:jsonassert:${jsonAssertVersion}"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# Copyright 2013-2017 the original author or authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
wiremockVersion=2.5.1
|
||||
jsonAssertVersion=0.4.8
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ buildscript {
|
||||
ext {
|
||||
restAssuredVersion = '2.5.0'
|
||||
spockVersion = '1.0-groovy-2.4'
|
||||
wiremockVersion = '2.5.1'
|
||||
|
||||
contractVerifierStubsBaseDirectory = 'src/test/resources/stubs'
|
||||
}
|
||||
@@ -47,7 +46,8 @@ subprojects {
|
||||
testCompile "org.codehaus.groovy:groovy-all:2.4.5"
|
||||
testCompile "org.spockframework:spock-core:$spockVersion"
|
||||
testCompile("junit:junit:4.12")
|
||||
testCompile "com.github.tomakehurst:wiremock:$wiremockVersion"
|
||||
testCompile "com.github.tomakehurst:wiremock:${wiremockVersion}"
|
||||
testCompile "com.toomuchcoding.jsonassert:jsonassert:${jsonAssertVersion}"
|
||||
testCompile "org.assertj:assertj-core:2.4.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# Copyright 2013-2017 the original author or authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
wiremockVersion=2.5.1
|
||||
jsonAssertVersion=0.4.8
|
||||
|
||||
|
||||
Reference in New Issue
Block a user