Fixed the missing setup of path inclusion in generateContractTests task

without this change the Gradle plugin works only by chance since the stub creation task is setting the proper paths. If you execute the task manually it will fail

fixes #222
This commit is contained in:
Marcin Grzejszczak
2017-02-10 15:51:04 +01:00
parent 270907fbd9
commit 047addfe84

View File

@@ -44,7 +44,11 @@ class GenerateServerTestsTask extends ConventionTask {
Task copyContractsTask = project.getTasksByName(COPY_CONTRACTS_TASK_NAME, false).first()
ContractVerifierConfigProperties props = props(copyContractsTask)
File contractsDslDir = contractsDslDir(copyContractsTask, props)
if (getConfigProperties().getContractDependency()) {
project.logger.debug("Updating the stubs locations for the case where we have a JAR with contracts")
props.contractsDslDir = contractsDslDir
props.includedContracts = ".*"
}
project.logger.info("Spring Cloud Contract Verifier Plugin: Invoking test sources generation")
project.logger.info("Contracts are unpacked to [${contractsDslDir}]")
project.logger.info("Included contracts are [${props.includedContracts}]")