apply plugin: 'scala'                                              // a

repositories {
  mavenCentral()
  maven {                                                          // b
    url 'http://oss.sonatype.org/content/repositories/releases'
  }
}

version = '0.1.0'

ScalaCompileOptions.metaClass.daemonServer = true                  // c
ScalaCompileOptions.metaClass.fork = true
ScalaCompileOptions.metaClass.useAnt = false
ScalaCompileOptions.metaClass.useCompileDaemon = false

// Use these dependencies to compile against Scala 2.12
dependencies {                                                     // d
  runtime "org.scala-lang:scala-compiler:2.12.7"
  compile 'org.scala-lang:scala-library:2.12.7'
  compile 'org.scalaz:scalaz-core_2.12:7.2.27'
  testCompile 'org.specs2:specs2_2.12:3.8.9'
  testCompile 'org.typelevel:scalaz-specs2_2.12:0.5.2'
}

// Use these dependencies to compile against Scala 2.11
//dependencies {
//  runtime "org.scala-lang:scala-compiler:2.11.4"
//  compile 'org.scala-lang:scala-library:2.11.4'
//  compile 'org.scalaz:scalaz-core_2.11:7.1.0'
//  testCompile 'org.specs2:specs2_2.11:2.4'
//  testCompile 'org.typelevel:scalaz-specs2_2.11:0.3.0'
//}

task repl(type:JavaExec) {                                         // d
  main = "scala.tools.nsc.MainGenericRunner"
  classpath = sourceSets.main.runtimeClasspath
  standardInput System.in
  args '-usejavacp'
}
