diff --git a/src/main/groovy/cz/augi/gradle/wartremover/WartremoverPlugin.groovy b/src/main/groovy/cz/augi/gradle/wartremover/WartremoverPlugin.groovy index 2b06856..82cea6f 100644 --- a/src/main/groovy/cz/augi/gradle/wartremover/WartremoverPlugin.groovy +++ b/src/main/groovy/cz/augi/gradle/wartremover/WartremoverPlugin.groovy @@ -10,7 +10,7 @@ class WartremoverPlugin implements Plugin { def extension = project.extensions.create('wartremover', WartremoverExtension) project.afterEvaluate { project.dependencies { scalaCompilerPlugins "org.wartremover:wartremover_${getWartremoverArtifactSuffix(project)}" } - project.tasks.withType(ScalaCompile).all { scalaTask -> + project.tasks.withType(ScalaCompile).configureEach { scalaTask -> if (scalaTask.scalaCompileOptions.additionalParameters == null) { scalaTask.scalaCompileOptions.additionalParameters = new ArrayList() }