61 lines
No EOL
1.9 KiB
Text
61 lines
No EOL
1.9 KiB
Text
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)
|
|
|
|
// Apply the Application plugin to add support for building an executable JVM application.
|
|
application
|
|
}
|
|
|
|
dependencies {
|
|
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.+")
|
|
implementation(libs.slf4jsimple)
|
|
implementation(libs.javalin)
|
|
implementation(libs.commonsText)
|
|
implementation(project(":core"))
|
|
}
|
|
|
|
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.app.AppKt"
|
|
}
|
|
|
|
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"
|
|
|
|
}
|
|
} |