How to install scodec library in scala/sbt?

148 Views Asked by At

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!

1

There are 1 best solutions below

3
On

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"

Maven link. Github link.

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"

Maven link. Github link.

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"

Maven link. Github link.

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"

Maven link. Github link.

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"

Maven link. Github link.

I skipped scodec-scalaz and scodec-akka which are archived.

I hope this will give you an idea where to start.