update gradle configuration and wrapper
This commit is contained in:
parent
9828227f41
commit
84ee6ac378
8 changed files with 77 additions and 56 deletions
45
build.gradle.kts
Normal file
45
build.gradle.kts
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
plugins {
|
||||
java
|
||||
alias(libs.plugins.run.velocity)
|
||||
}
|
||||
|
||||
group = "com.uravgcode"
|
||||
version = "1.0"
|
||||
|
||||
java {
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly(libs.velocity.api)
|
||||
annotationProcessor(libs.velocity.api)
|
||||
}
|
||||
|
||||
tasks {
|
||||
withType<JavaCompile>().configureEach {
|
||||
options.encoding = "UTF-8"
|
||||
options.release.set(21)
|
||||
}
|
||||
|
||||
runVelocity {
|
||||
velocityVersion("3.4.0-SNAPSHOT")
|
||||
}
|
||||
}
|
||||
|
||||
val templateSource = file("src/main/templates")
|
||||
val templateDest = layout.buildDirectory.dir("generated/sources/templates")
|
||||
|
||||
val generateTemplates by tasks.registering(Copy::class) {
|
||||
val props = mapOf("version" to project.version)
|
||||
inputs.properties(props)
|
||||
|
||||
from(templateSource)
|
||||
into(templateDest)
|
||||
expand(props)
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
named("main") {
|
||||
java.srcDir(generateTemplates.map { it.outputs })
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue