pluginmanager: only load jar plugins from the folder
This commit is contained in:
@@ -166,8 +166,6 @@ subprojects {
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
withType<AbstractArchiveTask> {
|
||||
|
||||
@@ -76,9 +76,6 @@ tasks {
|
||||
jar {
|
||||
enabled = false
|
||||
}
|
||||
sourcesJar {
|
||||
enabled = false
|
||||
}
|
||||
processResources {
|
||||
enabled = false
|
||||
}
|
||||
|
||||
@@ -136,6 +136,10 @@ class ExternalPf4jPluginManager extends DefaultPluginManager
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!isPluginEligibleForLoading(pluginPath) && isNotDevelopment())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
loadPluginFromPath(pluginPath);
|
||||
}
|
||||
catch (PluginRuntimeException e)
|
||||
@@ -346,4 +350,9 @@ class ExternalPf4jPluginManager extends DefaultPluginManager
|
||||
|
||||
return pluginRepository.deletePluginPath(pluginPath);
|
||||
}
|
||||
|
||||
private boolean isPluginEligibleForLoading(Path path)
|
||||
{
|
||||
return path.toFile().getName().endsWith(".jar");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user