Files
spring-cloud-contract/spring-cloud-contract-verifier/build.gradle
Marcin Grzejszczak 817c232d3f Rebranding (#287)
2016-06-19 23:55:09 +02:00

119 lines
3.9 KiB
Groovy

/*
* Copyright 2013-2016 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.
*/
String verifier = "spring-cloud-contract-verifier"
project(":$verifier-root:$verifier-core") {
dependencies {
compile 'org.slf4j:slf4j-api:1.6.0'
compile 'commons-io:commons-io:2.0'
compile 'org.apache.commons:commons-lang3:3.3'
compile "com.github.tomakehurst:wiremock:$wiremockVersion"
compile "com.toomuchcoding.jsonassert:jsonassert:$jsonassertVersion"
compile 'org.codehaus.groovy:groovy-all:2.4.4'
testCompile 'cglib:cglib-nodep:2.2'
testCompile 'org.objenesis:objenesis:2.1'
testCompile project(":$verifier-root:$verifier-testing-utils")
}
}
project(":$verifier-root:$verifier-testing-utils") {
dependencies {
compile 'org.skyscreamer:jsonassert:1.2.3'
}
}
project(":$verifier-root:$verifier-converters") {
dependencies {
compile project(":$verifier-root:$verifier-core")
compile 'org.apache.commons:commons-lang3:3.0'
compile 'commons-io:commons-io:2.0'
compile 'dk.brics.automaton:automaton:1.11-8' // needed for Xeger
testCompile "com.github.tomakehurst:wiremock:$wiremockVersion"
testCompile 'org.hamcrest:hamcrest-all:1.3'
}
}
project(":$verifier-root:$verifier-gradle-plugin") {
ext.messagingLibsDir ="$buildDir/messaging-libs"
ext.contractVerifierGradlePluginLibsDir ="$buildDir/contractVerifier-gradle-plugin-libs"
ext.testSystemProperties = [
'contract-verifier-gradle-plugin-libs-dir': contractVerifierGradlePluginLibsDir,
'messaging-libs-dir': messagingLibsDir
]
dependencies {
compile project(":$verifier-root:$verifier-core")
compile project(":$verifier-root:$verifier-converters")
compile gradleApi()
testCompile gradleTestKit()
testCompile project(":$verifier-root:$verifier-testing-utils")
}
configurations {
messagingLibs
contractVerifierGradlePluginLibs
}
dependencies {
messagingLibs project(":$verifier-root:$verifier-messaging-root:$verifier-integration")
messagingLibs project(":$verifier-root:$verifier-messaging-root:$verifier-messaging-core")
messagingLibs project(":$verifier-root:$verifier-testing-utils")
messagingLibs 'org.codehaus.groovy:groovy-all:2.4.5'
contractVerifierGradlePluginLibs project(":$verifier-root:$verifier-gradle-plugin")
}
test {
exclude '**/*FunctionalSpec.*'
systemProperties = testSystemProperties
}
task funcTest(type: Test) {
include '**/*FunctionalSpec.*'
systemProperties = testSystemProperties
reports.html {
destination = file("${reporting.baseDir}/funcTests")
}
}
task archiveMessagingLibsDependencies(type: Sync) {
from configurations.messagingLibs.resolvedConfiguration.resolvedArtifacts.collect { it.file }
into messagingLibsDir
}
task archiveContractVerifierGradlePluginLibsDependencies(type: Sync) {
from configurations.contractVerifierGradlePluginLibs.resolvedConfiguration.resolvedArtifacts.collect { it.file }
into contractVerifierGradlePluginLibsDir
}
// archive task needs to have jars ready
archiveMessagingLibsDependencies.dependsOn project(":$verifier-root:$verifier-messaging-root:$verifier-integration").tasks.jar
archiveContractVerifierGradlePluginLibsDependencies.dependsOn project(":$verifier-root:$verifier-gradle-plugin").tasks.jar
test.dependsOn archiveMessagingLibsDependencies, archiveContractVerifierGradlePluginLibsDependencies
funcTest.dependsOn archiveMessagingLibsDependencies, archiveContractVerifierGradlePluginLibsDependencies
uploadArchives.dependsOn { funcTest }
}