Parallel flag not supported in Gradle multi multi project builds - Results in poor performance in large projects
Closed this issue · 0 comments
node -v
: v16.15.0npm -v
: 8.5.5snyk -v
: 1.874.0- Command run:
snyk test --all-projects -- -parallel
Expected behaviour
Gradles parallel flag to be supported and Underlying Gradle Task is executed in a parallel fashion, Most enterprise projects which use Gradle are large multi project builds as such running Snyk-test on them is a time consuming task, For example one large legacy project takes upwards of 20 - 30 minutes to complete a scan.
Supporting the parallel flag would greatly assist here as this allows Gradle to execute the same tasks in submodules in a parallel fashion.
Actual behaviour
Gradle -parallel flag not supported throws a error
Steps to reproduce
Execute the following against any gradle project which is a mult project build
snyk test --all-projects -- -parallel
The following error will be thrown
15:42:11 * Where:
15:42:11 Initialization script '/tmp/tmp-3648-NkSbzlUnvQH8--init.gradle' line: 222
15:42:11
15:42:11 * What went wrong:
15:42:11 Execution failed for task ':processors:snykResolvedDepsJson'.
15:42:11 > java.util.ConcurrentModificationException (no error message)
If applicable, please append the --debug
flag on your command and include the output here **ensuring to remove any sensitive/personal details or tokens.