We do have a custom plugin as a single file in our project
folder:
acme-project
|- ...
|- project
| |- CustomPlugin.scala
object CustomPlugin extends AutoPlugin {
// ...
That was simple and easy until that plugin started to grow...
In the first step, we added more classes/objects to the same source file. However, it continues to grow and I would like to add more structure via packages.
acme-project
|- ...
|- project
| |- CustomPlugin.scala
| |- SupportingClass.scala
| |- acme
| | |- plugin
| | | |- PackagedClass.scala
My CustomPlugin
seems to be able to use the SupportingClass
from the folder, whenever this class declare another package. However, I cannot use the PackagedClass
:
[error] /~/acme-project/project/CustomPlugin.scala:1:8: not found: object acme
[error] import mega.plugin.PackagedClass
[error] ^
I tried to add one src/main/scala
folder but have the same kind of import errors.
So, I would like to know if there are ways to create large/structured plugins inside a project without making a complete one?
I would like to keep the simplicity of this format where I do not have to publish my plugin. Having it inside a dedicated module would be ok.
Thanks