diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index 0338034a..2d96feeb 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -12,10 +12,9 @@ dependencies { implementation(libs.shadow) implementation(libs.indraCommon) implementation(libs.indraLicenseHeader) - implementation(libs.licenser) implementation(libs.pluginYml) implementation(libs.minotaur) - implementation("org.spongepowered:configurate-yaml:4.0.0") + implementation(libs.configurateYaml) compileOnly("com.fasterxml.jackson.core:jackson-core:2.14.0") compileOnly("com.fasterxml.jackson.core:jackson-annotations:2.14.0") diff --git a/build-logic/src/main/kotlin/carbon.base-conventions.gradle.kts b/build-logic/src/main/kotlin/carbon.base-conventions.gradle.kts index 4131d735..846462ab 100644 --- a/build-logic/src/main/kotlin/carbon.base-conventions.gradle.kts +++ b/build-logic/src/main/kotlin/carbon.base-conventions.gradle.kts @@ -2,7 +2,7 @@ plugins { id("net.kyori.indra") id("net.kyori.indra.git") id("net.kyori.indra.checkstyle") - id("net.kyori.indra.license-header") + id("net.kyori.indra.licenser.spotless") } version = rootProject.version @@ -17,11 +17,18 @@ indra { github(GITHUB_ORGANIZATION, GITHUB_REPO) } -license { - header.set(resources.text.fromFile(rootProject.file("LICENSE_HEADER"))) - exclude("net/draycia/carbon/common/messages/PrefixedDelegateIterator.java") - exclude("net/draycia/carbon/common/messages/StandardPlaceholderResolverStrategyButDifferent.java") - exclude("com/google/inject/assistedinject") +spotless { + java { + targetExclude( + "src/main/java/net/draycia/carbon/common/messages/PrefixedDelegateIterator.java", + "src/main/java/net/draycia/carbon/common/messages/StandardPlaceholderResolverStrategyButDifferent.java", + "src/main/java/com/google/inject/assistedinject/**" + ) + } +} + +indraSpotlessLicenser { + licenseHeaderFile(rootProject.file("LICENSE_HEADER")) } tasks { diff --git a/build.gradle.kts b/build.gradle.kts index dc779c7d..714f4b4e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,8 +11,7 @@ version = projectVersion hangarPublish.publications.register("plugin") { version.set(projectVersion) - owner.set("Vicarious") - slug.set("Carbon") + id.set("Carbon") channel.set(if (projectVersion.contains("-beta.")) "Beta" else "Release") changelog.set(releaseNotes) apiKey.set(providers.environmentVariable("HANGAR_UPLOAD_KEY")) @@ -21,7 +20,7 @@ hangarPublish.publications.register("plugin") { platformVersions.add("1.19.4-1.20.1") dependencies { url("LuckPerms", "https://luckperms.net/") - hangar("EssentialsX", "Essentials") { + hangar("Essentials") { required.set(false) } url("DiscordSRV", "https://www.spigotmc.org/resources/discordsrv.18494/") { @@ -30,7 +29,7 @@ hangarPublish.publications.register("plugin") { url("PlaceholderAPI", "https://www.spigotmc.org/resources/placeholderapi.6245/") { required.set(false) } - hangar("MiniPlaceholders", "MiniPlaceholders") { + hangar("MiniPlaceholders") { required.set(false) } } @@ -40,10 +39,10 @@ hangarPublish.publications.register("plugin") { platformVersions.add("3.2") dependencies { url("LuckPerms", "https://luckperms.net/") - hangar("MiniPlaceholders", "MiniPlaceholders") { + hangar("MiniPlaceholders") { required.set(false) } - hangar("4drian3d", "UnSignedVelocity") { + hangar("UnSignedVelocity") { required.set(false) } } diff --git a/common/src/main/java/net/draycia/carbon/common/messages/SourcedReceiverResolver.java b/common/src/main/java/net/draycia/carbon/common/messages/SourcedReceiverResolver.java index b4d85e3e..46025a0b 100644 --- a/common/src/main/java/net/draycia/carbon/common/messages/SourcedReceiverResolver.java +++ b/common/src/main/java/net/draycia/carbon/common/messages/SourcedReceiverResolver.java @@ -17,26 +17,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -// -// ban - A punishment suite for Velocity. -// Copyright (C) 2021 Mariell Hoversholm -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published -// by the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . -// -// Modified to better fit in Carbon -// - package net.draycia.carbon.common.messages; import java.lang.reflect.Method; diff --git a/gradle/libs.versions.yml b/gradle/libs.versions.yml index 98babed4..0d366e4d 100644 --- a/gradle/libs.versions.yml +++ b/gradle/libs.versions.yml @@ -4,22 +4,21 @@ metadata: - plugins plugins: - org.spongepowered.gradle.plugin: 2.1.1 + org.spongepowered.gradle.plugin: 2.2.0 xyz.jpenilla.run-paper: &run-task 2.2.0 xyz.jpenilla.run-velocity: *run-task - io.papermc.hangar-publish-plugin: 0.0.5 + io.papermc.hangar-publish-plugin: 0.1.0 net.kyori.indra.publishing.sonatype: &indra 3.1.3 versions: indra: *indra - licenser: 0.6.1 shadow: 8.1.1 adventure: 4.14.0 cloud: 1.8.4 cloudSponge: 1.8.0-SNAPSHOT configurate: 4.1.2 typesafeConfig: 1.4.1 - checkerQual: 3.38.0 + checkerQual: 3.39.0 stylecheck: 0.1 gson: 2.10 guava: 30.1-jre @@ -42,23 +41,23 @@ versions: discordsrv: 1.26.0 placeholderapi: 2.10.9 miniplaceholders: 2.2.0 - jdbi: 3.41.1 + jdbi: 3.41.3 hikari: 5.0.1 mysql: 8.0.33 protobuf: 3.21.9 - flyway: 9.22.1 + flyway: 9.22.2 caffeine: 3.1.8 mariadb: 3.2.0 messenger: 1.1.0-SNAPSHOT netty: 4.1.68.Final zstdjni: 1.5.5-5 - jedis: 5.0.0 + jedis: 5.0.1 postgresql: 42.6.0 rabbitmq: 5.18.0 nats: 2.16.14 pluginYml: 0.5.3 minotaur: 2.7.5 - h2: 2.2.222 + h2: 2.2.224 dependencies: adventureBom: @@ -158,6 +157,10 @@ dependencies: group: org.spongepowered name: configurate-hocon version: { ref: configurate } + configurateYaml: + group: org.spongepowered + name: configurate-yaml + version: { ref: configurate } typesafeConfig: group: com.typesafe name: config @@ -328,16 +331,12 @@ dependencies: version: { ref: indra } indraLicenseHeader: group: net.kyori - name: indra-licenser-cadix + name: indra-licenser-spotless version: { ref: indra } shadow: group: com.github.johnrengelman name: shadow version: { ref: shadow } - licenser: - group: org.cadixdev.licenser - name: org.cadixdev.licenser.gradle.plugin - version: { ref: licenser } pluginYml: group: net.minecrell name: plugin-yml diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ac72c34e..3fa8f862 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index 0adc8e1a..1aa94a42 100755 --- a/gradlew +++ b/gradlew @@ -145,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -153,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -202,11 +202,11 @@ fi # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ diff --git a/settings.gradle.kts b/settings.gradle.kts index 65d0e383..0b08fa9f 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -60,9 +60,9 @@ pluginManagement { } plugins { - id("org.gradle.toolchains.foojay-resolver-convention") version "0.6.0" + id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0" id("ca.stellardrift.polyglot-version-catalogs") version "6.1.0" - id("quiet-fabric-loom") version "1.3-SNAPSHOT" + id("quiet-fabric-loom") version "1.4-SNAPSHOT" } rootProject.name = "CarbonChat"