-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
131 lines (111 loc) · 5.34 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
125
126
127
128
129
130
131
plugins {
kotlin("multiplatform") version "1.9.0"
id("org.jetbrains.kotlin.plugin.serialization") version "1.9.10"
application
}
group = "com.hacktopiealgoridom.postgresql.fullstack"
version = "0.1-SNAPSHOT"
repositories {
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven")
}
kotlin {
jvm {
val jvmVersion: String by project
jvmToolchain(Integer.parseInt(jvmVersion))
withJava()
testRuns.named("test") {
executionTask.configure {
useJUnitPlatform()
}
}
}
js {
binaries.executable()
browser {
commonWebpackConfig {
cssSupport {
enabled.set(true)
}
}
}
}
sourceSets {
val commonMain by getting
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
// testImplementation("io.ktor:ktor-server-tests-jvm:$ktorVersion")
// testImplementation("org.jetbrains.kotlin:kotlin-test-junit:$kotlinVersion")
}
}
val jvmMain by getting {
val exposedVersion: String by project
val ktorVersion: String by project
val kotlinxVersion: String by project
val postgresqlVersion: String by project
val hikariVersion: String by project
val log4jVersion: String by project
val swaggerCodegenVersion: String by project
dependencies {
implementation("io.ktor:ktor-server-netty:$ktorVersion")
implementation("io.ktor:ktor-server-html-builder-jvm:$ktorVersion")
implementation("io.ktor:ktor-server-core:$ktorVersion")
// implementation("io.ktor:ktor-jackson:$ktorVersion")
// implementation("io.ktor:ktor-features:$ktorVersion")
implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:$kotlinxVersion")
implementation("org.postgresql:postgresql:$postgresqlVersion")
implementation ("com.zaxxer:HikariCP:$hikariVersion")
implementation ("org.jetbrains.exposed:exposed-core:$exposedVersion")
implementation ("org.jetbrains.exposed:exposed-crypt:$exposedVersion")
implementation ("org.jetbrains.exposed:exposed-dao:$exposedVersion")
implementation ("org.jetbrains.exposed:exposed-jdbc:$exposedVersion")
// implementation ("org.jetbrains.exposed:exposed-jodatime:$exposedVersion")
// implementation ("org.jetbrains.exposed:exposed-java-time:$exposedVersion")
implementation ("org.jetbrains.exposed:exposed-kotlin-datetime:$exposedVersion")
implementation ("org.jetbrains.exposed:exposed-json:$exposedVersion")
// implementation ("org.jetbrains.exposed:exposed-money:$exposedVersion")
implementation("io.ktor:ktor-server-core-jvm:$ktorVersion")
implementation("io.ktor:ktor-serialization-kotlinx-json-jvm:$ktorVersion")
implementation("io.ktor:ktor-server-content-negotiation-jvm:$ktorVersion")
implementation("org.jetbrains.exposed:exposed-core:$exposedVersion")
implementation("org.jetbrains.exposed:exposed-jdbc:$exposedVersion")
implementation("io.ktor:ktor-server-netty-jvm:$ktorVersion")
implementation("io.ktor:ktor-server-config-yaml:$ktorVersion")
implementation("org.apache.logging.log4j:log4j-core:$log4jVersion")
implementation("org.apache.logging.log4j:log4j-slf4j-impl:$log4jVersion")
implementation("io.swagger.codegen.v3:swagger-codegen-generators:$swaggerCodegenVersion")
implementation("io.ktor:ktor-server-swagger:$ktorVersion")
implementation("io.ktor:ktor-server-openapi:$ktorVersion")
implementation("io.ktor:ktor-server-cors:$ktorVersion")
}
}
val jvmTest by getting
val jsMain by getting {
dependencies {
implementation("org.jetbrains.kotlin-wrappers:kotlin-react:18.2.0-pre.346")
implementation("org.jetbrains.kotlin-wrappers:kotlin-react-dom:18.2.0-pre.346")
implementation("org.jetbrains.kotlin-wrappers:kotlin-emotion:11.9.3-pre.346")
implementation("org.jetbrains.kotlin-wrappers:kotlin-react-router-dom:6.3.0-pre.346")
implementation("org.jetbrains.kotlin-wrappers:kotlin-redux:4.1.2-pre.346")
implementation("org.jetbrains.kotlin-wrappers:kotlin-react-redux:7.2.6-pre.346")
implementation(npm("react-quill", "1.3.5"))
implementation(npm("axios", "0.21.1"))
}
}
val jsTest by getting
}
}
application {
mainClass.set("com.hacktopiealgoridom.postgresql.fullstack.application.ServerKt")
val isDevelopment: Boolean = project.ext.has("development")
applicationDefaultJvmArgs = listOf("-Dio.ktor.development=$isDevelopment")
}
tasks.named<Copy>("jvmProcessResources") {
val jsBrowserDistribution = tasks.named("jsBrowserDistribution")
from(jsBrowserDistribution)
}
tasks.named<JavaExec>("run") {
dependsOn(tasks.named<Jar>("jvmJar"))
classpath(tasks.named<Jar>("jvmJar"))
}