Skip to content

Commit

Permalink
fix(gradle-plugin): Add a work-around for a regression in Gradle 8.2
Browse files Browse the repository at this point in the history
The id used here is a hash calculated from the repository properties
[1], so it can be safely mapped to a specific repository name.

Fixes #8068.

[1]: https://github.com/gradle/gradle/blob/v8.2.0/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/repositories/descriptor/UrlRepositoryDescriptor.java#L111-L134

Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
  • Loading branch information
sschuberth committed Mar 15, 2024
1 parent 0ddcfe4 commit 568465f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ internal class OrtModelBuilder : ToolingModelBuilder {
}.recoverCatching {
@Suppress("DEPRECATION")
selectedComponent.repositoryName
}.map {
// Work around https://github.com/gradle/gradle/issues/25674.
if (it == "26c913274550a0b2221f47a0fe2d2358") "MavenRepo" else it
}.getOrNull()

repositories[repositoryId]?.let { repositoryUrl ->
Expand Down

0 comments on commit 568465f

Please sign in to comment.