|
1 | 1 | plugins { |
2 | | - kotlin("jvm") version "1.9.22" |
3 | | - kotlin("plugin.serialization") version "1.9.22" |
| 2 | + alias(libs.plugins.kotlin.jvm) |
| 3 | + alias(libs.plugins.kotlin.serialization) |
4 | 4 | application |
5 | | - id("pl.allegro.tech.build.axion-release") version "1.18.18" |
6 | | - id("com.google.cloud.tools.jib") version "3.4.1" |
7 | | - id("org.jlleitschuh.gradle.ktlint") version "14.2.0" |
8 | | - id("io.gitlab.arturbosch.detekt") version "1.23.8" |
| 5 | + alias(libs.plugins.axion.release) |
| 6 | + alias(libs.plugins.jib) |
| 7 | + alias(libs.plugins.ktlint) |
| 8 | + alias(libs.plugins.detekt) |
9 | 9 | } |
10 | 10 |
|
11 | 11 | group = "io.sdkman" |
@@ -49,53 +49,47 @@ repositories { |
49 | 49 | maven("https://jitpack.io") |
50 | 50 | } |
51 | 51 |
|
52 | | -// Define versions for dependencies to ensure compatibility |
53 | | -val kotestVersion = "5.8.0" |
54 | | -val ktorVersion = "2.3.7" |
55 | | -val arrowVersion = "1.2.1" |
56 | | -val exposedVersion = "0.61.0" |
57 | | - |
58 | 52 | dependencies { |
59 | 53 | // Arrow for functional programming |
60 | | - implementation("io.arrow-kt:arrow-core:$arrowVersion") |
| 54 | + implementation(libs.arrow.core) |
61 | 55 |
|
62 | 56 | // Ktor server |
63 | | - implementation("io.ktor:ktor-server-core:$ktorVersion") |
64 | | - implementation("io.ktor:ktor-server-netty:$ktorVersion") |
65 | | - implementation("io.ktor:ktor-server-content-negotiation:$ktorVersion") |
66 | | - implementation("io.ktor:ktor-serialization-kotlinx-json:$ktorVersion") |
67 | | - implementation("org.mongodb:mongo-java-driver:3.12.14") |
68 | | - implementation("org.postgresql:postgresql:42.7.7") |
69 | | - implementation("com.zaxxer:HikariCP:5.1.0") |
70 | | - implementation("com.typesafe:config:1.4.3") |
71 | | - implementation("ch.qos.logback:logback-classic:1.4.14") |
| 57 | + implementation(libs.ktor.server.core) |
| 58 | + implementation(libs.ktor.server.netty) |
| 59 | + implementation(libs.ktor.server.content.negotiation) |
| 60 | + implementation(libs.ktor.serialization.kotlinx.json) |
| 61 | + implementation(libs.mongo.java.driver) |
| 62 | + implementation(libs.postgresql) |
| 63 | + implementation(libs.hikaricp) |
| 64 | + implementation(libs.typesafe.config) |
| 65 | + implementation(libs.logback.classic) |
72 | 66 |
|
73 | 67 | // Exposed ORM |
74 | | - implementation("org.jetbrains.exposed:exposed-core:$exposedVersion") { |
| 68 | + implementation(libs.exposed.core) { |
75 | 69 | exclude(group = "org.jetbrains.kotlinx", module = "kotlinx-coroutines-core") |
76 | 70 | } |
77 | | - implementation("org.jetbrains.exposed:exposed-jdbc:$exposedVersion") { |
| 71 | + implementation(libs.exposed.jdbc) { |
78 | 72 | exclude(group = "org.jetbrains.kotlinx", module = "kotlinx-coroutines-core") |
79 | 73 | } |
80 | | - implementation("org.jetbrains.exposed:exposed-kotlin-datetime:$exposedVersion") { |
| 74 | + implementation(libs.exposed.kotlin.datetime) { |
81 | 75 | exclude(group = "org.jetbrains.kotlinx", module = "kotlinx-coroutines-core") |
82 | 76 | } |
83 | 77 |
|
84 | 78 | // Testing |
85 | | - testImplementation("io.kotest:kotest-runner-junit5:$kotestVersion") |
86 | | - testImplementation("io.kotest:kotest-assertions-core:$kotestVersion") |
87 | | - testImplementation("io.arrow-kt:arrow-core:$arrowVersion") |
88 | | - testImplementation("io.ktor:ktor-server-test-host:$ktorVersion") |
89 | | - testImplementation("io.ktor:ktor-client-okhttp:$ktorVersion") |
90 | | - testImplementation("org.testcontainers:mongodb:1.19.3") |
91 | | - testImplementation("org.testcontainers:postgresql:1.19.3") |
92 | | - testImplementation("io.kotest.extensions:kotest-extensions-testcontainers:2.0.2") |
93 | | - testImplementation("io.mockk:mockk:1.13.9") |
94 | | - testImplementation("org.flywaydb:flyway-core:11.10.2") |
95 | | - testImplementation("org.flywaydb:flyway-database-postgresql:11.10.2") |
96 | | - |
97 | | - detektPlugins("com.github.marc0der:detekt-rules:1.0.1") |
98 | | - compileOnly("com.github.marc0der:detekt-rules:1.0.1") |
| 79 | + testImplementation(libs.kotest.runner.junit5) |
| 80 | + testImplementation(libs.kotest.assertions.core) |
| 81 | + testImplementation(libs.arrow.core) |
| 82 | + testImplementation(libs.ktor.server.test.host) |
| 83 | + testImplementation(libs.ktor.client.okhttp) |
| 84 | + testImplementation(libs.testcontainers.mongodb) |
| 85 | + testImplementation(libs.testcontainers.postgresql) |
| 86 | + testImplementation(libs.kotest.extensions.testcontainers) |
| 87 | + testImplementation(libs.mockk) |
| 88 | + testImplementation(libs.flyway.core) |
| 89 | + testImplementation(libs.flyway.database.postgresql) |
| 90 | + |
| 91 | + detektPlugins(libs.detekt.rules) |
| 92 | + compileOnly(libs.detekt.rules) |
99 | 93 | } |
100 | 94 |
|
101 | 95 | tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> { |
|
0 commit comments