Replace SelfResolvingDependency by ExternalModuleDependency#11340
Conversation
…dency `SelfResolvingDependency` was removed in Gradle 9. The original POM filter in `publish.gradle` excluded file-based dependencies by negating instanceof `SelfResolvingDependency`, which `FileCollectionDependency` implemented in Gradle 8. This change replaces it with a positive check for `ProjectDependency` and `ExternalModuleDependency`, which are the two types that actually have Maven coordinates and belong in a published POM.
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
The merge request has been interrupted because the build 0 took longer than expected. The current limit for the base branch 'master' is 120 minutes. Possible reasons:
|
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
What Does This Do
Replace
!(it instanceof SelfResolvingDependency)withit instanceof ExternalModuleDependencyin the POM-generation block ofgradle/publish.gradle. The filter now explicitly allows only dependencies with Maven coordinates (project deps and external module deps) rather than excluding file deps by the already deprecated and then removed marker interface.Motivation
SelfResolvingDependencywas removed in Gradle 9 as part of the dependency API cleanup, now, as suggested in the deprecation message all resolution happens through aConfiguration, not through individual dependencies.The positive check is also safer: a future unknown dependency type without Maven coordinates won't accidentally slip into published POM files, whereas a negative exclusion could let it through.
Additional Notes
Sub-PR from #10402, #11272