Add a note to the readme about the need for unit test coverage
[sig-chat-ex-feb-2019.git] / build.gradle.kts
blob8d9117b805f5f9c8c0bf9b4d06928f889645ce00
1 /*
2  * This file was generated by the Gradle 'init' task.
3  *
4  * This generated file contains a sample Java Library project to get you started.
5  * For more details take a look at the Java Libraries chapter in the Gradle
6  * User Manual available at https://docs.gradle.org/5.2.1/userguide/java_library_plugin.html
7  */
9 plugins {
10     // Apply the java-library plugin to add support for Java Library
11     `java-library`
12     `eclipse`
13     `application`
14     id("com.github.johnrengelman.shadow") version "5.0.0"
17 repositories {
18     // Use jcenter for resolving your dependencies.
19     // You can declare any Maven/Ivy/file repository here.
20     jcenter()
23 sourceSets {
24     create("integrationTest") {
25             java.srcDir("src/integrationTest/java")
26             resources.srcDir("src/integrationTest/resources")
27             compileClasspath += sourceSets["main"].output + configurations["testRuntimeClasspath"]
28             runtimeClasspath += output + compileClasspath + sourceSets["test"].runtimeClasspath
29     }
32 tasks {
33    "javadoc"(Javadoc::class) {
34         dependsOn("compileJava")
35         classpath = sourceSets["main"].compileClasspath
36         source = sourceSets["main"].allJava
37     }
39 tasks.named("classes") { dependsOn("javadoc") }
41 task<Test>("integrationTest") {
42     description = "Runs the integration tests"
43     group = "verification"
44     testClassesDirs = sourceSets["integrationTest"].output.classesDirs
45     classpath = sourceSets["integrationTest"].runtimeClasspath
46     mustRunAfter(tasks["test"])
49 dependencies {
50     // This dependency is used internally, and not exposed to consumers on their own compile classpath.
51     implementation("com.google.guava:guava:27.0.1-jre")
52     implementation("com.fasterxml.jackson.core:jackson-annotations:2.9.8")
53     implementation("com.fasterxml.jackson.core:jackson-core:2.9.8")
54     implementation("com.fasterxml.jackson.core:jackson-databind:2.9.8")
55     implementation("javax.annotation:javax.annotation-api:1.3.2")
56     implementation("org.apache.logging.log4j:log4j-api:2.11.2")
57     implementation("org.apache.logging.log4j:log4j-core:2.11.2")
58     implementation("org.mapdb:mapdb:3.0.7")
59     implementation("org.reflections:reflections:0.9.11")
60     implementation("info.picocli:picocli:3.9.5")
62     // Use JUnit test framework
63     testImplementation("junit:junit:4.12")
65     testImplementation(files("libs/message-tools.jar"))
68 application {
69     mainClassName = "exercise.nio.chat.server.Server"