File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/main/groovy/org/scoverage Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 11package org.scoverage
22
33import org.gradle.api.Action
4+ import org.gradle.api.GradleException
45import org.gradle.api.Project
56import org.gradle.api.artifacts.Configuration
67import org.gradle.api.file.FileCollection
@@ -91,7 +92,12 @@ class ScoverageExtension {
9192 extension. reportDir. mkdirs()
9293
9394 Configuration configuration = t. configurations[ScoveragePlugin . CONFIGURATION_NAME ]
94- File pluginFile = configuration. filter { it. name. contains(' plugin' ) }. iterator(). next()
95+ File pluginFile
96+ try {
97+ pluginFile = configuration. filter { it. name. contains(' plugin' ) }. iterator(). next()
98+ } catch (NoSuchElementException e) {
99+ throw new GradleException (" Could not find a plugin jar in configuration '${ ScoveragePlugin.CONFIGURATION_NAME} '" )
100+ }
95101 FileCollection pluginDependencies = configuration. filter { it != pluginFile }
96102
97103 t. tasks[ScoveragePlugin . COMPILE_NAME ]. configure {
You can’t perform that action at this time.
0 commit comments