import com.diffplug.spotless.LineEnding plugins { id("java") application id("gg.jte.gradle") version "3.2.1" id("com.diffplug.spotless") version "8.0.0" } group = "moe.nea.prickly" version = "1.0.0" repositories { mavenCentral() } dependencies { compileOnly("org.projectlombok:lombok:1.18.42") annotationProcessor("org.projectlombok:lombok:1.18.42") val javalinVersion = "6.7.0" implementation("io.javalin:javalin:$javalinVersion") implementation("io.javalin:javalin-rendering:$javalinVersion") implementation("gg.jte:jte:3.2.1") implementation("org.jspecify:jspecify:1.0.0") implementation("com.auth0:java-jwt:4.5.0") implementation("com.google.guava:guava:33.3.1-jre") runtimeOnly("org.slf4j:slf4j-simple:2.0.17") testImplementation(platform("org.junit:junit-bom:5.10.0")) testImplementation("org.junit.jupiter:junit-jupiter") testRuntimeOnly("org.junit.platform:junit-platform-launcher") } application { mainClass.set("moe.nea.prickly.Main") } tasks.test { useJUnitPlatform() } val jteTargetDir = layout.buildDirectory.dir("jte-classes") jte { precompile() targetDirectory.set(jteTargetDir.map { it.asFile.toPath() }) } tasks.jar { dependsOn(tasks.precompileJte) from(jteTargetDir) { include("**/*.class") include("**/*.bin") } } spotless { val licenseHeader = "(C) \$YEAR Linnea Gräf - Licensed to everyone under the BSD 3 Clause License" format("jte") { target("src/main/jte/**/*.jte") licenseHeader("<%-- $licenseHeader --%>", "@.*") leadingSpacesToTabs() trimTrailingWhitespace() endWithNewline() lineEndings = LineEnding.UNIX } java { palantirJavaFormat() formatAnnotations() leadingSpacesToTabs() licenseHeader("/* $licenseHeader */") } }