-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
executable file
·124 lines (108 loc) · 2.91 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
113
114
115
116
117
118
119
120
121
122
123
124
import org.jetbrains.kotlin.config.LanguageFeature
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath(Libs.SqlDelight)
}
}
plugins {
application
kotlin(Plugins.Kotlin) version Versions.Kotlin
id(Plugins.SqlDelight) version Versions.SqlDelight
id(Plugins.KtLint) version Versions.KtLintGradle
id(Plugins.Shadow) version Versions.Shadow
}
sqldelight {
database(Database.Name) {
packageName = Database.Package
}
}
group = App.Group
version = App.Version
ktlint {
version.set(Versions.KtLint)
coloredOutput.set(true)
disabledRules.set(mutableListOf("no-wildcard-imports"))
filter {
exclude("**/generated/**")
exclude { element -> element.file.path.contains("generated/") }
include("**/kotlin/**")
}
}
application {
mainClassName = App.MainClassName
}
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven { url = uri("https://kotlin.bintray.com/ktor") }
google()
}
dependencies {
implementation(Libs.Ktor.Engine)
implementation(Libs.Ktor.LogBack)
implementation(Libs.Ktor.Core)
implementation(Libs.Ktor.Host)
implementation(Libs.Ktor.Auth)
implementation(Libs.Ktor.AuthJwt)
implementation(Libs.Ktor.Jackson)
implementation(Libs.Ktor.Locations)
implementation(Libs.SqlDelightDriver)
implementation(Libs.Koin)
implementation(Libs.Cloudinary)
implementation(Libs.Stripe)
testImplementation(Libs.Test.Ktor)
testImplementation(Libs.Test.SqlDelightDriver)
testImplementation(Libs.Test.Koin)
testImplementation(Libs.Test.Mockk)
testImplementation(Libs.Test.Kotest.Runner)
testImplementation(Libs.Test.Kotest.Property)
testImplementation(Libs.Test.Kotest.Assertions)
testImplementation(Libs.Test.Kotest.KtorAssertions)
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlin {
target {
compilations.configureEach {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}
}
sourceSets {
all {
languageSettings.enableLanguageFeature(LanguageFeature.AllowResultInReturnType.toString())
languageSettings.enableLanguageFeature(LanguageFeature.InlineClasses.toString())
}
}
}
tasks {
test {
useJUnitPlatform()
}
register("stage") {
dependsOn("shadowJar", "clean", "")
mustRunAfter("clean")
}
jar {
manifest {
attributes(
mapOf(
"Main-Class" to application.mainClassName
)
)
}
}
}
kotlin.sourceSets["main"].kotlin.srcDirs("src")
kotlin.sourceSets["test"].kotlin.srcDirs("test")
sourceSets["main"].resources.srcDirs("resources")
sourceSets["test"].resources.srcDirs("testresources")