-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
83 lines (71 loc) · 3.29 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
val ktor_version: String by project
val kotlin_version: String by project
val logback_version: String by project
val postgres_version: String by project
val h2_version: String by project
val exposed_version: String by project
val koin_version: String by project
val hikaricp_version: String by project
plugins {
kotlin("jvm") version "1.9.23"
id("io.ktor.plugin") version "2.3.10"
id("org.jetbrains.kotlin.plugin.serialization") version "1.9.23"
}
group = "instau.ayush.com"
version = "0.0.1"
application {
mainClass.set("instau.ayush.com.ApplicationKt")
val isDevelopment: Boolean = project.ext.has("development")
applicationDefaultJvmArgs = listOf("-Dio.ktor.development=$isDevelopment")
}
repositories {
mavenCentral()
}
dependencies {
implementation("io.ktor:ktor-client-cio:2.0.0")
implementation("io.ktor:ktor-serialization-kotlinx-json:2.0.0")
implementation("io.ktor:ktor-client-content-negotiation:2.0.0")
implementation("io.ktor:ktor-server-cors:$ktor_version")
implementation("io.ktor:ktor-server-core-jvm")
implementation("io.ktor:ktor-serialization-kotlinx-json-jvm")
implementation("io.ktor:ktor-server-content-negotiation-jvm")
implementation("org.postgresql:postgresql:42.7.2")
implementation("com.h2database:h2:2.1.214")
implementation("org.jetbrains.exposed:exposed-core:0.41.1")
implementation("org.jetbrains.exposed:exposed-jdbc:0.41.1")
implementation("com.h2database:h2:2.1.214")
implementation("io.ktor:ktor-server-auth-jvm")
implementation("io.ktor:ktor-server-auth-jwt-jvm")
implementation("io.ktor:ktor-server-netty-jvm")
implementation("ch.qos.logback:logback-classic:$logback_version")
implementation("io.ktor:ktor-server-call-logging:$ktor_version")
testImplementation("io.ktor:ktor-server-tests-jvm")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version")
implementation("com.zaxxer:HikariCP:$hikaricp_version")
implementation("io.insert-koin:koin-ktor:$koin_version")
implementation("de.mkammerer.snowflake-id:snowflake-id:0.0.2")
implementation("org.jetbrains.exposed:exposed-java-time:$exposed_version")
implementation("io.ktor:ktor-server-websockets-jvm")
implementation("io.ktor:ktor-client-websockets:$ktor_version")
implementation("com.google.firebase:firebase-admin:9.3.0") {
exclude(group = "com.google.guava", module = "listenablefuture")
}
implementation("com.google.guava:guava:32.1.1-jre")
implementation("com.google.cloud:google-cloud-storage:2.2.0")
}
tasks.withType<org.gradle.jvm.tasks.Jar>() {
exclude("META-INF/BC1024KE.RSA", "META-INF/BC1024KE.SF", "META-INF/BC1024KE.DSA")
exclude("META-INF/BC2048KE.RSA", "META-INF/BC2048KE.SF", "META-INF/BC2048KE.DSA")
}
tasks.register<Jar>("fatJar") {
archiveClassifier.set("all")
from(configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) })
exclude("META-INF/*.RSA", "META-INF/*.SF", "META-INF/*.DSA")
manifest {
attributes["Main-Class"] = "instau.ayush.com.ApplicationKt"
}
from(*configurations.runtimeClasspath.get().filter { it.exists() }
.map { if (it.isDirectory) it else zipTree(it) }.toTypedArray())
with(tasks.getByName("jar") as CopySpec)
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}