apply plugin: 'java'
apply plugin: 'maven'

repositories {
    mavenCentral()
    maven {
        url "http://repo.typesafe.com/typesafe/releases/"
    }
}

dependencies {
    compile group: 'org.apache.lucene', name: 'lucene-core', version: '3.6.0'
    compile group: 'com.typesafe.akka', name: 'akka-actor_2.10', version: '2.2.1'
    compile group: 'org.slf4j', name: 'slf4j-api', version: '1.6.4'
    compile group: 'org.htmlparser', name: 'htmlparser', version: '1.6'
    compile group: 'org.perf4j', name: 'perf4j', version: '0.9.16'
    runtime group: 'org.slf4j', name: 'slf4j-simple', version: '1.6.4'
    testCompile group: 'junit', name: 'junit', version: '4.10'
}

task runSequential(type: JavaExec) {
    main = 'de.fhopf.akka.sequential.SequentialExecution'
    classpath = sourceSets.main.runtimeClasspath
}

task runActors(type: JavaExec) {
    main = 'de.fhopf.akka.actor.SimpleActorExecution'
    classpath = sourceSets.main.runtimeClasspath
}

task runParallelActors(type: JavaExec) {
    main = 'de.fhopf.akka.actor.parallel.FetchInParallelExecution'
    classpath = sourceSets.main.runtimeClasspath
}

task runFailingActors(type: JavaExec) {
    main = 'de.fhopf.akka.actor.parallel.FailingExecution'
    classpath = sourceSets.main.runtimeClasspath
}

task runSupervisedActors(type: JavaExec) {
    main = 'de.fhopf.akka.actor.parallel.FetchSupervisedExecution'
    classpath = sourceSets.main.runtimeClasspath
}
