gradle sucks etc
This commit is contained in:
parent
72b4edf48b
commit
b0d4a7d061
25 changed files with 463 additions and 123 deletions
|
|
@ -4,7 +4,6 @@ plugins {
|
|||
}
|
||||
|
||||
group = "de.kentoj.scrow"
|
||||
version = "0.1"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
|
@ -25,4 +24,27 @@ dependencies {
|
|||
|
||||
// http://forge.kentoj.de/scrow/-/packages/maven/de.kentoj.scrow:kencommandapi-velocity
|
||||
implementation("de.kentoj.scrow:kencommandapi-velocity")
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue