Gradle plugin no longer requires the artifact ids to be set for external contract downloading

without this change there's a difference between Maven and Gradle plugin usage. If you want to use a custom stubdownloaderbuilder, you need to set a artifact id of a dependency with contracts. That shouldn't be mandatory
with this change we no longer require it

fixes gh-794
This commit is contained in:
Marcin Grzejszczak
2018-11-12 23:56:08 +01:00
parent a0aaee7578
commit 080ac0f2f4

View File

@@ -64,9 +64,7 @@ class GradleContractsDownloader {
}
private boolean shouldDownloadContracts(ContractVerifierExtension extension) {
return [StubRunnerProperties.StubsMode.LOCAL, StubRunnerProperties.StubsMode.REMOTE].any {
it == extension.contractsMode } && (StringUtils.hasText(extension.contractDependency.artifactId) ||
StringUtils.hasText(extension.contractDependency.stringNotation))
return extension.contractsMode != StubRunnerProperties.StubsMode.CLASSPATH
}
protected ContractDownloader contractDownloader(ContractVerifierExtension extension, StubConfiguration configuration) {