Skip to content

Commit

Permalink
fix(gradle): Ignore dependencySources configurations during resolution
Browse files Browse the repository at this point in the history
See [1] for how Kotlin itself ignores the resolution of `dependencySources`
configurations. Also, Kotlin 2.0.20 will fix the issue by using
detachable vari9ants instead [2].

Fixes #8755.

[1]: JetBrains/kotlin@73b290a#diff-13384ab95f3c49314bc7e8d26b20c8981d5c514272bbd8c20130b9761be57fb6R724-R729
[2]: JetBrains/kotlin@659a6fb

Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
  • Loading branch information
sschuberth committed Jul 16, 2024
1 parent 5503c68 commit fb1f601
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ internal fun Configuration.isRelevant(): Boolean {
// https://gist.github.com/h0tk3y/41c73d1f822378f52f1e6cce8dcf56aa for some background information.
val isDependenciesMetadata = name.endsWith("DependenciesMetadata")

return canBeResolved && !isDeprecatedConfiguration && !isDependenciesMetadata
// Ignore Kotlin Multiplatform Project configurations for resolving source files because by nature not every
// published library has sources variants that can be resolved.
val isDependencySources = name == "dependencySources" || name.endsWith("DependencySources")

return canBeResolved && !isDeprecatedConfiguration && !isDependenciesMetadata && !isDependencySources
}

/**
Expand Down

0 comments on commit fb1f601

Please sign in to comment.