Like it says on the tin, how would I go by creating a library using sbt?
I have a set of utilities and convenience functions that I want to be easily distributed between my projects. The easiest way to do this of course, is by having them compile to a library, that I can then include in the build path of any given project that'll use it.
Libraries are often much easier to include in multiple projects than having multiple copies of the same classes. So how would I do this?
Just create a project with the library code, and use the publishLocal
command to put it in your local Ivy repo. Then you can include it in other projects.
This next bit may be overkill for your case, but I have this blog post outlining how to do all of this for an open source project. Perhaps you'll use it as inspiration to make it available for us all to enjoy. :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With