2025-06-26 09:56:35 -05:00
|
|
|
plugins {
|
|
|
|
|
java
|
|
|
|
|
id("com.diffplug.spotless") version "7.0.4"
|
2025-08-04 12:29:20 -07:00
|
|
|
id("com.gradleup.shadow") version "9.0.0-rc2"
|
2025-06-26 09:56:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
|
mavenCentral()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencies {
|
2025-08-04 12:29:20 -07:00
|
|
|
implementation("org.ow2.asm:asm:9.8")
|
|
|
|
|
implementation("org.ow2.asm:asm-tree:9.8")
|
2025-08-13 16:28:44 -07:00
|
|
|
implementation("com.google.code.gson:gson:2.13.1")
|
2025-08-04 12:29:20 -07:00
|
|
|
|
2025-06-26 09:56:35 -05:00
|
|
|
testImplementation(libs.junit.jupiter)
|
|
|
|
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
java {
|
|
|
|
|
toolchain {
|
2025-06-26 13:38:58 -05:00
|
|
|
languageVersion = JavaLanguageVersion.of(11)
|
2025-06-26 09:56:35 -05:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tasks.withType<JavaCompile>().configureEach {
|
2025-06-26 13:38:58 -05:00
|
|
|
options.release = 8
|
2025-06-26 09:56:35 -05:00
|
|
|
options.compilerArgs.addAll(listOf("-Xlint:all", "-Werror"))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
spotless {
|
|
|
|
|
java {
|
|
|
|
|
palantirJavaFormat()
|
|
|
|
|
removeUnusedImports()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tasks.jar {
|
2025-08-04 12:29:20 -07:00
|
|
|
enabled = false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tasks.shadowJar {
|
2025-06-26 09:56:35 -05:00
|
|
|
archiveFileName = "theseus.jar"
|
2025-08-04 12:29:20 -07:00
|
|
|
manifest {
|
|
|
|
|
attributes["Premain-Class"] = "com.modrinth.theseus.agent.TheseusAgent"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
enableRelocation = true
|
|
|
|
|
relocationPrefix = "com.modrinth.theseus.shadow"
|
2025-06-26 09:56:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tasks.named<Test>("test") {
|
|
|
|
|
useJUnitPlatform()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tasks.withType<AbstractArchiveTask>().configureEach {
|
|
|
|
|
isPreserveFileTimestamps = false
|
|
|
|
|
isReproducibleFileOrder = true
|
|
|
|
|
}
|