Added the work offline switch for Gradle plugin

without this change you have to pass `contractRepositoryUrl` for the contract jar to be downloaded
with this change you can pass the `contractsWorkOffline` flag and the local maven repo will be analyzed

fixes #140
This commit is contained in:
Marcin Grzejszczak
2016-11-08 17:27:43 +01:00
parent 293fa22bf4
commit 235af1df1e

View File

@@ -47,7 +47,7 @@ class GradleContractsDownloader {
}
private boolean shouldDownloadContracts(ContractVerifierExtension extension) {
return StringUtils.hasText(extension.contractsRepositoryUrl) &&
return (StringUtils.hasText(extension.contractsRepositoryUrl) || extension.contractsWorkOffline) &&
(StringUtils.hasText(extension.contractDependency.artifactId) ||
StringUtils.hasText(extension.contractDependency.stringNotation))
}