-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
93 lines (81 loc) · 3.13 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
val ktor_version: String by project
val kotlin_version: String by project
val logback_version: String by project
val shadow_version: String by project
plugins {
application
kotlin("jvm") version "1.7.21"
id("io.ktor.plugin") version "2.2.3"
id("nu.studer.jooq") version "7.1.1"
}
group = "com"
version = "0.0.1"
application {
mainClass.set("io.ktor.server.netty.EngineMain")
val isDevelopment: Boolean = project.ext.has("development")
applicationDefaultJvmArgs = listOf("-Dio.ktor.development=$isDevelopment")
}
ktor {
fatJar {
archiveFileName.set("fat.jar")
}
}
repositories {
mavenCentral()
}
dependencies {
implementation("io.ktor:ktor-server-core-jvm:$ktor_version")
implementation("io.ktor:ktor-server-content-negotiation-jvm:$ktor_version")
implementation("io.ktor:ktor-serialization-gson-jvm:$ktor_version")
implementation("io.ktor:ktor-server-netty-jvm:$ktor_version")
implementation("ch.qos.logback:logback-classic:$logback_version")
//dependencies related to database
implementation("mysql:mysql-connector-java:8.0.33")
implementation("org.jooq:jooq:3.18.0")
jooqGenerator("mysql:mysql-connector-java:8.0.30")
implementation("com.zaxxer:HikariCP:5.0.1")
implementation("org.mindrot:jbcrypt:0.4")
//dependencies related to expose and h2 database
implementation("org.jetbrains.exposed:exposed-core:0.41.1")
implementation("org.jetbrains.exposed:exposed-dao:0.41.1")
implementation("org.jetbrains.exposed:exposed-jdbc:0.41.1")
testImplementation("io.ktor:ktor-server-tests-jvm:$ktor_version")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version")
}
jooq {
version.set("3.16.10") // default (can be omitted)
configurations {
create("main") { // name of the jOOQ configuration
generateSchemaSourceOnCompilation.set(false) // default (can be omitted)
jooqConfiguration.apply {
//logging = Logging.WARN
jdbc.apply {
driver = "com.mysql.cj.jdbc.Driver"
url = "jdbc:mysql://localhost:3306?serverTimezone=Asia/Karachi"
user = "root"
password = ""
}
generator.apply {
name = "org.jooq.codegen.DefaultGenerator"
database.apply {
name = "org.jooq.meta.mysql.MySQLDatabase"
inputSchema = "animefleek_db"
includes = ".*"
isDateAsTimestamp = false
}
generate.apply {
isDaos = true
isPojos = true
isRelations = true
isPojosEqualsAndHashCode = true
}
target.apply {
packageName = "com"
//directory = "build/generated-src/jooq/main" // default (can be omitted)
}
strategy.name = "org.jooq.codegen.DefaultGeneratorStrategy"
}
}
}
}
}