This repository has been archived by the owner on Jan 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
80 lines (67 loc) Β· 2.3 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
plugins {
kotlin("multiplatform") version "1.6.21"
kotlin("plugin.serialization") version "1.6.21"
id("com.github.johnrengelman.shadow") version "7.1.2"
}
repositories {
mavenCentral()
}
kotlin {
jvm {
compilations.all {
kotlinOptions.jvmTarget = JavaVersion.VERSION_17.toString()
}
}
sourceSets {
named("jvmMain") {
dependencies {
implementation("blue.starry:penicillin:6.2.3")
implementation("io.github.microutils:kotlin-logging:2.1.23")
implementation("io.ktor:ktor-server-cio:1.6.8")
implementation("io.ktor:ktor-locations:1.6.8")
implementation("io.ktor:ktor-serialization:1.6.8")
implementation("io.ktor:ktor-client-cio:1.6.8")
implementation("io.ktor:ktor-client-serialization:1.6.8")
implementation("io.ktor:ktor-client-logging:1.6.8")
implementation("org.litote.kmongo:kmongo-coroutine-serialization:4.4.0")
implementation("org.litote.kmongo:kmongo-id-serialization:4.4.0")
implementation("org.jsoup:jsoup:1.17.2")
implementation("com.squareup:gifencoder:0.10.1")
implementation("ch.qos.logback:logback-classic:1.4.14")
}
}
named("jvmTest") {
dependencies {
implementation(kotlin("test"))
}
}
}
targets.all {
compilations.all {
kotlinOptions {
apiVersion = "1.6"
languageVersion = "1.6"
verbose = true
}
}
}
sourceSets.all {
languageSettings {
progressiveMode = true
optIn("kotlin.RequiresOptIn")
}
}
}
// workaround for Kotlin/Multiplatform + Shadow issue
// Refer https://github.com/johnrengelman/shadow/issues/484#issuecomment-549137315.
task<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar>("shadowJar") {
group = "shadow"
dependsOn("jvmJar")
manifest {
attributes("Main-Class" to "blue.starry.stella.MainKt")
}
archiveClassifier.set("all")
val jvmMain = kotlin.jvm().compilations.getByName("main")
from(jvmMain.output)
configurations.add(jvmMain.runtimeDependencyFiles)
}