Skip to content

Commit e48e7ab

Browse files
runningcodeclaude
andcommitted
test(spring): Create the Spring Boot matrix classpaths as resolvable configurations
They're only ever resolved, so configurations.resolvable() fits them better than create() with isCanBeConsumed = false: nothing can consume them or declare dependencies on them. Every matrix classpath resolves the same as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 961ffe0 commit e48e7ab

1 file changed

Lines changed: 16 additions & 14 deletions

File tree

‎build-logic/src/main/kotlin/io/sentry/gradle/SpringBootMatrixPlugin.kt‎

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -80,21 +80,23 @@ abstract class SpringBootMatrixExtension @Inject constructor(private val project
8080
val configurations = project.configurations
8181
val dependencies =
8282
configurations.findByName(name)
83-
?: configurations.create(name) {
84-
isCanBeConsumed = false
85-
extendsFrom(
86-
configurations.getByName(sources.implementationConfigurationName),
87-
configurations.getByName(sources.runtimeOnlyConfigurationName),
88-
)
89-
attributes.addAllLater(
90-
configurations.getByName(sources.runtimeClasspathConfigurationName).attributes
91-
)
92-
// What setting the version in the catalog does: every Spring Boot artifact, the BOM
93-
// included, is in this group. Libraries pinned to their own version still win conflicts.
94-
resolutionStrategy.eachDependency {
95-
if (requested.group == "org.springframework.boot") useVersion(version)
83+
?: configurations
84+
.resolvable(name) {
85+
extendsFrom(
86+
configurations.getByName(sources.implementationConfigurationName),
87+
configurations.getByName(sources.runtimeOnlyConfigurationName),
88+
)
89+
attributes.addAllLater(
90+
configurations.getByName(sources.runtimeClasspathConfigurationName).attributes
91+
)
92+
// What setting the version in the catalog does: every Spring Boot artifact, the BOM
93+
// included, is in this group. Libraries pinned to their own version still win
94+
// conflicts.
95+
resolutionStrategy.eachDependency {
96+
if (requested.group == "org.springframework.boot") useVersion(version)
97+
}
9698
}
97-
}
99+
.get()
98100
return sources.output + dependencies
99101
}
100102

0 commit comments

Comments
 (0)