The hazelcast-scala API is based on Scala 2.11 and Hazelcast 3.6/3.7/3.8, but does not define them as hard dependencies (since it works with both open-source and enterprise Hazelcast), so make sure to also include the relevant Hazelcast dependencies.
Add this to your build.gradle
file:
repositories {
jcenter()
}
dependencies {
compile "org.scala-lang:scala-reflect:2.11.+"
compile "com.hazelcast:hazelcast:3.7.+" // Or :hazelcast-enterprise:
compile "com.hazelcast:hazelcast-scala_2.11:3.7.+"
}
Add this to your project's build.sbt
:
resolvers += Resolver.jcenterRepo
libraryDependencies += "com.hazelcast" %% "hazelcast-scala" % "latest-integration" withSources()
import com.hazelcast.config._
import com.hazelcast.Scala._
val conf = new Config
serialization.Defaults.register(conf.getSerializationConfig)
val hz = conf.newInstance()
See the Wiki and unit tests for examples of how to use this library.