Scala Coroutines are released since Scala 2.11. To start using them, you will need to add the official JAR to your project dependencies. Here we assume that you are using SBT, otherwise you can follow the guidelines on Maven.

Maven Artifact

SBT

Stable versions are released on Sonatype and Maven. You can add Scala Coroutines by adding the following to your project definition:

libraryDependencies ++= Seq(
  "com.storm-enroute" %% "coroutines" % "0.4")

Snapshot versions are released regularly on Sonatype:

resolvers ++= Seq(
  "Sonatype OSS Snapshots" at
    "https://oss.sonatype.org/content/repositories/snapshots",
  "Sonatype OSS Releases" at
    "https://oss.sonatype.org/content/repositories/releases"
)
libraryDependencies ++= Seq(
  "com.storm-enroute" %% "coroutines" % "0.5-SNAPSHOT")

To use coroutines in the code, import the org.coroutines package, and you’re all set:

import org.coroutines._

In case you have the dependencies configured, you can proceed immediately to the next section.