documentation-website/Writerside/snippets/exposed-modules-kotlin-gradle/build.gradle.kts (27 lines of code) (raw):
val exposed: String by project
val h2: String by project
val slf4j: String by project
plugins {
kotlin("jvm") version "2.2.20"
}
group = "com.example"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
}
dependencies {
implementation("org.jetbrains.exposed:exposed-core:$exposed")
implementation("org.jetbrains.exposed:exposed-jdbc:$exposed")
implementation("org.jetbrains.exposed:exposed-dao:$exposed") // Optional
implementation("com.h2database:h2:$h2")
implementation("org.slf4j:slf4j-nop:$slf4j")
testImplementation(kotlin("test"))
}
tasks.test {
useJUnitPlatform()
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}