buildProjectCollection static method
Builds an AnalysisContextCollection rooted at projectRoot for a
long-lived caller (the scan daemon) to hold and reuse across many
runResolvedWithCollection calls. This is the expensive step
runResolved otherwise repeats on every invocation.
Implementation
static AnalysisContextCollection buildProjectCollection(String projectRoot) {
return AnalysisContextCollection(
includedPaths: [p.normalize(p.absolute(projectRoot))],
resourceProvider: PhysicalResourceProvider.INSTANCE,
);
}