build.gradle 2.49 KB
Newer Older
Jonas Waeber's avatar
Jonas Waeber committed
1
2
3
4
plugins {
    id 'application'
    id 'distribution'
    id 'org.jetbrains.kotlin.jvm' version '1.3.71'
Jonas Waeber's avatar
Jonas Waeber committed
5
    id "com.gitlab.morality.grit" version "2.0.2"
Jonas Waeber's avatar
Jonas Waeber committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
    id 'org.jlleitschuh.gradle.ktlint' version '9.2.1'
}

group 'org.memobase'
mainClassName = 'org.memobase.App'

jar {
    manifest {
        attributes 'Main-Class': 'org.memobase.App'
    }
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

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

ext {
29
    kafkaV = '2.7.0'
Jonas Waeber's avatar
Jonas Waeber committed
30
31
32
33
34
35
36
37
38
39
40
41
42
    log4jV = '2.11.2'
}

dependencies {
    // Logging Framework
    implementation "org.apache.logging.log4j:log4j-api:${log4jV}"
    implementation "org.apache.logging.log4j:log4j-core:${log4jV}"
    implementation "org.apache.logging.log4j:log4j-slf4j-impl:${log4jV}"

    // Kafka Imports
    implementation group: 'org.apache.kafka', name: 'kafka-clients', version: kafkaV
    implementation "org.apache.kafka:kafka-streams:${kafkaV}"

Jonas Waeber's avatar
Jonas Waeber committed
43
    implementation 'org.memobase:memobase-service-utilities:3.0.2'
Jonas Waeber's avatar
Jonas Waeber committed
44
45
    // CSV Reader
    implementation("com.github.doyaaaaaken:kotlin-csv-jvm:0.7.3")
46
47
    // XSLX / XSL Reader
    implementation 'org.apache.poi:poi:4.1.2'
Jonas Waeber's avatar
Jonas Waeber committed
48
    implementation 'org.apache.poi:poi-ooxml:4.1.2'
49
50
51
    // ODS Reader
    implementation 'org.odftoolkit:odftoolkit:1.0.0-BETA1'

Jonas Waeber's avatar
Jonas Waeber committed
52
    // JSON Parser
53
    implementation 'com.beust:klaxon:5.4'
Jonas Waeber's avatar
Jonas Waeber committed
54

Jonas Waeber's avatar
Jonas Waeber committed
55
56
57
    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"
Jonas Waeber's avatar
Jonas Waeber committed
58
59

    testCompile("org.junit.jupiter:junit-jupiter:5.4.2")
60
    testImplementation 'org.assertj:assertj-core:3.15.0'
Jonas Waeber's avatar
Jonas Waeber committed
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84

    // https://mvnrepository.com/artifact/org.apache.kafka/kafka-streams-test-utils
    testCompile group: 'org.apache.kafka', name: 'kafka-streams-test-utils', version: kafkaV
}

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"]
Jonas Waeber's avatar
Jonas Waeber committed
85
86
87
    test.kotlin.srcDirs += 'src/test/kotlin'
    test.resources.srcDirs = [ "src/test/resources" ]
    test.resources.includes = [ "**/*.yml", "**/*.xml"]
Jonas Waeber's avatar
Jonas Waeber committed
88
89
90
91
92
93
}

plugins.withType(DistributionPlugin) {
    distTar {
        archiveFileName = 'app.tar'
    }
Sebastian Schüpbach's avatar
Sebastian Schüpbach committed
94
}