spotless (#34)
* Do not hardcode tag names and remove not needed README comment * Remove useless dependencies * Deduplicate build code * Run spotless to keep codebase clean
This commit is contained in:
@@ -15,42 +15,6 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
implementation("xyz.wagyourtail.unimined:xyz.wagyourtail.unimined.gradle.plugin:1.2.15-SNAPSHOT")
|
||||
|
||||
// guava
|
||||
implementation("com.google.guava:guava:31.1-jre")
|
||||
|
||||
// gson
|
||||
implementation("com.google.code.gson:gson:2.9.0")
|
||||
|
||||
// asm
|
||||
implementation("org.ow2.asm:asm:9.5")
|
||||
implementation("org.ow2.asm:asm-commons:9.5")
|
||||
implementation("org.ow2.asm:asm-tree:9.5")
|
||||
implementation("org.ow2.asm:asm-analysis:9.5")
|
||||
implementation("org.ow2.asm:asm-util:9.5")
|
||||
|
||||
// remapper
|
||||
implementation("net.fabricmc:tiny-remapper:0.8.7") {
|
||||
exclude(group = "org.ow2.asm")
|
||||
}
|
||||
|
||||
// mappings
|
||||
implementation("net.fabricmc:mapping-io:0.3.0") {
|
||||
exclude(group = "org.ow2.asm")
|
||||
}
|
||||
|
||||
// jetbrains annotations
|
||||
implementation("org.jetbrains:annotations-java5:23.0.0")
|
||||
|
||||
// binpatcher
|
||||
implementation("net.minecraftforge:binarypatcher:1.1.1") {
|
||||
exclude(mapOf("group" to "commons-io"))
|
||||
}
|
||||
implementation("commons-io:commons-io:2.12.0")
|
||||
|
||||
// pack200 provided by apache commons-compress
|
||||
implementation("org.apache.commons:commons-compress:1.26.1")
|
||||
|
||||
// aw
|
||||
implementation("net.fabricmc:access-widener:2.1.0")
|
||||
implementation("io.freefair.gradle:lombok-plugin:8.10.2")
|
||||
implementation("com.diffplug.spotless:spotless-plugin-gradle:6.25.0")
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
plugins {
|
||||
idea
|
||||
`java-library`
|
||||
id("io.freefair.lombok")
|
||||
id("com.diffplug.spotless")
|
||||
}
|
||||
|
||||
spotless {
|
||||
java {
|
||||
trimTrailingWhitespace()
|
||||
indentWithSpaces(4)
|
||||
endWithNewline()
|
||||
|
||||
importOrder("", "javax|java", "\\#")
|
||||
}
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
tasks.processResources {
|
||||
filteringCharset = "UTF-8"
|
||||
|
||||
filesMatching("fabric.mod.json") {
|
||||
expand("version" to rootProject.version)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<JavaCompile> {
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(21))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import xyz.wagyourtail.unimined.api.minecraft.MinecraftConfig
|
||||
import xyz.wagyourtail.unimined.api.minecraft.task.RemapJarTask
|
||||
import xyz.wagyourtail.unimined.internal.minecraft.MinecraftProvider
|
||||
|
||||
plugins {
|
||||
id("dg-java-conventions")
|
||||
id("xyz.wagyourtail.unimined")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(project(":common"))
|
||||
}
|
||||
|
||||
tasks.withType<RemapJarTask> {
|
||||
onlyIf { false }
|
||||
}
|
||||
Reference in New Issue
Block a user