File tree 1 file changed +7
-1
lines changed
src/main/groovy/org/scoverage
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 1
1
package org.scoverage
2
2
3
3
import org.gradle.api.Action
4
+ import org.gradle.api.GradleException
4
5
import org.gradle.api.Project
5
6
import org.gradle.api.artifacts.Configuration
6
7
import org.gradle.api.file.FileCollection
@@ -91,7 +92,12 @@ class ScoverageExtension {
91
92
extension. reportDir. mkdirs()
92
93
93
94
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
+ }
95
101
FileCollection pluginDependencies = configuration. filter { it != pluginFile }
96
102
97
103
t. tasks[ScoveragePlugin . COMPILE_NAME ]. configure {
You can’t perform that action at this time.
0 commit comments