File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/test/groovy/org/gradlex/jvm/dependency/conflict/test Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import static org.gradlex.jvm.dependency.conflict.detection.rules.CapabilityDefi
1212 * Test that checks that the Jar files behind each CapabilityDefinition actually have overlapping classes.
1313 */
1414class JarOverlapTest extends Specification {
15+ private static final String SAMPLE_ALL_BUILD_FILE = " samples/sample-all/build.gradle.kts"
1516
1617 // Some Jars do not have overlapping classes, but contain conflicting implementations of the same service.
1718 static def expectedToOverlap = values() - [
@@ -28,7 +29,7 @@ class JarOverlapTest extends Specification {
2829 def latestVersions = []
2930
3031 void setup () {
31- latestVersions = new File (" samples/sample-all/build.gradle.kts " )
32+ latestVersions = new File (SAMPLE_ALL_BUILD_FILE )
3233 .readLines()
3334 .findAll { it. contains(" implementation(" ) }
3435 .collect { it. trim() }
@@ -56,7 +57,11 @@ class JarOverlapTest extends Specification {
5657 if (specific) {
5758 dependencies. create(specific)
5859 } else {
59- dependencies. create(latestVersions. find { it. startsWith(module + " :" ) })
60+ def moduleForSample = latestVersions. find { it. startsWith(module + " :" ) }
61+ if (! moduleForSample) {
62+ throw new RuntimeException (" Missing entry for " + module + " in " + SAMPLE_ALL_BUILD_FILE )
63+ }
64+ dependencies. create(moduleForSample)
6065 }
6166 }
6267
You can’t perform that action at this time.
0 commit comments