return this;
}
-
protected DefaultPluginDescriptor setPluginVersion(String version) {
this.version = version;
if (dependencies != null) {
dependencies = dependencies.trim();
if (!dependencies.isEmpty()) {
- String[] tokens = dependencies.split(",");
- for (String dependency : tokens) {
- dependency = dependency.trim();
- if (!dependency.isEmpty()) {
- this.dependencies.add(new PluginDependency(dependency));
- }
- }
+ setDependencies(dependencies.split(","));
+ }
+ }
+
+ return this;
+ }
+
+ protected PluginDescriptor setDependencies(String... dependencies) {
+ for (String dependency : dependencies) {
+ dependency = dependency.trim();
+ if (!dependency.isEmpty()) {
+ this.dependencies.add(new PluginDependency(dependency));
}
}
public int hashCode() {
return Objects.hash(pluginId, pluginDescription, pluginClass, version, requires, provider, dependencies, license);
}
+
}