Search code examples
scalaintellij-ideaakkaactor

Scala in IDEA: Do I have to add Akka explicitly?


I started off with a IDEA Java project, packed by Gradle (plugin: 'java').

Later on I applied plugin: 'scala' and added compile 'org.scala-lang:scala-library:2.11.1' as dependency.

Now I would like to use Akka, and to my understanding it should be shipped with Scala automatically but I cannot import any Akka class.

I just checked the distribution from akka.io and realized that there Akka is shipped with Scala and not the other way round.

Am I doing anything wrong? Were my assumptions (basically: Akka is an integral part of Scala and shipped along automatically) or do I have to add Akka manually to my project?


Solution

  • No, Akka is a separate library. Not part of Scala.

    It's on Maven Central under the group com.typesafe.akka. The core artifact is akka-actor. (search.maven.org)

    I've never used Akka with Java, but the docs seem to suggest that any of the Scala builds will work for Java as well.