64 lines
2 KiB
Kotlin
64 lines
2 KiB
Kotlin
plugins {
|
|
kotlin("jvm") version "2.0.20-Beta1"
|
|
kotlin("kapt") version "2.0.20-Beta1"
|
|
id("com.github.johnrengelman.shadow") version "8.1.1"
|
|
id("eclipse")
|
|
id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.8"
|
|
id("xyz.jpenilla.run-velocity") version "2.3.1"
|
|
}
|
|
|
|
group = "de.moritzhuber"
|
|
version = "1.0-SNAPSHOT"
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven("https://repo.papermc.io/repository/maven-public/") {
|
|
name = "papermc-repo"
|
|
}
|
|
maven("https://oss.sonatype.org/content/groups/public/") {
|
|
name = "sonatype"
|
|
}
|
|
}
|
|
|
|
val exposedVersion: String by project
|
|
dependencies {
|
|
compileOnly("com.velocitypowered:velocity-api:3.4.0-SNAPSHOT")
|
|
kapt("com.velocitypowered:velocity-api:3.4.0-SNAPSHOT")
|
|
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
|
|
|
|
// Database
|
|
implementation("org.jetbrains.exposed:exposed-core:${exposedVersion}")
|
|
implementation("org.jetbrains.exposed:exposed-jdbc:${exposedVersion}")
|
|
implementation("org.jetbrains.exposed:exposed-kotlin-datetime:${exposedVersion}")
|
|
implementation("org.postgresql:postgresql:42.7.7")
|
|
}
|
|
|
|
tasks {
|
|
runVelocity {
|
|
// Configure the Velocity version for our task.
|
|
// This is the only required configuration besides applying the plugin.
|
|
// Your plugin's jar (or shadowJar if present) will be used automatically.
|
|
velocityVersion("3.4.0-SNAPSHOT")
|
|
}
|
|
}
|
|
|
|
val targetJavaVersion = 21
|
|
kotlin {
|
|
jvmToolchain(targetJavaVersion)
|
|
}
|
|
|
|
val templateSource = file("src/main/templates")
|
|
val templateDest = layout.buildDirectory.dir("generated/sources/templates")
|
|
val generateTemplates = tasks.register<Copy>("generateTemplates") {
|
|
val props = mapOf("version" to project.version)
|
|
inputs.properties(props)
|
|
|
|
from(templateSource)
|
|
into(templateDest)
|
|
expand(props)
|
|
}
|
|
|
|
sourceSets.main.configure { java.srcDir(generateTemplates.map { it.outputs }) }
|
|
|
|
//project.idea.project.settings.taskTriggers.afterSync(generateTemplates)
|
|
//project.eclipse.synchronizationTasks(generateTemplates)
|