Enable labels/categories with deprecated to show a warning for plugins

This commit is contained in:
Joseph Petersen committed 2019-06-17 19:00:40 +02:00
1 parent bc40ab3ae5
commit 908c5ace5d
5 files changed
+102

No files matched your search

@@ -362,6 +362,15 @@ public class PluginWrapper implements Comparable<PluginWrapper>, ModelObject {
return dependencies.stream().anyMatch(d -> !d.optional);
}
/**
* Is this plugin labeled deprecated?
* @return {@code true} when plugin contains deprecated in categories, otherwise {@code false}.
*/
public boolean isDeprecated() {
UpdateSite.Plugin info = getInfo();
return info != null && Arrays.asList(info.categories).contains("deprecated");
}
@ExportedBean
public static final class Dependency {
@Exported