mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-31 05:25:25 +00:00
Show implied plugin dependencies (#5472)
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
This commit is contained in:
1 parent
ed5aa55737
commit
4fc0d5a085
4 files changed
+70
-46
No files matched your search
@@ -1070,6 +1070,27 @@ public class PluginWrapper implements Comparable<PluginWrapper>, ModelObject {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get list of implied dependencies.
|
||||
* @since TODO
|
||||
*/
|
||||
@Restricted(NoExternalUse.class)
|
||||
public @NonNull Set<String> getImpliedDependents() {
|
||||
if (!isDetached()) {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
Set<String> implied = new HashSet<>();
|
||||
for (PluginWrapper p : Jenkins.get().getPluginManager().getPlugins()) {
|
||||
for (Dependency dependency : DetachedPluginsUtil.getImpliedDependencies(p.shortName, p.getRequiredCoreVersion())) {
|
||||
if (dependency.shortName.equals(shortName)) {
|
||||
implied.add(p.shortName);
|
||||
}
|
||||
}
|
||||
}
|
||||
return implied;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sort by short name.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user