build.gradle 2.07 KB
Newer Older
Jonas Waeber's avatar
Jonas Waeber committed
1
2
3
4
5
plugins {
    id 'application'
    id 'distribution'
    id 'org.jetbrains.kotlin.jvm' version '1.3.71'
    id 'com.gitlab.morality.grit' version '2.0.2'
6
    id 'org.jlleitschuh.gradle.ktlint' version '9.2.1'
Jonas Waeber's avatar
Jonas Waeber committed
7
8
}

9
group 'org.memobase'
Jonas Waeber's avatar
Jonas Waeber committed
10
mainClassName = 'ch.memobase.App'
Jonas Waeber's avatar
Jonas Waeber committed
11
12
13

jar {
    manifest {
Jonas Waeber's avatar
Jonas Waeber committed
14
        attributes 'Main-Class': 'ch.memobase.App'
Jonas Waeber's avatar
Jonas Waeber committed
15
16
17
18
19
20
21
    }
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
Jonas Waeber's avatar
Jonas Waeber committed
22
    mavenCentral()
Jonas Waeber's avatar
Jonas Waeber committed
23
    maven {
Jonas Waeber's avatar
Jonas Waeber committed
24
        url  "https://gitlab.switch.ch/api/v4/projects/1324/packages/maven"
Jonas Waeber's avatar
Jonas Waeber committed
25
26
27
28
    }
}

ext {
Jonas Waeber's avatar
Jonas Waeber committed
29
    kafkaV = '2.7.0'
Jonas Waeber's avatar
Jonas Waeber committed
30
    log4jV = '2.16.0'
Jonas Waeber's avatar
Jonas Waeber committed
31
32
33
}

dependencies {
34
    implementation 'org.memobase:memobase-service-utilities:3.1.1'
Jonas Waeber's avatar
Jonas Waeber committed
35
36
37
38
    // Logging Framework
    implementation "org.apache.logging.log4j:log4j-core:${log4jV}"

    // Kafka Imports
39
40
41
    //implementation group: 'org.apache.kafka', name: 'kafka-clients', version: kafkaV
    implementation "org.apache.kafka:kafka-streams:${kafkaV}"
    // JSON Parser
Jonas Waeber's avatar
Jonas Waeber committed
42
    implementation 'com.beust:klaxon:5.5'
Jonas Waeber's avatar
Jonas Waeber committed
43
44
45
46
47
48
49

    implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
    implementation "org.jetbrains.kotlin:kotlin-script-runtime:1.3.71"
    implementation "org.jetbrains.kotlin:kotlin-reflect:1.3.71"

    testCompile("org.junit.jupiter:junit-jupiter:5.4.2")
    testImplementation 'org.assertj:assertj-core:3.15.0'
50
51
52

    // https://mvnrepository.com/artifact/org.apache.kafka/kafka-streams-test-utils
    testCompile group: 'org.apache.kafka', name: 'kafka-streams-test-utils', version: kafkaV
Jonas Waeber's avatar
Jonas Waeber committed
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
}

compileKotlin {
    kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
    kotlinOptions.jvmTarget = "1.8"
}


test {
    useJUnitPlatform()
    testLogging {
        events "passed", "skipped", "failed"
    }
}

sourceSets {
    main.kotlin.srcDirs += 'src/main/kotlin'
    main.resources.srcDirs = [ "src/main/resources" ]
    main.resources.includes = [ "**/*.yml", "**/*.xml"]
    test.kotlin.srcDirs += 'src/test/kotlin'
    test.resources.srcDirs = [ "src/test/resources" ]
    test.resources.includes = [ "**/*.yml", "**/*.xml"]
}

plugins.withType(DistributionPlugin) {
    distTar {
        archiveFileName = 'app.tar'
    }
83
}