Switch back over to using flat-file plugin info, auto-copy properties files in gradle

This commit is contained in:
ceikry 2023-07-14 22:55:27 -05:00
parent dd52e7e9fb
commit 029c13233f
33 changed files with 70 additions and 85 deletions

View file

@ -103,11 +103,16 @@ public class PluginRepository {
Class<?> clazz = loader.loadClass(file.getName() + ".plugin");
PluginInfo info;
if (infoFile.exists())
info = PluginInfo.loadFromFile(infoFile);
else
info = PluginInfo.loadFromClass(clazz);
PluginInfo info = null;
try {
if (infoFile.exists())
info = PluginInfo.loadFromFile(infoFile);
else
info = PluginInfo.loadFromClass(clazz);
} catch (Exception e) {
System.err.println("Unable to load plugin " + file.getName() + " because there were issues parsing its info: ");
e.printStackTrace();
}
if (info == null) {
System.err.println("Unable to load plugin " + file.getName() + " because it contains no information about author, version, etc!");