Usage in SBT

You are viewing the documentation for the latest Monix 3.x series.
Older versions: 2.x

The packages are published on Maven Central, cross-compiled for Scala 2.11, 2.12 and 2.13, also cross-compiled to Scala.js 0.6.x and 1.x:

These install instructions are for Scala’s SBT (see the setup instructions). Also see versioning scheme for backwards-compatibility guarantees.

Everything in Monix #

The main monix project contains everything in the Monix core.

Insert this line in build.sbt or Build.scala:

// for the JVM
libraryDependencies += "io.monix" %% "monix" % "3.3.0"

Monix is cross-compiled with Scala.js, so to target Javascript or mixed JVM/Javascript environments:

// for Scala.js/Javascript or cross-compilation
libraryDependencies += "io.monix" %%% "monix" % "3.3.0"

Depends on:

Sub-modules & Dependencies graph #

Dependencies graph

Sub-project: monix-execution #

You can use just monix-execution, the lower level primitives for dealing with asynchronous execution, thus exposing Scheduler and Cancelable.

// Targeting just the JVM
libraryDependencies += "io.monix" %% "monix-execution" % "3.3.0"

// For Scala.js or cross-compiled projects
libraryDependencies += "io.monix" %%% "monix-execution" % "3.3.0"

Depends on:

Sub-project: monix-catnap #

You can use just monix-catnap (see API Docs), the high-level primitives building on top of Cats Effect.

// Targeting just the JVM
libraryDependencies += "io.monix" %% "monix-catnap" % "3.3.0"

// For Scala.js or cross-compiled projects
libraryDependencies += "io.monix" %%% "monix-catnap" % "3.3.0"

Depends on:

Sub-project: monix-eval #

You can use just monix-eval, the sub-project that exposes Task and Coeval:

// Targeting just the JVM
libraryDependencies += "io.monix" %% "monix-eval" % "3.3.0"

// For Scala.js or cross-compiled projects
libraryDependencies += "io.monix" %%% "monix-eval" % "3.3.0"

Depends on:

Sub-project: monix-reactive #

You can use just monix-reactive, the sub-project that exposes the Observable pattern.

// Targeting just the JVM
libraryDependencies += "io.monix" %% "monix-reactive" % "3.3.0"

// For Scala.js or cross-compiled projects
libraryDependencies += "io.monix" %%% "monix-reactive" % "3.3.0"

Depends on:

Sub-project: monix-tail #

You can use just monix-tail, the sub-project that exposes Iterant for pull based streaming.

// Targeting just the JVM
libraryDependencies += "io.monix" %% "monix-tail" % "3.3.0"

// For Scala.js or cross-compiled projects
libraryDependencies += "io.monix" %%% "monix-tail" % "3.3.0"

Depends on: