I have been asked by my developers to have scodec libraries installed on a linux server and I'm lost as I can't find any documentation that points about installing the scodec library!
-
2You generally do not install Java / Scala libraries on the server. – Luis Miguel Mejía Suárez Jan 19 '21 at 15:03
1 Answers
scodec has 11 repositories in github. This is scodec.org, the official documentation. Seems like the releases page on the docs, is not very updated. So I am going to elaborate on the repositories based on github:
scodec-bits
Provides persistent datatypes for working with bits and bytes.
Add the following into your build.sbt
file:
libraryDependencies += "org.scodec" %% "scodec-bits" % "1.1.23"
scodec-stream
Scodec-stream is a library for streaming binary encoding and decoding. It is built atop scodec and fs2.
Add the following into your build.sbt
file:
libraryDependencies += "org.scodec" %% "scodec-stream" % "2.0.0"
scodec-protocols
Provides models of common binary protocols using the scodec library.
Add the following into your build.sbt
file:
libraryDependencies += "org.scodec" %% "scodec-protocols" % "2.0.0"
scodec
Github link. This package DO NOT publish to Maven central/Sonatype. Hence you cannot fetch it this way. You can try to download one of the releases and read How can I add unmanaged JARs in sbt-assembly to the final fat JAR?
scodec-cats
Integration between scodec and cats.
Add the following into your build.sbt
:
libraryDependencies += "org.scodec" %% "scodec-cats" % "1.0.0"
scodec-build
This repository contains an SBT plugin that is used by the SBT builds of the other scodec modules. It is not intended for direct use.
I will not elaborate about this one. If there is a need for that please comment and I'll add details.
scodec.github.io
No releases yet. Skipping as well. Github link.
scodec-website
Source for scodec.org website. Hence skipping.
scodec-spire
Integration between scodec and spire. This package last publish was at 2016, and it was for Scala 2.11. But you can add it with:
libraryDependencies += "org.scodec" %% "scodec-spire" % "0.4.0"
I skipped scodec-scalaz and scodec-akka which are archived.
I hope this will give you an idea where to start.

- 8,413
- 7
- 27
- 35
-
I did try your answer but am getting a syntax error! " [error] Expected ';' " – Rajesh Reddy B Jan 20 '21 at 21:17
-
@TomerShetah Thanks for the detailed answer. I will give it a try. However, i have a doubt, after doing this, will the library be available for all the users or just for me since i did the build? – Rajesh Reddy B Jan 21 '21 at 12:32
-
@RajeshReddyB whoever has the needed code in its `build.sbt` will have it. Check it in your source control so everyone will have it. – Tomer Shetah Jan 21 '21 at 12:36