-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
108 lines (86 loc) · 2.46 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
val javaVersion = JavaVersion.VERSION_17
val kotlin_version: String by project
val logback_version: String by project
val exposed_sql_version: String by project
val postgres_test_container_version: String by project
version = "0.1"
group = "com.example"
plugins {
kotlin("jvm") version "1.9.22"
kotlin("kapt") version "1.9.22"
kotlin("plugin.allopen") version "1.9.22"
id("com.github.johnrengelman.shadow") version "8.1.1"
id("io.micronaut.application") version "4.3.1"
id("io.micronaut.aot") version "4.3.1"
}
repositories {
mavenCentral()
}
dependencies {
// DI
kapt("io.micronaut:micronaut-inject")
// micronaut basics
kapt("io.micronaut:micronaut-http-validation")
implementation("io.micronaut:micronaut-http-client")
implementation("io.micronaut.kotlin:micronaut-kotlin-runtime")
// database - SQL
implementation("io.micronaut.flyway:micronaut-flyway")
runtimeOnly("org.flywaydb:flyway-database-postgresql")
implementation("io.micronaut.sql:micronaut-jdbc-hikari")
implementation("org.postgresql:postgresql")
runtimeOnly("org.jetbrains.exposed:exposed-jdbc:$exposed_sql_version")
implementation("org.jetbrains.exposed:exposed-dao:$exposed_sql_version")
implementation("org.jetbrains.exposed:exposed-core:$exposed_sql_version")
// serialization
implementation("io.micronaut:micronaut-jackson-databind")
runtimeOnly("com.fasterxml.jackson.module:jackson-module-kotlin")
// documentation
kapt("io.micronaut.openapi:micronaut-openapi")
implementation("io.swagger.core.v3:swagger-annotations")
implementation("io.micronaut.views:micronaut-views-thymeleaf")
// logging
implementation("ch.qos.logback:logback-classic")
// testing
testImplementation("org.testcontainers:postgresql:$postgres_test_container_version")
}
application {
mainClass.set("com.example.Application")
}
java {
sourceCompatibility = javaVersion
}
kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
tasks {
compileKotlin {
kotlinOptions {
jvmTarget = javaVersion.toString()
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = javaVersion.toString()
}
}
}
graalvmNative.toolchainDetection.set(false)
micronaut {
runtime("netty")
testRuntime("kotest5")
processing {
incremental(true)
annotations("com.example.*")
}
aot {
optimizeServiceLoading.set(false)
convertYamlToJava.set(false)
precomputeOperations.set(true)
cacheEnvironment.set(true)
optimizeClassLoading.set(true)
deduceEnvironment.set(true)
optimizeNetty.set(true)
}
}