Skip to content

Commit

Permalink
Fix slow file traversal in configuration phase (#163)
Browse files Browse the repository at this point in the history
Replace .files with .getFrom() for ConfigurableFileCollection objectsFiles list all folder content that could be extermely slow for the second build
  • Loading branch information
fo2rist authored and vanniktech committed Sep 27, 2019
1 parent 9607c93 commit 5461b09
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ class GenerationPlugin implements Plugin<Project> {
mergeTask.executionData.setFrom(executionData.files + mergeTask.executionData.files)
}
if (mergedReportTask != null) {
mergedReportTask.classDirectories.setFrom(classDirectories.files + mergedReportTask.classDirectories.files)
mergedReportTask.additionalSourceDirs.setFrom(additionalSourceDirs.files + mergedReportTask.additionalSourceDirs.files)
mergedReportTask.sourceDirectories.setFrom(sourceDirectories.files + mergedReportTask.sourceDirectories.files)
mergedReportTask.classDirectories.setFrom(classDirectories.getFrom() + mergedReportTask.classDirectories.getFrom())
mergedReportTask.additionalSourceDirs.setFrom(additionalSourceDirs.getFrom() + mergedReportTask.additionalSourceDirs.getFrom())
mergedReportTask.sourceDirectories.setFrom(sourceDirectories.getFrom() + mergedReportTask.sourceDirectories.getFrom())
}
}

Expand Down Expand Up @@ -248,9 +248,9 @@ class GenerationPlugin implements Plugin<Project> {
mergeTask.executionData.setFrom(executionData.files + mergeTask.executionData.files)
}
if (mergedReportTask != null && addToMergeTask) {
mergedReportTask.classDirectories.setFrom(classDirectories.files + mergedReportTask.classDirectories.files)
mergedReportTask.additionalSourceDirs.setFrom(additionalSourceDirs.files + mergedReportTask.additionalSourceDirs.files)
mergedReportTask.sourceDirectories.setFrom(sourceDirectories.files + mergedReportTask.sourceDirectories.files)
mergedReportTask.classDirectories.setFrom(classDirectories.getFrom() + mergedReportTask.classDirectories.getFrom())
mergedReportTask.additionalSourceDirs.setFrom(additionalSourceDirs.getFrom() + mergedReportTask.additionalSourceDirs.getFrom())
mergedReportTask.sourceDirectories.setFrom(sourceDirectories.getFrom() + mergedReportTask.sourceDirectories.getFrom())
}
}

Expand Down

0 comments on commit 5461b09

Please sign in to comment.