Skip to content

Commit

Permalink
fix spacing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Floweynt committed Jul 18, 2024
1 parent 9c1aade commit f5b37dc
Showing 1 changed file with 67 additions and 52 deletions.
119 changes: 67 additions & 52 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import net.ltgt.gradle.errorprone.errorprone
import net.ltgt.gradle.errorprone.CheckSeverity
import net.ltgt.gradle.errorprone.errorprone
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription

plugins {
java
`maven-publish`
id("com.palantir.git-version") version "0.12.2"
id("com.github.johnrengelman.shadow") version "7.1.2"
id("net.minecrell.plugin-yml.bukkit") version "0.5.1" // Generates plugin.yml
id("net.ltgt.errorprone") version "2.0.2"
id("net.ltgt.nullaway") version "1.3.0"
java
`maven-publish`
id("com.palantir.git-version") version "0.12.2"
id("com.github.johnrengelman.shadow") version "7.1.2"
id("net.minecrell.plugin-yml.bukkit") version "0.5.1" // Generates plugin.yml
id("net.ltgt.errorprone") version "2.0.2"
id("net.ltgt.nullaway") version "1.3.0"
id("com.playmonumenta.deployment") version "1.+"
checkstyle
pmd
checkstyle
pmd
}

repositories {
mavenLocal()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://jitpack.io")
maven("https://oss.sonatype.org/content/repositories/snapshots/")
mavenLocal()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://jitpack.io")
maven("https://oss.sonatype.org/content/repositories/snapshots/")
maven("https://maven.playmonumenta.com/releases")
// NBT API, pulled in by CommandAPI
maven("https://repo.codemc.org/repository/maven-public/")
maven("https://repo.maven.apache.org/maven2/")
maven("https://repo.codemc.org/repository/maven-public/")
maven("https://repo.codemc.org/repository/maven-public/")
maven("https://repo.maven.apache.org/maven2/")
maven("https://repo.codemc.org/repository/maven-public/")
}

dependencies {
compileOnly("io.papermc.paper:paper-api:1.19.4-R0.1-SNAPSHOT")
compileOnly("dev.jorel:commandapi-bukkit-core:9.4.1")
compileOnly("io.papermc.paper:paper-api:1.19.4-R0.1-SNAPSHOT")
compileOnly("dev.jorel:commandapi-bukkit-core:9.4.1")
compileOnly("de.tr7zw:item-nbt-api-plugin:2.12.0-SNAPSHOT")
compileOnly("com.playmonumenta:redissync:4.1:all")
compileOnly("com.playmonumenta:nbteditor:4.1:all")
compileOnly("com.google.code.gson:gson:2.8.5")
errorprone("com.google.errorprone:error_prone_core:2.10.0")
errorprone("com.uber.nullaway:nullaway:0.9.5")
compileOnly("com.google.code.gson:gson:2.8.5")
errorprone("com.google.errorprone:error_prone_core:2.10.0")
errorprone("com.uber.nullaway:nullaway:0.9.5")
}

group = "com.playmonumenta"
Expand All @@ -48,20 +48,20 @@ java.targetCompatibility = JavaVersion.VERSION_17

// Configure plugin.yml generation
bukkit {
load = BukkitPluginDescription.PluginLoadOrder.POSTWORLD
main = "com.playmonumenta.libraryofsouls.LibraryOfSouls"
apiVersion = "1.18"
name = "LibraryOfSouls"
authors = listOf("The Monumenta Team")
depend = listOf("CommandAPI", "NBTEditor")
softDepend = listOf("MonumentaRedisSync")
load = BukkitPluginDescription.PluginLoadOrder.POSTWORLD
main = "com.playmonumenta.libraryofsouls.LibraryOfSouls"
apiVersion = "1.18"
name = "LibraryOfSouls"
authors = listOf("The Monumenta Team")
depend = listOf("CommandAPI", "NBTEditor")
softDepend = listOf("MonumentaRedisSync")
}

pmd {
isConsoleOutput = true
toolVersion = "6.41.0"
ruleSets = listOf("$rootDir/pmd-ruleset.xml")
setIgnoreFailures(true)
isConsoleOutput = true
toolVersion = "6.41.0"
ruleSets = listOf("$rootDir/pmd-ruleset.xml")
setIgnoreFailures(true)
}

java {
Expand Down Expand Up @@ -92,27 +92,42 @@ publishing {
}

tasks.withType<JavaCompile>().configureEach {
options.encoding = "UTF-8"
options.compilerArgs.add("-Xmaxwarns")
options.compilerArgs.add("10000")
options.compilerArgs.add("-Xlint:deprecation")
options.encoding = "UTF-8"
options.compilerArgs.add("-Xmaxwarns")
options.compilerArgs.add("10000")
options.compilerArgs.add("-Xlint:deprecation")

options.errorprone {
option("NullAway:AnnotatedPackages", "com.playmonumenta")
options.errorprone {
option("NullAway:AnnotatedPackages", "com.playmonumenta")

allErrorsAsWarnings.set(true)
allErrorsAsWarnings.set(true)

/*** Disabled checks ***/
// These we almost certainly don't want
check("InlineMeSuggester", CheckSeverity.OFF) // We won't keep deprecated stuff around long enough for this to matter
check("CatchAndPrintStackTrace", CheckSeverity.OFF) // This is the primary way a lot of exceptions are handled
check("FutureReturnValueIgnored", CheckSeverity.OFF) // This one is dumb and doesn't let you check return values with .whenComplete()
check("ImmutableEnumChecker", CheckSeverity.OFF) // Would like to turn this on but we'd have to annotate a bunch of base classes
check("LockNotBeforeTry", CheckSeverity.OFF) // Very few locks in our code, those that we have are simple and refactoring like this would be ugly
check("StaticAssignmentInConstructor", CheckSeverity.OFF) // We have tons of these on purpose
check("StringSplitter", CheckSeverity.OFF) // We have a lot of string splits too which are fine for this use
check("MutablePublicArray", CheckSeverity.OFF) // These are bad practice but annoying to refactor and low risk of actual bugs
}
/*** Disabled checks ***/
// These we almost certainly don't want
check(
"InlineMeSuggester",
CheckSeverity.OFF
) // We won't keep deprecated stuff around long enough for this to matter
check("CatchAndPrintStackTrace", CheckSeverity.OFF) // This is the primary way a lot of exceptions are handled
check(
"FutureReturnValueIgnored",
CheckSeverity.OFF
) // This one is dumb and doesn't let you check return values with .whenComplete()
check(
"ImmutableEnumChecker",
CheckSeverity.OFF
) // Would like to turn this on but we'd have to annotate a bunch of base classes
check(
"LockNotBeforeTry",
CheckSeverity.OFF
) // Very few locks in our code, those that we have are simple and refactoring like this would be ugly
check("StaticAssignmentInConstructor", CheckSeverity.OFF) // We have tons of these on purpose
check("StringSplitter", CheckSeverity.OFF) // We have a lot of string splits too which are fine for this use
check(
"MutablePublicArray",
CheckSeverity.OFF
) // These are bad practice but annoying to refactor and low risk of actual bugs
}
}

ssh.easySetup(tasks.named<ShadowJar>("shadowJar").get(), "LibraryOfSouls")

0 comments on commit f5b37dc

Please sign in to comment.