-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
89 lines (76 loc) · 2.18 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jooq.meta.jaxb.Logging
plugins {
kotlin("jvm") version "1.8.10"
id("nu.studer.jooq") version "8.1"
application
}
group = "dev.limelier"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
}
dependencies {
// discord
implementation("dev.kord:kord-core:0.8.0-M16")
// db
jooqGenerator("org.postgresql:postgresql:42.5.4")
implementation("org.postgresql:postgresql:42.5.4")
// logging
implementation("io.github.microutils:kotlin-logging-jvm:3.0.5")
implementation("org.slf4j:slf4j-simple:2.0.5")
// kotlin
testImplementation(kotlin("test"))
}
jooq {
version.set("3.18.0")
configurations {
create("main") {
jooqConfiguration.apply {
logging = Logging.WARN
jdbc.apply {
driver = "org.postgresql.Driver"
url = "jdbc:postgresql://db:5432/when"
user = "postgres"
password = "postgres"
}
generator.apply {
name = "org.jooq.codegen.KotlinGenerator"
generateSchemaSourceOnCompilation.set(false)
database.apply {
name = "org.jooq.meta.postgres.PostgresDatabase"
inputSchema = "public"
}
target.apply {
packageName = "dev.limelier"
directory = "src/generated/jooq"
}
strategy.name = "org.jooq.codegen.DefaultGeneratorStrategy"
}
}
}
}
}
tasks {
test {
useJUnitPlatform()
}
withType<KotlinCompile> {
kotlinOptions.jvmTarget = "19"
}
withType<JavaCompile> {
targetCompatibility = "19"
}
withType<Jar> {
manifest {
attributes["Main-Class"] = "MainKt"
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
configurations.compileClasspath.get().forEach {
from(if (it.isDirectory) it else zipTree(it))
}
}
}
application {
mainClass.set("MainKt")
}