build: update build-time dependencies, address new warnings (#413)
* build: update build-time dependencies, address new warnings * build: switch to central repo declaration, remove redundant repositories * build: use spotless predeclaration, more task avoidance on kotlin modules
This commit is contained in:
parent
86b76b91c7
commit
59c5a8310c
33 changed files with 204 additions and 135 deletions
12
.palantir/revapi.yml
Normal file
12
.palantir/revapi.yml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
acceptedBreaks:
|
||||
"1.7.1":
|
||||
cloud.commandframework:cloud-core:
|
||||
- code: "java.generics.formalTypeParameterRemoved"
|
||||
old: "method <T> int cloud.commandframework.arguments.flags.FlagContext::count(java.lang.String)"
|
||||
new: "method int cloud.commandframework.arguments.flags.FlagContext::count(java.lang.String)"
|
||||
justification: "no binary break"
|
||||
cloud.commandframework:cloud-services:
|
||||
- code: "java.class.nowFinal"
|
||||
old: "class cloud.commandframework.services.types.ConsumerService.PipeBurst"
|
||||
new: "class cloud.commandframework.services.types.ConsumerService.PipeBurst"
|
||||
justification: "no practical effect, the constructor was private already"
|
||||
|
|
@ -24,7 +24,9 @@ dependencies {
|
|||
}
|
||||
|
||||
spotless {
|
||||
kotlin {
|
||||
ktlint()
|
||||
kotlinGradle {
|
||||
target("*.gradle.kts", "src/*/kotlin/**.gradle.kts", "src/*/kotlin/**.kt")
|
||||
ktlint(libs.versions.ktlint.get())
|
||||
.editorConfigOverride(mapOf("ktlint_disabled_rules" to "filename"))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import ca.stellardrift.build.configurate.ConfigFormats
|
|||
import ca.stellardrift.build.configurate.catalog.PolyglotVersionCatalogExtension
|
||||
|
||||
plugins {
|
||||
id("ca.stellardrift.polyglot-version-catalogs") version "5.0.1"
|
||||
id("ca.stellardrift.polyglot-version-catalogs") version "6.0.1"
|
||||
}
|
||||
|
||||
extensions.configure<PolyglotVersionCatalogExtension> {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import net.kyori.indra.repository.sonatypeSnapshots
|
||||
import com.diffplug.gradle.spotless.FormatExtension
|
||||
import net.ltgt.gradle.errorprone.errorprone
|
||||
|
||||
plugins {
|
||||
|
|
@ -32,7 +32,7 @@ tasks {
|
|||
"StringSplitter",
|
||||
"EqualsGetClass",
|
||||
"CatchAndPrintStackTrace",
|
||||
"InlineMeSuggester",
|
||||
"InlineMeSuggester"
|
||||
)
|
||||
}
|
||||
options.compilerArgs.addAll(listOf("-Xlint:-processing", "-Werror"))
|
||||
|
|
@ -40,74 +40,30 @@ tasks {
|
|||
}
|
||||
|
||||
spotless {
|
||||
java {
|
||||
licenseHeaderFile(rootProject.file("HEADER"))
|
||||
importOrderFile(rootProject.file(".spotless/cloud.importorder"))
|
||||
indentWithSpaces(4)
|
||||
fun FormatExtension.applyCommon(spaces: Int = 4) {
|
||||
indentWithSpaces(spaces)
|
||||
trimTrailingWhitespace()
|
||||
endWithNewline()
|
||||
}
|
||||
java {
|
||||
licenseHeaderFile(rootProject.file("HEADER"))
|
||||
importOrderFile(rootProject.file(".spotless/cloud.importorder"))
|
||||
applyCommon()
|
||||
}
|
||||
kotlin {
|
||||
licenseHeaderFile(rootProject.file("HEADER"))
|
||||
indentWithSpaces(4)
|
||||
trimTrailingWhitespace()
|
||||
endWithNewline()
|
||||
applyCommon()
|
||||
}
|
||||
kotlinGradle {
|
||||
ktlint(libs.versions.ktlint.get())
|
||||
}
|
||||
format("configs") {
|
||||
target("**/*.yml", "**/*.yaml", "**/*.json")
|
||||
targetExclude("run/**")
|
||||
indentWithSpaces(2)
|
||||
trimTrailingWhitespace()
|
||||
endWithNewline()
|
||||
applyCommon(2)
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
sonatypeSnapshots()
|
||||
/* Velocity, used for cloud-velocity */
|
||||
maven("https://nexus.velocitypowered.com/repository/velocity-artifacts-release/") {
|
||||
mavenContent {
|
||||
releasesOnly()
|
||||
includeGroup("com.velocitypowered")
|
||||
}
|
||||
}
|
||||
maven("https://nexus.velocitypowered.com/repository/velocity-artifacts-snapshots/") {
|
||||
mavenContent {
|
||||
snapshotsOnly()
|
||||
includeGroup("com.velocitypowered")
|
||||
}
|
||||
}
|
||||
/* The Minecraft repository, used for cloud-brigadier */
|
||||
maven("https://libraries.minecraft.net/") {
|
||||
mavenContent { releasesOnly() }
|
||||
}
|
||||
/* The Spigot repository, used for cloud-bukkit */
|
||||
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") {
|
||||
mavenContent { snapshotsOnly() }
|
||||
}
|
||||
/* The paper repository, used for cloud-paper */
|
||||
maven("https://repo.papermc.io/repository/maven-public/")
|
||||
/* Used for cloud-cloudburst */
|
||||
maven("https://repo.opencollab.dev/maven-snapshots/") {
|
||||
mavenContent { includeGroup("org.cloudburstmc") }
|
||||
}
|
||||
/* The current Fabric repository */
|
||||
maven("https://maven.fabricmc.net/") {
|
||||
mavenContent { includeGroup("net.fabricmc") }
|
||||
}
|
||||
/* The current Sponge repository */
|
||||
maven("https://repo.spongepowered.org/repository/maven-public/") {
|
||||
mavenContent { includeGroup("org.spongepowered") }
|
||||
}
|
||||
/* JitPack, used for random dependencies */
|
||||
maven("https://jitpack.io") {
|
||||
content { includeGroupByRegex("com\\.github\\..*") }
|
||||
}
|
||||
/* JDA's maven repository for cloud-jda */
|
||||
maven("https://m2.dv8tion.net/releases")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnlyApi(libs.checkerQual)
|
||||
compileOnlyApi(libs.apiguardian)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import org.jetbrains.dokka.gradle.DokkaTask
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
id("cloud.base-conventions")
|
||||
|
|
@ -8,9 +7,17 @@ plugins {
|
|||
}
|
||||
|
||||
kotlin {
|
||||
explicitApi()
|
||||
jvmToolchain {
|
||||
(this as JavaToolchainSpec).apply {
|
||||
languageVersion.set(JavaLanguageVersion.of(8))
|
||||
languageVersion.set(JavaLanguageVersion.of(8))
|
||||
}
|
||||
coreLibrariesVersion = "1.5.31"
|
||||
target {
|
||||
compilations.configureEach {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
languageVersion = "1.5"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -20,7 +27,7 @@ dependencies {
|
|||
}
|
||||
|
||||
tasks {
|
||||
withType<DokkaTask> {
|
||||
withType(DokkaTask::class).configureEach {
|
||||
dokkaSourceSets.named("main") {
|
||||
includes.from(layout.projectDirectory.file("src/main/descriptions.md"))
|
||||
/*externalDocumentationLink { // todo: fix KDoc linking to JavaDoc
|
||||
|
|
@ -32,19 +39,11 @@ tasks {
|
|||
javadocJar {
|
||||
from(dokkaHtml)
|
||||
}
|
||||
withType<KotlinCompile> {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
spotless {
|
||||
kotlin {
|
||||
ktlint()
|
||||
ktlint(libs.versions.ktlint.get())
|
||||
.editorConfigOverride(mapOf("ktlint_disabled_rules" to "filename"))
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
explicitApi()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
plugins {
|
||||
id("net.kyori.indra.publishing.sonatype")
|
||||
id("com.diffplug.spotless")
|
||||
}
|
||||
|
||||
spotless.predeclareDeps()
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@ import org.gradle.kotlin.dsl.the
|
|||
// set by GitHub Actions
|
||||
val Project.ci: Provider<Boolean>
|
||||
get() = providers.environmentVariable("CI")
|
||||
.map { it.toBoolean() }
|
||||
.orElse(false)
|
||||
.map { it.toBoolean() }
|
||||
.orElse(false)
|
||||
|
||||
val Project.compileExamples: Boolean
|
||||
get() = providers.gradleProperty("compile-examples")
|
||||
.isPresent
|
||||
.isPresent
|
||||
|
||||
val Project.libs: LibrariesForLibs
|
||||
get() = the()
|
||||
|
|
|
|||
|
|
@ -8,3 +8,17 @@ subprojects {
|
|||
apply(plugin = "cloud.publishing-conventions")
|
||||
}
|
||||
}
|
||||
|
||||
spotlessPredeclare {
|
||||
kotlin { ktlint(libs.versions.ktlint.get()) }
|
||||
kotlinGradle { ktlint(libs.versions.ktlint.get()) }
|
||||
}
|
||||
|
||||
tasks {
|
||||
spotlessCheck {
|
||||
dependsOn(gradle.includedBuild("build-logic").task(":spotlessCheck"))
|
||||
}
|
||||
spotlessApply {
|
||||
dependsOn(gradle.includedBuild("build-logic").task(":spotlessApply"))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import net.ltgt.gradle.errorprone.errorprone
|
||||
|
||||
plugins {
|
||||
id("cloud.base-conventions")
|
||||
id("com.palantir.revapi")
|
||||
|
|
@ -8,3 +10,9 @@ dependencies {
|
|||
|
||||
testImplementation(libs.compileTesting)
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile::class).configureEach {
|
||||
options.errorprone {
|
||||
disable("UnusedMethod") // false positives from command annotations
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -478,7 +478,7 @@ public class CommandArgument<C, T> implements Comparable<CommandArgument<?, ?>>,
|
|||
public final int compareTo(final @NonNull CommandArgument<?, ?> o) {
|
||||
if (this instanceof StaticArgument) {
|
||||
if (o instanceof StaticArgument) {
|
||||
return (this.getName().compareTo(o.getName()));
|
||||
return this.getName().compareTo(o.getName());
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@ public final class FlagArgument<C> extends CommandArgument<C, Object> {
|
|||
return strings;
|
||||
} else {
|
||||
CommandFlag<?> currentFlag = null;
|
||||
if (lastArg.startsWith("--")) {
|
||||
if (lastArg.startsWith("--")) { // --long
|
||||
final String flagName = lastArg.substring(2);
|
||||
for (final CommandFlag<?> flag : this.flags) {
|
||||
if (flagName.equalsIgnoreCase(flag.getName())) {
|
||||
|
|
@ -266,7 +266,7 @@ public final class FlagArgument<C> extends CommandArgument<C, Object> {
|
|||
break;
|
||||
}
|
||||
}
|
||||
} else if (lastArg.startsWith("-")) {
|
||||
} else { // -x
|
||||
final String flagName = lastArg.substring(1);
|
||||
for (final CommandFlag<?> flag : this.flags) {
|
||||
for (final String alias : flag.getAliases()) {
|
||||
|
|
|
|||
|
|
@ -107,12 +107,11 @@ public final class FlagContext {
|
|||
* Returns the number of values associated with the given {@code flag}.
|
||||
*
|
||||
* @param flag the flag
|
||||
* @param <T> the flag value type
|
||||
* @return the number of values associated with the flag
|
||||
* @since 1.7.0
|
||||
*/
|
||||
@API(status = API.Status.STABLE, since = "1.7.0")
|
||||
public <T> int count(final @NonNull String flag) {
|
||||
public int count(final @NonNull String flag) {
|
||||
return this.getAll(flag).size();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ public final class StandardParserRegistry<C> implements ParserRegistry<C> {
|
|||
*/
|
||||
public StandardParserRegistry() {
|
||||
/* Register standard mappers */
|
||||
this.<Range, Number>registerAnnotationMapper(Range.class, new RangeMapper<>());
|
||||
this.<Range, Number>registerAnnotationMapper(Range.class, new RangeMapper());
|
||||
this.<Greedy, String>registerAnnotationMapper(Greedy.class, new GreedyMapper());
|
||||
this.<Quoted, String>registerAnnotationMapper(
|
||||
Quoted.class,
|
||||
|
|
@ -291,7 +291,7 @@ public final class StandardParserRegistry<C> implements ParserRegistry<C> {
|
|||
}
|
||||
|
||||
|
||||
private static final class RangeMapper<T> implements BiFunction<@NonNull Range, @NonNull TypeToken<?>,
|
||||
private static final class RangeMapper implements BiFunction<@NonNull Range, @NonNull TypeToken<?>,
|
||||
@NonNull ParserParameters> {
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ public final class TestUtils {
|
|||
|
||||
private abstract static class TestCommandSenderCommandManager extends CommandManager<TestCommandSender> {
|
||||
|
||||
@SuppressWarnings("unused") // mocked via mockito
|
||||
protected TestCommandSenderCommandManager(
|
||||
final @NonNull Function<@NonNull CommandTree<TestCommandSender>, @NonNull CommandExecutionCoordinator<TestCommandSender>> commandExecutionCoordinator,
|
||||
final @NonNull CommandRegistrationHandler commandRegistrationHandler
|
||||
|
|
|
|||
|
|
@ -4,5 +4,5 @@ plugins {
|
|||
|
||||
dependencies {
|
||||
api(projects.cloudCore)
|
||||
compileOnly (libs.jda)
|
||||
compileOnly(libs.jda)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public fun interface SuspendingExecutionHandler<C : Any> {
|
|||
*/
|
||||
public fun asCommandExecutionHandler(
|
||||
scope: CoroutineScope = GlobalScope,
|
||||
context: CoroutineContext = EmptyCoroutineContext,
|
||||
context: CoroutineContext = EmptyCoroutineContext
|
||||
): CommandExecutionHandler<C> = createCommandExecutionHandler(scope, context, this)
|
||||
|
||||
public companion object {
|
||||
|
|
@ -76,7 +76,7 @@ public fun interface SuspendingExecutionHandler<C : Any> {
|
|||
public fun <C : Any> createCommandExecutionHandler(
|
||||
scope: CoroutineScope = GlobalScope,
|
||||
context: CoroutineContext = EmptyCoroutineContext,
|
||||
handler: SuspendingExecutionHandler<C>,
|
||||
handler: SuspendingExecutionHandler<C>
|
||||
): CommandExecutionHandler<C> = CommandExecutionHandler.FutureCommandExecutionHandler { ctx ->
|
||||
scope.future(context) {
|
||||
handler(ctx)
|
||||
|
|
|
|||
|
|
@ -43,5 +43,5 @@ import kotlin.coroutines.EmptyCoroutineContext
|
|||
public fun <C : Any> Command.Builder<C>.suspendingHandler(
|
||||
scope: CoroutineScope = GlobalScope,
|
||||
context: CoroutineContext = EmptyCoroutineContext,
|
||||
handler: SuspendingExecutionHandler<C>,
|
||||
handler: SuspendingExecutionHandler<C>
|
||||
): Command.Builder<C> = handler(SuspendingExecutionHandler.createCommandExecutionHandler(scope, context, handler))
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ import kotlin.coroutines.EmptyCoroutineContext
|
|||
public fun <C : Any> MutableCommandBuilder<C>.suspendingHandler(
|
||||
scope: CoroutineScope = GlobalScope,
|
||||
context: CoroutineContext = EmptyCoroutineContext,
|
||||
handler: SuspendingExecutionHandler<C>,
|
||||
handler: SuspendingExecutionHandler<C>
|
||||
): MutableCommandBuilder<C> = mutate {
|
||||
it.suspendingHandler(scope, context, handler)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ import kotlin.reflect.KClass
|
|||
*/
|
||||
public class MutableCommandBuilder<C : Any>(
|
||||
commandBuilder: Command.Builder<C>,
|
||||
private val commandManager: CommandManager<C>,
|
||||
private val commandManager: CommandManager<C>
|
||||
) {
|
||||
/**
|
||||
* The command builder that is being mutated by this [MutableCommandBuilder] instance.
|
||||
|
|
@ -703,7 +703,7 @@ public class MutableCommandBuilder<C : Any>(
|
|||
public fun flag(
|
||||
name: String,
|
||||
aliases: Array<String> = emptyArray(),
|
||||
description: ArgumentDescription = ArgumentDescription.empty(),
|
||||
description: ArgumentDescription = ArgumentDescription.empty()
|
||||
): MutableCommandBuilder<C> = mutate {
|
||||
it.flag(
|
||||
this.commandManager
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ class CommandBuildingDSLTest {
|
|||
"is",
|
||||
"is this",
|
||||
"is this going",
|
||||
"is this going too_far",
|
||||
"is this going too_far"
|
||||
)
|
||||
.sorted()
|
||||
)
|
||||
|
|
|
|||
|
|
@ -378,7 +378,7 @@ public final class CloudBrigadierManager<C, S> {
|
|||
}
|
||||
|
||||
@SuppressWarnings("all")
|
||||
private <T, K extends ArgumentParser<C, ?>> @Nullable Pair<@NonNull ArgumentType<?>, @Nullable SuggestionProvider<S>> getArgument(
|
||||
private <K extends ArgumentParser<C, ?>> @Nullable Pair<@NonNull ArgumentType<?>, @Nullable SuggestionProvider<S>> getArgument(
|
||||
final @NonNull TypeToken<?> valueType,
|
||||
final @NonNull K argumentParser
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -132,6 +132,7 @@ final class SelectorUtils {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused") // errorprone false positive
|
||||
private abstract static class SelectorParser<C, T> implements ArgumentParser<C, T>, SelectorMapper<T> {
|
||||
|
||||
protected static final Supplier<Object> NO_PLAYERS_EXCEPTION_TYPE =
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import net.fabricmc.loom.task.AbstractRunTask
|
|||
import net.ltgt.gradle.errorprone.errorprone
|
||||
|
||||
plugins {
|
||||
id("quiet-fabric-loom") version "1.0-SNAPSHOT"
|
||||
id("quiet-fabric-loom")
|
||||
id("cloud.base-conventions")
|
||||
}
|
||||
|
||||
|
|
@ -26,7 +26,7 @@ tasks {
|
|||
|
||||
withType<Javadoc> {
|
||||
(options as? StandardJavadocDocletOptions)?.apply {
|
||||
//links("https://maven.fabricmc.net/docs/yarn-${Versions.fabricMc}+build.${Versions.fabricYarn}/") // todo
|
||||
// links("https://maven.fabricmc.net/docs/yarn-${Versions.fabricMc}+build.${Versions.fabricYarn}/") // todo
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -34,8 +34,9 @@ tasks {
|
|||
standardInput = System.`in`
|
||||
jvmArgumentProviders += CommandLineArgumentProvider {
|
||||
if (System.getProperty("idea.active")?.toBoolean() == true || // IntelliJ
|
||||
System.getenv("TERM") != null || // linux terminals
|
||||
System.getenv("WT_SESSION") != null) { // Windows terminal
|
||||
System.getenv("TERM") != null || // linux terminals
|
||||
System.getenv("WT_SESSION") != null
|
||||
) { // Windows terminal
|
||||
listOf("-Dfabric.log.disableAnsi=false")
|
||||
} else {
|
||||
listOf()
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ public interface ConsumerService<Context>
|
|||
void accept(@NonNull Context context);
|
||||
|
||||
|
||||
class PipeBurst extends RuntimeException {
|
||||
final class PipeBurst extends RuntimeException {
|
||||
|
||||
private static final long serialVersionUID = -1143137258194595985L;
|
||||
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ public final class TaskRecipe {
|
|||
* @param <I> Input type
|
||||
* @param <O> Output type
|
||||
*/
|
||||
@SuppressWarnings("UnusedTypeParameter") // already in public API
|
||||
public final class TaskRecipeComponentOutputting<I, O> {
|
||||
|
||||
private final Object initialInput;
|
||||
|
|
|
|||
|
|
@ -34,16 +34,18 @@ tasks {
|
|||
runServer {
|
||||
minecraftVersion("1.19.2")
|
||||
runDirectory(file("run/latest"))
|
||||
javaLauncher.set(project.javaToolchains.launcherFor {
|
||||
languageVersion.set(JavaLanguageVersion.of(17))
|
||||
})
|
||||
javaLauncher.set(
|
||||
project.javaToolchains.launcherFor {
|
||||
languageVersion.set(JavaLanguageVersion.of(17))
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
// Set up a run task for each supported version
|
||||
mapOf(
|
||||
8 to setOf("1.8.8"),
|
||||
11 to setOf("1.9.4", "1.10.2", "1.11.2"),
|
||||
17 to setOf("1.12.2", "1.13.2", "1.14.4", "1.15.2", "1.16.5", "1.17.1", "1.18.2", "1.19.2"),
|
||||
8 to setOf("1.8.8"),
|
||||
11 to setOf("1.9.4", "1.10.2", "1.11.2"),
|
||||
17 to setOf("1.12.2", "1.13.2", "1.14.4", "1.15.2", "1.16.5", "1.17.1", "1.18.2", "1.19.2")
|
||||
).forEach { (javaVersion, minecraftVersions) ->
|
||||
for (version in minecraftVersions) {
|
||||
createVersionedRun(version, javaVersion)
|
||||
|
|
@ -52,15 +54,17 @@ tasks {
|
|||
}
|
||||
|
||||
fun TaskContainerScope.createVersionedRun(
|
||||
version: String,
|
||||
javaVersion: Int
|
||||
version: String,
|
||||
javaVersion: Int
|
||||
) = register<RunServer>("runServer${version.replace(".", "_")}") {
|
||||
group = "cloud"
|
||||
pluginJars.from(shadowJar.flatMap { it.archiveFile })
|
||||
minecraftVersion(version)
|
||||
runDirectory(file("run/$version"))
|
||||
systemProperty("Paper.IgnoreJavaVersion", true)
|
||||
javaLauncher.set(project.javaToolchains.launcherFor {
|
||||
languageVersion.set(JavaLanguageVersion.of(javaVersion))
|
||||
})
|
||||
javaLauncher.set(
|
||||
project.javaToolchains.launcherFor {
|
||||
languageVersion.set(JavaLanguageVersion.of(javaVersion))
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,3 +7,4 @@ org.gradle.parallel=true
|
|||
org.gradle.jvmargs=-Xmx2G
|
||||
|
||||
kotlin.stdlib.default.dependency=false
|
||||
systemProp.org.gradle.kotlin.dsl.precompiled.accessors.strict=true
|
||||
|
|
|
|||
|
|
@ -5,27 +5,28 @@ metadata:
|
|||
|
||||
plugins:
|
||||
com.github.johnrengelman.shadow: 7.1.2
|
||||
com.github.ben-manes.versions: 0.42.0
|
||||
com.diffplug.spotless: &spotless 6.6.1
|
||||
com.github.ben-manes.versions: 0.44.0
|
||||
com.diffplug.spotless: &spotless 6.12.0
|
||||
xyz.jpenilla.run-paper: &run-task 2.0.0
|
||||
xyz.jpenilla.run-velocity: *run-task
|
||||
xyz.jpenilla.run-waterfall: *run-task
|
||||
|
||||
versions:
|
||||
checkstyle: 9.0
|
||||
checkerQual: 3.22.1
|
||||
errorprone: 2.9.0
|
||||
checkstyle: 10.5.0
|
||||
checkerQual: 3.28.0
|
||||
errorprone: 2.16
|
||||
geantyref: 1.3.13
|
||||
jmh: 1.27
|
||||
jmh: 1.36
|
||||
apiguardian: 1.1.2
|
||||
|
||||
# integration
|
||||
guice: 4.2.3
|
||||
|
||||
# kotlin
|
||||
kotlin: &kotlin 1.5.31
|
||||
dokka: *kotlin
|
||||
kotlin: 1.7.22
|
||||
dokka: 1.7.20
|
||||
coroutines: 1.5.2
|
||||
ktlint: 0.47.1
|
||||
|
||||
# discord
|
||||
javacord: 3.1.1
|
||||
|
|
@ -53,17 +54,17 @@ versions:
|
|||
fabricPermissionsApi: 0.2-SNAPSHOT
|
||||
|
||||
# testing
|
||||
jupiterEngine : 5.8.2
|
||||
mockitoCore : 4.1.0
|
||||
mockitoKotlin : 4.0.0
|
||||
mockitoJupiter: 4.5.1
|
||||
jupiterEngine : 5.9.1
|
||||
mockitoCore : 4.9.0
|
||||
mockitoKotlin : 4.1.0
|
||||
mockitoJupiter: 4.9.0
|
||||
truth : 1.1.3
|
||||
compileTesting: 0.19
|
||||
compileTesting: "0.20"
|
||||
|
||||
# build-logic
|
||||
indra: 2.1.1
|
||||
gradleTestLogger: 3.1.0
|
||||
gradleErrorprone: 2.0.2
|
||||
indra: 3.0.1
|
||||
gradleTestLogger: 3.2.0
|
||||
gradleErrorprone: 3.0.1
|
||||
spotless: *spotless
|
||||
revapi: 1.7.0
|
||||
|
||||
|
|
|
|||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
|
|
@ -1,5 +1,6 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
|
||||
networkTimeout=10000
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
|||
12
gradlew
vendored
12
gradlew
vendored
|
|
@ -55,7 +55,7 @@
|
|||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
|
|
@ -80,10 +80,10 @@ do
|
|||
esac
|
||||
done
|
||||
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
APP_NAME="Gradle"
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
# 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"'
|
||||
|
|
@ -143,12 +143,16 @@ fi
|
|||
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
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
|
|
|
|||
1
gradlew.bat
vendored
1
gradlew.bat
vendored
|
|
@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal
|
|||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
|
|
|
|||
|
|
@ -2,16 +2,76 @@ enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
|
|||
|
||||
pluginManagement {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
maven("https://maven.fabricmc.net/")
|
||||
maven("https://maven.quiltmc.org/repository/release/")
|
||||
maven("https://repo.jpenilla.xyz/snapshots/")
|
||||
maven("https://maven.fabricmc.net/") {
|
||||
name = "fabric"
|
||||
}
|
||||
maven("https://maven.quiltmc.org/repository/release/") {
|
||||
name = "quiltReleases"
|
||||
mavenContent { releasesOnly() }
|
||||
}
|
||||
maven("https://repo.jpenilla.xyz/snapshots/") {
|
||||
name = "jmpSnapshots"
|
||||
mavenContent { snapshotsOnly() }
|
||||
}
|
||||
}
|
||||
includeBuild("build-logic")
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("ca.stellardrift.polyglot-version-catalogs") version "5.0.1"
|
||||
id("ca.stellardrift.polyglot-version-catalogs") version "6.0.1"
|
||||
id("quiet-fabric-loom") version "1.0-SNAPSHOT"
|
||||
}
|
||||
|
||||
dependencyResolutionManagement {
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven("https://oss.sonatype.org/content/repositories/snapshots/") {
|
||||
name = "sonatypeOssSnapshots"
|
||||
mavenContent { snapshotsOnly() }
|
||||
}
|
||||
/* The Minecraft repository, used for cloud-brigadier */
|
||||
maven("https://libraries.minecraft.net/") {
|
||||
name = "minecraftLibraries"
|
||||
mavenContent {
|
||||
releasesOnly()
|
||||
includeGroup("com.mojang")
|
||||
includeGroup("net.minecraft")
|
||||
}
|
||||
}
|
||||
/* The paper repository, used for cloud-paper */
|
||||
maven("https://repo.papermc.io/repository/maven-public/")
|
||||
/* Used for cloud-cloudburst */
|
||||
maven("https://repo.opencollab.dev/maven-snapshots/") {
|
||||
name = "cloudburst"
|
||||
mavenContent {
|
||||
snapshotsOnly()
|
||||
includeGroup("org.cloudburstmc")
|
||||
}
|
||||
}
|
||||
/* The current Fabric repository */
|
||||
maven("https://maven.fabricmc.net/") {
|
||||
name = "fabric"
|
||||
mavenContent { includeGroup("net.fabricmc") }
|
||||
}
|
||||
/* The current Sponge repository */
|
||||
maven("https://repo.spongepowered.org/repository/maven-public/") {
|
||||
name = "sponge"
|
||||
mavenContent { includeGroup("org.spongepowered") }
|
||||
}
|
||||
/* JitPack, used for random dependencies */
|
||||
maven("https://jitpack.io") {
|
||||
name = "jitpack"
|
||||
content { includeGroupByRegex("com\\.github\\..*") }
|
||||
}
|
||||
/* JDA's maven repository for cloud-jda */
|
||||
maven("https://m2.dv8tion.net/releases") {
|
||||
name = "dv8tion"
|
||||
mavenContent { releasesOnly() }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "cloud"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue