Creating missing folders if not present

without this fix sometimes when the folders are not created then exceptions occur while trying to process the project.

Related to #159
This commit is contained in:
Marcin Grzejszczak
2016-12-21 14:36:58 +01:00
parent bde5270dcc
commit 4acc3ca1ee

View File

@@ -100,9 +100,12 @@ class SpringCloudContractVerifierGradlePlugin implements Plugin<Project> {
private void setConfigurationDefaults(ContractVerifierExtension extension) {
extension.with {
generatedTestSourcesDir = generatedTestSourcesDir ?: project.file("${project.buildDir}/generated-test-sources/contracts")
generatedTestSourcesDir.mkdirs()
contractsDslDir = contractsDslDir ?: defaultContractsDir() //TODO: Use sourceset
contractsDslDir.mkdirs()
basePackageForTests = basePackageForTests ?: 'org.springframework.cloud.contract.verifier.tests'
stubsOutputDir = stubsOutputDir ?: project.file("${project.buildDir}/stubs/")
stubsOutputDir.mkdirs()
}
}