@@ -67,6 +67,13 @@ class RecursiveFilesConverter {
|
||||
File sourceFile = contract.path.toFile()
|
||||
StubGenerator stubGenerator = holder.converterForName(sourceFile.name);
|
||||
try {
|
||||
String path = sourceFile.path
|
||||
if (properties.isExcludeBuildFolders() && (matchesPath(path, "target") || matchesPath(path, "build"))) {
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Exclude build folder is set. Path [${path}] contains [target] or [build] in its path")
|
||||
}
|
||||
return
|
||||
}
|
||||
if (!contract.convertedContract && !stubGenerator) {
|
||||
return
|
||||
}
|
||||
@@ -90,6 +97,10 @@ class RecursiveFilesConverter {
|
||||
}
|
||||
}
|
||||
|
||||
private boolean matchesPath(String path, String folder) {
|
||||
return path.matches("^.*${File.separator}${folder}${File.separator}.*\$")
|
||||
}
|
||||
|
||||
private Path createAndReturnTargetDirectory(File sourceFile) {
|
||||
Path relativePath = Paths.get(properties.contractsDslDir.toURI()).relativize(sourceFile.parentFile.toPath())
|
||||
Path absoluteTargetPath = outMappingsDir.toPath().resolve(relativePath)
|
||||
|
||||
@@ -80,13 +80,21 @@ class RecursiveFilesConverter {
|
||||
properties.excludedFiles as Set, [] as Set, properties.includedContracts)
|
||||
ListMultimap<Path, ContractMetadata> contracts = scanner.findContracts()
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Found the following contracts $contracts")
|
||||
log.debug("Found the following contracts ${contracts}")
|
||||
log.debug("Exclude build folder: [${properties.isExcludeBuildFolders()}]")
|
||||
}
|
||||
contracts.asMap().entrySet().each { entry ->
|
||||
entry.value.each { ContractMetadata contract ->
|
||||
File sourceFile = contract.path.toFile()
|
||||
StubGenerator stubGenerator = holder.converterForName(sourceFile.name);
|
||||
try {
|
||||
String path = sourceFile.path
|
||||
if (properties.isExcludeBuildFolders() && (matchesPath(path, "target") || matchesPath(path, "build"))) {
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Exclude build folder is set. Path [${path}] contains [target] or [build] in its path")
|
||||
}
|
||||
return
|
||||
}
|
||||
if (!contract.convertedContract && !stubGenerator) {
|
||||
return
|
||||
}
|
||||
@@ -110,6 +118,10 @@ class RecursiveFilesConverter {
|
||||
}
|
||||
}
|
||||
|
||||
private boolean matchesPath(String path, String folder) {
|
||||
return path.matches("^.*${File.separator}${folder}${File.separator}.*\$")
|
||||
}
|
||||
|
||||
private Path createAndReturnTargetDirectory(File sourceFile) {
|
||||
Path relativePath = Paths.get(properties.contractsDslDir.toURI()).relativize(sourceFile.parentFile.toPath())
|
||||
Path absoluteTargetPath = outMappingsDir.toPath().resolve(relativePath)
|
||||
|
||||
Reference in New Issue
Block a user