| layout | docs3x |
|---|---|
| title | Usage in SBT |
| description | Packages are published in Maven Central, cross-compiled for Scala 2.11, 2.12 and for Scala.js |
The packages are published on Maven Central, cross-compiled for Scala 2.12, 2.13 and 3.0, also cross-compiled to Scala.js 1.x:
- Current 3.x release:
{{ site.promoted.version3x }}([download source archive]({{ site.github.repo }}/archive/v{{ site.promoted.version3x }}.zip))
These install instructions are for Scala's SBT (see the setup instructions). Also see versioning scheme for backwards-compatibility guarantees.
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" % "{{ site.promoted.version3x }}"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" % "{{ site.promoted.version3x }}"Depends on:
- cats
- cats-effect
- jctools (shaded)
- reactive-streams-jvm
- monix-execution
- monix-catnap
- monix-eval
- monix-reactive
- monix-tail
You can use just monix-execution, the lower level primitives for dealing
with asynchronous execution, thus exposing
[Scheduler]({{ page.path | api_base_url }}monix/execution/Scheduler.html) and
[Cancelable]({{ page.path | api_base_url }}monix/execution/Cancelable.html).
// Targeting just the JVM
libraryDependencies += "io.monix" %% "monix-execution" % "{{ site.promoted.version3x }}"
// For Scala.js or cross-compiled projects
libraryDependencies += "io.monix" %%% "monix-execution" % "{{ site.promoted.version3x }}"Depends on:
- jctools (shaded)
- reactive-streams-jvm
- implicitbox
You can use just monix-catnap (see [API Docs]({{ page.path | api_base_url }}monix/catnap/index.html)), the high-level primitives building on top of Cats Effect.
// Targeting just the JVM
libraryDependencies += "io.monix" %% "monix-catnap" % "{{ site.promoted.version3x }}"
// For Scala.js or cross-compiled projects
libraryDependencies += "io.monix" %%% "monix-catnap" % "{{ site.promoted.version3x }}"Depends on:
You can use just monix-eval, the sub-project that exposes
[Task]({{ page.path | api_base_url }}monix/eval/Task$.html) and
[Coeval]({{ page.path | api_base_url }}monix/eval/Coeval$.html):
// Targeting just the JVM
libraryDependencies += "io.monix" %% "monix-eval" % "{{ site.promoted.version3x }}"
// For Scala.js or cross-compiled projects
libraryDependencies += "io.monix" %%% "monix-eval" % "{{ site.promoted.version3x }}"Depends on:
You can use just monix-reactive, the sub-project that exposes
the Observable pattern.
// Targeting just the JVM
libraryDependencies += "io.monix" %% "monix-reactive" % "{{ site.promoted.version3x }}"
// For Scala.js or cross-compiled projects
libraryDependencies += "io.monix" %%% "monix-reactive" % "{{ site.promoted.version3x }}"Depends on:
You can use just monix-tail, the sub-project that exposes
[Iterant]({{ page.path | api_base_url }}monix/tail/Iterant.html) for pull based
streaming.
// Targeting just the JVM
libraryDependencies += "io.monix" %% "monix-tail" % "{{ site.promoted.version3x }}"
// For Scala.js or cross-compiled projects
libraryDependencies += "io.monix" %%% "monix-tail" % "{{ site.promoted.version3x }}"Depends on: