forked from initialcapacity/kotlin-ktor-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
63 lines (50 loc) · 1.71 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
buildscript {
ext.kotlin_version = '1.6.21'
ext.ktor_version = '1.6.8'
ext.mockk_version = '1.10.6'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
plugins {
id "org.jetbrains.kotlin.jvm" version "1.6.21" apply false
}
subprojects {
if (name == "applications" || name == "components") return
group "io.collective"
apply plugin: 'kotlin'
defaultTasks "clean", "build"
repositories {
mavenCentral()
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "io.ktor:ktor-server-core:$ktor_version"
implementation "io.ktor:ktor-server-netty:$ktor_version"
implementation "io.ktor:ktor-html-builder:$ktor_version"
implementation "ch.qos.logback:logback-classic:1.2.3"
testImplementation "io.ktor:ktor-server-test-host:$ktor_version"
testImplementation group: 'junit', name: 'junit', version: '4.12'
testImplementation "io.mockk:mockk:$mockk_version"
testImplementation "org.awaitility:awaitility:4.0.3"
testImplementation("org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version")
}
sourceSets {
main.kotlin.srcDir "src/main/kotlin"
main.resources.srcDir "src/main/resources"
test.kotlin.srcDir "src/test/kotlin"
test.resources.srcDir "src/test/resources"
}
// needed for heroku
task stage(dependsOn: ['build', 'clean'])
build { mustRunAfter "clean" }
gradle.taskGraph.whenReady {
taskGraph ->
if (taskGraph.hasTask(stage)) {
test.enabled = false
}
}
}