Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neokoenig/cd54c870007845fd500e7c624d1b9a63 to your computer and use it in GitHub Desktop.
Save neokoenig/cd54c870007845fd500e7c624d1b9a63 to your computer and use it in GitHub Desktop.
// If a plugin has a jar or class file, automatically add the mapping to this.javasettings.
this.wheels.pluginDir = this.wheels.rootPath & "plugins";
this.wheels.pluginFolders = DirectoryList(this.wheels.pluginDir, "true", "path", "*.class|*.jar|*.java");
for (this.wheels.folder in this.wheels.pluginFolders) {
if(!structKeyExists(this, "javaSettings")){
this.javaSettings={};
}
if(!structKeyExists(this.javaSettings, "LoadPaths")){
this.javaSettings.LoadPaths=[];
}
this.wheels.pluginPath = GetDirectoryFromPath(this.wheels.folder);
if (!ArrayFind(this.javaSettings.LoadPaths, this.wheels.pluginPath)) {
ArrayAppend(this.javaSettings.LoadPaths, this.wheels.pluginPath);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment