filemure/app/build.gradle.kts

73 lines
2.1 KiB
Text
Raw Normal View History

2025-01-29 18:01:36 +00:00
plugins {
// Apply the shared build logic from a convention plugin.
// The shared code is located in `buildSrc/src/main/kotlin/kotlin-jvm.gradle.kts`.
id("buildsrc.convention.kotlin-jvm")
alias(libs.plugins.tempolin)
id("app.cash.sqldelight") version "2.0.2"
2025-01-29 18:01:36 +00:00
// Apply the Application plugin to add support for building an executable JVM application.
application
}
dependencies {
implementation("app.cash.sqldelight:sqlite-driver:2.0.2")
// implementation("org.xerial:sqlite-jdbc:3.48.0.0")
implementation("com.fasterxml.jackson.core:jackson-databind:2.18.2")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.18.+")
2025-01-29 18:01:36 +00:00
implementation(libs.slf4jsimple)
implementation(libs.javalin)
implementation(libs.commonsText)
implementation(project(":core"))
testImplementation(kotlin("test"))
2025-01-29 18:01:36 +00:00
}
application {
// Define the Fully Qualified Name for the application main class
// (Note that Kotlin compiles `App.kt` to a class with FQN `com.example.app.AppKt`.)
mainClass = "net.h34t.filemure.ServerKt"
2025-01-29 18:01:36 +00:00
}
sourceSets {
main {
kotlin {
// include the generated source files
srcDir("${layout.buildDirectory.get()}/generated-sources/tempolin")
}
}
}
tasks.getByName("compileKotlin") {
dependsOn("tempolin")
}
tempolin {
add {
// place all templates in this directory
// subdirectories become packages
templateDirectory = "$projectDir/src/main/tpl"
// output directory for the generated templates
outputDirectory = "${layout.buildDirectory.get()}/generated-sources/tempolin"
// currently, there's only the "kotlin" generator
// optional, default is "kotlin"
compilationTarget = "kotlin"
// an optional input file filter
fileFilter = { file -> file.extension == "html" }
// set the name and package of the template interface
// defaults to "net.h34t.TempolinTemplate"
templateInterface = "net.h34t.filemure.Template"
}
}
sqldelight {
databases {
create("Database") {
packageName.set("net.h34t.filemure.db")
}
}
}