-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
112 lines (102 loc) · 3.58 KB
/
build.gradle.kts
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
111
112
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
application
kotlin("jvm") version Versions.kotlin
id("org.jetbrains.kotlin.plugin.serialization") version Versions.kotlin
id("io.ktor.plugin") version Versions.ktor
}
group = ConfigData.baseGroup
version = ConfigData.version
application {
mainClass.set("io.ktor.server.netty.EngineMain")
applicationDefaultJvmArgs = listOf("-Dio.ktor.development=${ConfigData.isDebug}")
}
repositories {
mavenCentral()
maven { url = uri("https://maven.pkg.jetbrains.space/public/p/ktor/eap") }
}
allprojects {
apply(plugin = "org.jetbrains.kotlin.jvm")
repositories {
mavenCentral()
maven { url = uri("https://maven.pkg.jetbrains.space/public/p/ktor/eap") }
}
tasks.withType(KotlinCompile::class.java).all {
kotlinOptions.freeCompilerArgs = listOf(
"-Xuse-experimental=io.ktor.locations.KtorExperimentalLocationsAPI",
"-opt-in=kotlin.RequiresOptIn"
) + kotlinOptions.freeCompilerArgs
}
dependencies {
implementation(kotlin("stdlib"))
implementation(Deps.Kotlin.dateTime)
if (!name.contains("logs")) {
implementation(project(Deps.Utils.logs))
}
if (name.contains("api")) {
implementation(Deps.Ktor.core)
implementation(Deps.Koin.main)
implementation(project(Deps.Utils.routing))
implementation(Deps.Ktor.auth)
}
if (name.contains("presenters")) {
implementation(Deps.Koin.main)
implementation(project(Deps.Utils.main))
}
if (name.contains("backend")) {
implementation(project(Deps.Sources.main))
implementation(Deps.Koin.main)
}
testImplementation(kotlin("test"))
}
tasks.test {
useJUnitPlatform()
}
}
dependencies {
implementation(project(Deps.Assignment.main))
implementation(project(Deps.Assignment.presenters))
implementation(project(Deps.Assignment.api))
implementation(project(Deps.Courses.main))
implementation(project(Deps.Courses.api))
implementation(project(Deps.Courses.presenters))
implementation(project(Deps.Languages.main))
implementation(project(Deps.Languages.api))
implementation(project(Deps.Languages.presenters))
implementation(project(Deps.Sources.main))
implementation(project(Deps.Db.main))
implementation(project(Deps.Models.main))
implementation(project(Deps.Users.api))
implementation(project(Deps.Users.main))
implementation(project(Deps.Users.presenters))
implementation(project(Deps.Utils.routing))
implementation(project(Deps.Utils.authenticator))
implementation(Deps.Ktor.auth)
implementation(Deps.Koin.main)
implementation(Deps.Koin.logger)
implementation(Deps.Ktor.callLogging)
implementation(Deps.Ktor.core)
implementation(Deps.Ktor.headers)
implementation(Deps.Ktor.sessions)
implementation(Deps.Exposed.core)
implementation(Deps.Ktor.jwt)
implementation(Deps.Ktor.statusPages)
implementation(Deps.Ktor.contentNegotiation)
implementation(Deps.Ktor.json)
implementation(Deps.Ktor.netty)
implementation(Deps.Ktor.freeMarker)
implementation(Deps.Logback.main)
implementation(project(Deps.Utils.main))
implementation(project(Deps.Utils.serialization))
}
tasks.withType<Test>().configureEach {
useJUnitPlatform()
}
val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
jvmTarget = "1.8"
}
val compileTestKotlin: KotlinCompile by tasks
compileTestKotlin.kotlinOptions {
jvmTarget = "1.8"
}