I'm going to create a custom plugin type, so I need to create a plugin manager, plugin base, plugin Interface and a plugin annotation, the annotations goes to ModuleRoot/src/Annotation but for the rest I saw 2 approaches

  • Place PluginManager, PluginBase and PluginInterface in moduleRoot/src
  • Place PluginManager, PluginBase and PluginInterface in moduleRoot/src/Plugin

but I couldn't resolve which one is the best practice?

  • IMO for namespacing and organization I put them under Plugin.
    – Kevin
    Mar 25, 2021 at 13:17
  • 1
    Neither one is better practice, different people will tell you different things based on their own preferences. Person A will say it's better for PluginManager not to be in the Plugin subfolder, because it's not a Plugin. Person B will tell you what @Kevin mentioned above. They're both fine
    – Clive
    Mar 25, 2021 at 15:22


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.