Skip to content

Commit 6b787d4

Browse files
committed
Tweak group check.
1 parent c808691 commit 6b787d4

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

build.gradle.kts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,11 @@ java {
4646
//
4747
// This project is a dependency of all C Thing Software projects. Therefore, to avoid circular
4848
// dependencies, it should not depend on any C Thing Software project.
49+
val prohibitedGroups = setOf("org.cthing", "com.cthing")
4950
configurations.all {
50-
resolutionStrategy {
51-
eachDependency {
52-
val prohibitedGroups = listOf("org.cthing", "com.cthing")
53-
if (requested.group in prohibitedGroups) {
54-
throw GradleException("A dependency on '${requested.group}:${requested.name}' is prohibited.")
55-
}
51+
resolutionStrategy.eachDependency {
52+
if (requested.group in prohibitedGroups) {
53+
throw GradleException("A dependency on '${requested.group}:${requested.name}' is prohibited.")
5654
}
5755
}
5856
}

0 commit comments

Comments
 (0)