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