56 lines
No EOL
1.5 KiB
Kotlin
56 lines
No EOL
1.5 KiB
Kotlin
plugins {
|
|
id("java")
|
|
id("com.gradleup.shadow") version "9.2.0"
|
|
id("de.kentoj.scrow.scrow-repository")
|
|
id("de.kentoj.scrow.base-dependencies")
|
|
id("de.kentoj.scrow.database")
|
|
}
|
|
|
|
group = "de.kentoj.scrow"
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven {
|
|
name = "papermc"
|
|
url = uri("https://repo.papermc.io/repository/maven-public/")
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(project(":core-velocity-api")) {
|
|
isTransitive = true
|
|
}
|
|
// https://docs.papermc.io/velocity/dev/creating-your-first-plugin/
|
|
annotationProcessor("com.velocitypowered:velocity-api:3.5.0-SNAPSHOT")
|
|
|
|
// https://mvnrepository.com/artifact/com.github.ben-manes.caffeine/caffeine
|
|
implementation("com.github.ben-manes.caffeine:caffeine:3.2.4")
|
|
}
|
|
|
|
tasks.build {
|
|
dependsOn("shadowJar")
|
|
}
|
|
|
|
val generateBuildInfo by tasks.registering {
|
|
val outputDir = layout.buildDirectory.dir("generated/sources/buildInfo")
|
|
outputs.dir(outputDir)
|
|
doLast {
|
|
val file = outputDir.get()
|
|
.file("de/kentoj/scrow/generated/BuildInfo.java")
|
|
.asFile
|
|
file.parentFile.mkdirs()
|
|
file.writeText(
|
|
"""
|
|
package de.kentoj.scrow.generated;
|
|
public final class BuildInfo {
|
|
private BuildInfo() {}
|
|
public static final String VERSION = "${project.version}";
|
|
}
|
|
""".trimIndent()
|
|
)
|
|
}
|
|
}
|
|
|
|
sourceSets.main {
|
|
java.srcDir(generateBuildInfo)
|
|
} |