Usage in SBT
For the latest version: see here!
The packages are published on Maven Central, cross-compiled for Scala 2.10, 2.11 and 2.12, also cross-compiled to Scala.js 0.6.x:
- Current 1.x release:
1.2
(download source archive) - Current 2.x release:
2.3.3
(download source archive)
These install instructions are for Scala’s SBT (see the setup instructions) and for Apache Maven build tools.
Everything in Monix Core #
The main monix
project contains everything in the Monix core.
Depends on:
To use with insert the dependency in your build.sbt
or Build.scala
:
// for the JVM
libraryDependencies += "io.monix" %% "monix" % "2.3.3"
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" % "2.3.3"
Sub-project: monix-types #
The monix-types
subproject is like a kernel exposing Monix’s
type-classes that are used for integration with
Cats or other libraries. For the moment
this means shims for types such as Monad
, MonadError
or Comonad
,
or Evaluable
, a type-class meant to abstract over both Task
or
Coeval
.
Usage:
// Targetting just the JVM
libraryDependencies += "io.monix" %% "monix-types" % "2.3.3"
// For Scala.js or cross-compiled projects
libraryDependencies += "io.monix" %%% "monix-types" % "2.3.3"
Sub-project: monix-execution #
You can use just monix-execution
, the lower level primitives for dealing
with asynchronous execution, thus exposing
Scheduler and
Cancelable:
// Targetting just the JVM
libraryDependencies += "io.monix" %% "monix-execution" % "2.3.3"
// For Scala.js or cross-compiled projects
libraryDependencies += "io.monix" %%% "monix-execution" % "2.3.3"
Sub-project: monix-eval #
You can use just monix-eval
, the sub-project that exposes
Task and
Coeval:
// Targetting just the JVM
libraryDependencies += "io.monix" %% "monix-eval" % "2.3.3"
// For Scala.js or cross-compiled projects
libraryDependencies += "io.monix" %%% "monix-eval" % "2.3.3"
Sub-project: monix-reactive #
You can use just monix-reactive
, the sub-project that exposes
the Observable pattern:
// Targetting just the JVM
libraryDependencies += "io.monix" %% "monix-reactive" % "2.3.3"
// For Scala.js or cross-compiled projects
libraryDependencies += "io.monix" %%% "monix-reactive" % "2.3.3"
Sub-project: monix-cats (Optional) #
The monix-cats
optional sub-projects is the integration
with the Cats library.
// Targetting just the JVM
libraryDependencies += "io.monix" %% "monix-cats" % "2.3.3"
// For Scala.js or cross-compiled projects
libraryDependencies += "io.monix" %%% "monix-cats" % "2.3.3"
Sub-project: monix-scalaz-72 (Optional) #
The monix-scalaz-72
optional sub-projects is the integration
with the Scalaz library.
// Targetting just the JVM
libraryDependencies += "io.monix" %% "monix-scalaz-72" % "2.3.3"
// For Scala.js or cross-compiled projects
libraryDependencies += "io.monix" %%% "monix-scalaz-72" % "2.3.3"