@@ -134,6 +134,13 @@ class ContractVerifierExtension {
|
||||
*/
|
||||
Map<String, String> baseClassMappings = [:]
|
||||
|
||||
/**
|
||||
* If set to true then the {@code target} or {@code build} folders are getting
|
||||
* excluded from any operations. This is used out of the box when working with
|
||||
* common repo with contracts.
|
||||
*/
|
||||
boolean excludeBuildFolders
|
||||
|
||||
void contractDependency(@DelegatesTo(Dependency) Closure closure) {
|
||||
closure.delegate = contractDependency
|
||||
closure.call()
|
||||
|
||||
@@ -32,6 +32,9 @@ class ContractsCopyTask extends ConventionTask {
|
||||
project.copy {
|
||||
from(file)
|
||||
include(antPattern)
|
||||
if (props.isExcludeBuildFolders()) {
|
||||
exclude "**/target/**", "**/build/**"
|
||||
}
|
||||
into(outputContractsFolder)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,8 @@ class ExtensionToProperties {
|
||||
stubsSuffix: extension.stubsSuffix,
|
||||
assertJsonSize: extension.assertJsonSize,
|
||||
packageWithBaseClasses: extension.packageWithBaseClasses,
|
||||
baseClassMappings: extension.baseClassMappings
|
||||
baseClassMappings: extension.baseClassMappings,
|
||||
excludeBuildFolders: extension.excludeBuildFolders
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,6 +90,7 @@ class SpringCloudContractVerifierGradlePlugin implements Plugin<Project> {
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: Deprecate this since starting with 1.1.x
|
||||
private void addProjectDependencies(Project project) {
|
||||
//TODO: Consider removing this at some point
|
||||
project.dependencies.add("testCompile", "com.github.tomakehurst:wiremock:2.1.7")
|
||||
|
||||
Reference in New Issue
Block a user