2024-04-26 01:40:50 +00:00
|
|
|
import io.papermc.paperweight.PaperweightSourceGeneratorHelper
|
|
|
|
import io.papermc.paperweight.extension.PaperweightSourceGeneratorExt
|
2023-11-23 04:56:28 +00:00
|
|
|
|
|
|
|
plugins {
|
|
|
|
java
|
|
|
|
}
|
|
|
|
|
2024-04-26 01:40:50 +00:00
|
|
|
plugins.apply(PaperweightSourceGeneratorHelper::class)
|
2023-11-23 04:56:28 +00:00
|
|
|
|
2024-04-26 01:40:50 +00:00
|
|
|
extensions.configure(PaperweightSourceGeneratorExt::class) {
|
|
|
|
atFile.set(projectDir.toPath().resolve("wideners.at").toFile())
|
2023-11-23 04:56:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation("com.squareup:javapoet:1.13.0")
|
|
|
|
implementation(project(":paper-api"))
|
2024-01-15 19:36:10 +00:00
|
|
|
implementation("io.github.classgraph:classgraph:4.8.47")
|
2024-04-26 01:40:50 +00:00
|
|
|
implementation("org.jetbrains:annotations:24.0.1")
|
2024-04-27 20:30:15 +00:00
|
|
|
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
|
|
|
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
2024-04-26 01:40:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.register<JavaExec>("generate") {
|
2024-04-28 01:00:01 +00:00
|
|
|
dependsOn(tasks.check)
|
2024-04-26 01:40:50 +00:00
|
|
|
mainClass.set("io.papermc.generator.Main")
|
|
|
|
classpath(sourceSets.main.map { it.runtimeClasspath })
|
|
|
|
args(projectDir.toPath().resolve("generated").toString())
|
2023-11-23 04:56:28 +00:00
|
|
|
}
|
|
|
|
|
2024-04-27 20:30:15 +00:00
|
|
|
tasks.test {
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
|
|
|
|
2023-11-23 04:56:28 +00:00
|
|
|
group = "io.papermc.paper"
|
|
|
|
version = "1.0-SNAPSHOT"
|