build.gradle 1.38 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
apply plugin: 'scala'
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'gradle-one-jar'

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.github.rholder:gradle-one-jar:1.0.3'
    }
}

repositories {
  mavenCentral()
  maven {
    (url("http://oss.sonatype.org/content/repositories/snapshots"))
    (url("http://oss.sonatype.org/content/repositories/releases"))
    (url("http://repo.typesafe.com/typesafe/releases/"))
  }

}

tasks.withType(ScalaCompile) {
  scalaCompileOptions.useAnt = false
}



dependencies {
  def akkaVersion = "2.3.9"

  compile(
          "org.scala-lang:scala-library:2.11.5",
          "com.typesafe.akka:akka-actor_2.11:${akkaVersion}",
          "com.typesafe.akka:akka-slf4j_2.11:${akkaVersion}",
          "com.typesafe.akka:akka-remote_2.11:${akkaVersion}",

          "ch.qos.logback:logback-core:1.1.2",
          "ch.qos.logback:logback-classic:1.1.2"
  )


  testCompile(
          "com.typesafe.akka:akka-testkit_2.11:${akkaVersion}",
          "org.scalatest:scalatest_2.11:2.2.5",
          "org.mockito:mockito-core:1.9.5"
  )
}

task run(type: JavaExec, dependsOn: classes) {
  main = 'no/nsd/akkapres/Remote'
  classpath sourceSets.main.runtimeClasspath
  classpath configurations.runtime
}

//jar.manifest.writeTo("$buildDir/mymanifest.mf")
task createJar(type: OneJar) {
    mainClass = 'no.nsd.remote.Remote'
}