This repository has been archived by the owner on Nov 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
110 lines (93 loc) · 2.91 KB
/
build.gradle
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
apply plugin: 'kotlin'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'idea'
group = 'se.zensum'
version = '1.0-SNAPSHOT'
description = 'description of project'
defaultTasks 'run'
buildscript {
ext.kotlin_version = '1.3.0'
ext.jvm_version = '1.8'
ext.junit_platform_version = '1.0.0-M4'
repositories {
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.junit.platform:junit-platform-gradle-plugin:$junit_platform_version"
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.0'
}
}
task run(type: JavaExec) {
main = 'franz.MainKt' //Important that 'Kt' is appended to class name
classpath = sourceSets.main.runtimeClasspath
}
apply plugin: "org.junit.platform.gradle.plugin"
apply plugin: 'com.github.johnrengelman.shadow'
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
compile 'org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.2.0'
compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.2.0'
compile 'io.github.microutils:kotlin-logging:1.4.6'
compile 'org.apache.kafka:kafka-clients:0.11.0.0'
runtime 'ch.qos.logback:logback-classic:1.2.3'
testCompile 'org.junit.jupiter:junit-jupiter-api:5.0.0-M4'
testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
testRuntime 'org.junit.jupiter:junit-jupiter-engine:5.0.0-M4'
}
junitPlatform {
platformVersion = junit_platform_version
}
jar {
manifest {
attributes 'Main-Class': "franz.MainKt"
}
}
shadowJar {
baseName = 'shadow'
classifier = null
version = null
}
repositories {
maven { url "https://dl.bintray.com/kotlin/ktor" }
maven { url "http://jcenter.bintray.com" }
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
sourceCompatibility = jvm_version
kotlinOptions {
jvmTarget = jvm_version
}
}
compileJava {
sourceCompatibility = jvm_version
targetCompatibility = jvm_version
options.incremental = true
options.encoding = 'UTF-8'
}
// Important: All classes containing test cases must match the
// the regex pattern "^.*Tests?$" to be picked up by the junit-gradle plugin.
sourceSets {
main.resources.srcDirs += 'src/main/resources'
main.kotlin.srcDirs += 'src/main/kotlin'
test.kotlin.srcDirs += 'src/test/kotlin'
main.java.srcDirs += 'src/main/java'
test.java.srcDirs += 'src/test/java'
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
task wrapper(type: Wrapper) {
description = 'Generates gradlew[.bat] scripts for faster execution'
gradleVersion = '4.2'
}