Open mwos-sl opened 2 years ago
Currently many things are initiated during configuration lifecycle phase. As a result applying the plugin extends configuration time of a whole project, which is a big deal for big projects with hundreds of modules.
Instead, as much as possible rsources should be calculated during task execution (e.g. in doFirst block). Example: ScoverageRunner is created always, even if none of scoverage tasks are invoked from the command line: https://github.com/scoverage/gradle-scoverage/blob/master/src/main/groovy/org/scoverage/ScoveragePlugin.groovy#L83
doFirst
ScoverageRunner
Same thing for:
def checker = new CoverageChecker(project.logger)
it could be easily moved to doLast { ... }
doLast { ... }
Currently many things are initiated during configuration lifecycle phase. As a result applying the plugin extends configuration time of a whole project, which is a big deal for big projects with hundreds of modules.
Instead, as much as possible rsources should be calculated during task execution (e.g. in
doFirst
block). Example:ScoverageRunner
is created always, even if none of scoverage tasks are invoked from the command line: https://github.com/scoverage/gradle-scoverage/blob/master/src/main/groovy/org/scoverage/ScoveragePlugin.groovy#L83