1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-06-30 09:03:20 +00:00

Generic dependency update

A couple of changes caused by checkstyle being a little more strict.
This commit is contained in:
Jonathan Coates 2023-08-31 19:14:37 +01:00
parent 8fb1dd346c
commit 5dd6b9a637
No known key found for this signature in database
GPG Key ID: B9E431FF07C98D06
22 changed files with 2104 additions and 528 deletions

View File

@ -11,6 +11,7 @@ plugins {
alias(libs.plugins.githubRelease) alias(libs.plugins.githubRelease)
id("org.jetbrains.gradle.plugin.idea-ext") id("org.jetbrains.gradle.plugin.idea-ext")
id("cc-tweaked") id("cc-tweaked")
id("com.github.ben-manes.versions") version "0.47.0"
} }
val isUnstable = project.properties["isUnstable"] == "true" val isUnstable = project.properties["isUnstable"] == "true"

View File

@ -52,7 +52,7 @@ dependencies {
implementation(libs.forgeGradle) implementation(libs.forgeGradle)
implementation(libs.librarian) implementation(libs.librarian)
implementation(libs.minotaur) implementation(libs.minotaur)
implementation(libs.quiltflower) implementation(libs.vineflower)
implementation(libs.vanillaGradle) implementation(libs.vanillaGradle)
} }

View File

@ -12,7 +12,7 @@ import cc.tweaked.gradle.MinecraftConfigurations
plugins { plugins {
`java-library` `java-library`
id("fabric-loom") id("fabric-loom")
id("io.github.juuxel.loom-quiltflower") id("io.github.juuxel.loom-vineflower")
id("cc-tweaked.java-convention") id("cc-tweaked.java-convention")
} }

View File

@ -191,6 +191,7 @@ spotless {
val ktlintConfig = mapOf( val ktlintConfig = mapOf(
"ktlint_standard_no-wildcard-imports" to "disabled", "ktlint_standard_no-wildcard-imports" to "disabled",
"ktlint_standard_class-naming" to "disabled",
"ij_kotlin_allow_trailing_comma" to "true", "ij_kotlin_allow_trailing_comma" to "true",
"ij_kotlin_allow_trailing_comma_on_call_site" to "true", "ij_kotlin_allow_trailing_comma_on_call_site" to "true",
) )

View File

@ -12,12 +12,12 @@ fabric-loader = "0.14.21"
forge = "47.1.0" forge = "47.1.0"
forgeSpi = "6.0.0" forgeSpi = "6.0.0"
mixin = "0.8.5" mixin = "0.8.5"
parchment = "2023.06.26" parchment = "2023.08.20"
parchmentMc = "1.19.4" parchmentMc = "1.20.1"
# Normal dependencies # Normal dependencies
asm = "9.3" asm = "9.3"
autoService = "1.0.1" autoService = "1.1.1"
checkerFramework = "3.32.0" checkerFramework = "3.32.0"
cobalt = "0.7.3" cobalt = "0.7.3"
cobalt-next = "0.7.4" # Not a real version, used to constrain the version we accept. cobalt-next = "0.7.4" # Not a real version, used to constrain the version we accept.
@ -29,7 +29,7 @@ jzlib = "1.1.3"
kotlin = "1.8.10" kotlin = "1.8.10"
kotlin-coroutines = "1.6.4" kotlin-coroutines = "1.6.4"
netty = "4.1.82.Final" netty = "4.1.82.Final"
nightConfig = "3.6.5" nightConfig = "3.6.7"
slf4j = "1.7.36" slf4j = "1.7.36"
# Minecraft mods # Minecraft mods
@ -45,30 +45,30 @@ rubidium = "0.6.1"
sodium = "mc1.20-0.4.10" sodium = "mc1.20-0.4.10"
# Testing # Testing
byteBuddy = "1.14.2" byteBuddy = "1.14.7"
hamcrest = "2.2" hamcrest = "2.2"
jqwik = "1.7.2" jqwik = "1.7.4"
junit = "5.9.2" junit = "5.10.0"
# Build tools # Build tools
cctJavadoc = "1.8.0" cctJavadoc = "1.8.0"
checkstyle = "10.3.4" checkstyle = "10.12.3"
curseForgeGradle = "1.0.14" curseForgeGradle = "1.0.14"
errorProne-core = "2.18.0" errorProne-core = "2.21.1"
errorProne-plugin = "3.0.1" errorProne-plugin = "3.1.0"
fabric-loom = "1.3.7" fabric-loom = "1.3.7"
forgeGradle = "6.0.8" forgeGradle = "6.0.8"
githubRelease = "2.2.12" githubRelease = "2.4.1"
ideaExt = "1.1.6" ideaExt = "1.1.7"
illuaminate = "0.1.0-40-g975cbc3" illuaminate = "0.1.0-40-g975cbc3"
librarian = "1.+" librarian = "1.+"
minotaur = "2.+" minotaur = "2.+"
mixinGradle = "0.7.+" mixinGradle = "0.7.+"
nullAway = "0.9.9" nullAway = "0.9.9"
quiltflower = "1.10.0" spotless = "6.21.0"
spotless = "6.17.0"
taskTree = "2.1.1" taskTree = "2.1.1"
vanillaGradle = "0.2.1-SNAPSHOT" vanillaGradle = "0.2.1-SNAPSHOT"
vineflower = "1.11.0"
[libraries] [libraries]
# Normal dependencies # Normal dependencies
@ -137,9 +137,9 @@ kotlin-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.
librarian = { module = "org.parchmentmc:librarian", version.ref = "librarian" } librarian = { module = "org.parchmentmc:librarian", version.ref = "librarian" }
minotaur = { module = "com.modrinth.minotaur:Minotaur", version.ref = "minotaur" } minotaur = { module = "com.modrinth.minotaur:Minotaur", version.ref = "minotaur" }
nullAway = { module = "com.uber.nullaway:nullaway", version.ref = "nullAway" } nullAway = { module = "com.uber.nullaway:nullaway", version.ref = "nullAway" }
quiltflower = { module = "io.github.juuxel:loom-quiltflower", version.ref = "quiltflower" }
spotless = { module = "com.diffplug.spotless:spotless-plugin-gradle", version.ref = "spotless" } spotless = { module = "com.diffplug.spotless:spotless-plugin-gradle", version.ref = "spotless" }
vanillaGradle = { module = "org.spongepowered:vanillagradle", version.ref = "vanillaGradle" } vanillaGradle = { module = "org.spongepowered:vanillagradle", version.ref = "vanillaGradle" }
vineflower = { module = "io.github.juuxel:loom-vineflower", version.ref = "vineflower" }
[plugins] [plugins]
forgeGradle = { id = "net.minecraftforge.gradle", version.ref = "forgeGradle" } forgeGradle = { id = "net.minecraftforge.gradle", version.ref = "forgeGradle" }

2554
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -15,15 +15,15 @@
"@rollup/plugin-url": "^8.0.1", "@rollup/plugin-url": "^8.0.1",
"@types/glob": "^8.1.0", "@types/glob": "^8.1.0",
"@types/react-dom": "^18.0.5", "@types/react-dom": "^18.0.5",
"glob": "^9.3.0", "glob": "^10.3.4",
"react-dom": "^18.1.0", "react-dom": "^18.1.0",
"react": "^18.1.0", "react": "^18.1.0",
"rehype-highlight": "^6.0.0", "rehype-highlight": "^6.0.0",
"rehype-react": "^7.1.1", "rehype-react": "^7.1.1",
"rehype": "^12.0.1", "rehype": "^13.0.1",
"requirejs": "^2.3.6", "requirejs": "^2.3.6",
"rollup": "^3.19.1", "rollup": "^3.19.1",
"ts-node": "^10.8.0", "ts-node": "^10.8.0",
"typescript": "^4.0.5" "typescript": "^5.2.2"
} }
} }

View File

@ -17,7 +17,7 @@
import javax.annotation.Nullable; import javax.annotation.Nullable;
class TurtleUpgradeModellers { final class TurtleUpgradeModellers {
private static final Transformation leftTransform = getMatrixFor(-0.4065f); private static final Transformation leftTransform = getMatrixFor(-0.4065f);
private static final Transformation rightTransform = getMatrixFor(0.4065f); private static final Transformation rightTransform = getMatrixFor(0.4065f);
@ -35,7 +35,7 @@ private static Transformation getMatrixFor(float offset) {
static final TurtleUpgradeModeller<ITurtleUpgrade> UPGRADE_ITEM = new UpgradeItemModeller(); static final TurtleUpgradeModeller<ITurtleUpgrade> UPGRADE_ITEM = new UpgradeItemModeller();
private static class UpgradeItemModeller implements TurtleUpgradeModeller<ITurtleUpgrade> { private static final class UpgradeItemModeller implements TurtleUpgradeModeller<ITurtleUpgrade> {
@Override @Override
public TransformedModel getModel(ITurtleUpgrade upgrade, @Nullable ITurtleAccess turtle, TurtleSide side) { public TransformedModel getModel(ITurtleUpgrade upgrade, @Nullable ITurtleAccess turtle, TurtleSide side) {
return getModel(turtle == null ? upgrade.getCraftingItem() : upgrade.getUpgradeItem(turtle.getUpgradeNBTData(side)), side); return getModel(turtle == null ? upgrade.getCraftingItem() : upgrade.getUpgradeItem(turtle.getUpgradeNBTData(side)), side);

View File

@ -1,6 +1,6 @@
// SPDX-FileCopyrightText: 2021 The CC: Tweaked Developers // SPDX-FileCopyrightText: 2021 The CC: Tweaked Developers
// //
// SPDX-License-Identifier: LicenseRef-CCPL // SPDX-License-Identifier: MPL-2.0
package dan200.computercraft.client.gui; package dan200.computercraft.client.gui;

View File

@ -47,7 +47,7 @@ public interface Provider {
Optional<ShaderMod> get(); Optional<ShaderMod> get();
} }
private static class Storage { private static final class Storage {
static final ShaderMod INSTANCE = ServiceLoader.load(Provider.class) static final ShaderMod INSTANCE = ServiceLoader.load(Provider.class)
.stream() .stream()
.flatMap(x -> x.get().get().stream()) .flatMap(x -> x.get().get().stream())

View File

@ -24,7 +24,7 @@ final class WiredNetworkImpl implements WiredNetwork {
nodes.add(node); nodes.add(node);
} }
private WiredNetworkImpl(HashSet<WiredNodeImpl> nodes) { private WiredNetworkImpl(Set<WiredNodeImpl> nodes) {
this.nodes = nodes; this.nodes = nodes;
} }
@ -375,7 +375,7 @@ private static WiredNodeImpl checkNode(WiredNode node) {
} }
} }
private static HashSet<WiredNodeImpl> reachableNodes(WiredNodeImpl start) { private static Set<WiredNodeImpl> reachableNodes(WiredNodeImpl start) {
Queue<WiredNodeImpl> enqueued = new ArrayDeque<>(); Queue<WiredNodeImpl> enqueued = new ArrayDeque<>();
var reachable = new HashSet<WiredNodeImpl>(); var reachable = new HashSet<WiredNodeImpl>();

View File

@ -141,7 +141,7 @@ private void add(String name, Metric field, List<MBeanAttributeInfo> attributes)
} }
} }
private static class Counter { private static final class Counter {
final AtomicLong value = new AtomicLong(); final AtomicLong value = new AtomicLong();
final AtomicLong count = new AtomicLong(); final AtomicLong count = new AtomicLong();
} }

View File

@ -116,6 +116,7 @@ private static List<Map<String, Object>> getAllEnchants(ItemStack stack, int hid
* @param enchants The enchantment map to add it to. * @param enchants The enchantment map to add it to.
* @see EnchantmentHelper * @see EnchantmentHelper
*/ */
@SuppressWarnings("NonApiType")
private static void addEnchantments(ListTag rawEnchants, ArrayList<Map<String, Object>> enchants) { private static void addEnchantments(ListTag rawEnchants, ArrayList<Map<String, Object>> enchants) {
if (rawEnchants.isEmpty()) return; if (rawEnchants.isEmpty()) return;

View File

@ -69,7 +69,7 @@ public static PermissionRegistry create() {
.orElseGet(DefaultPermissionRegistry::new); .orElseGet(DefaultPermissionRegistry::new);
} }
private static class DefaultPermissionRegistry extends PermissionRegistry { private static final class DefaultPermissionRegistry extends PermissionRegistry {
@Override @Override
public Predicate<CommandSourceStack> registerCommand(String command, UserLevel fallback) { public Predicate<CommandSourceStack> registerCommand(String command, UserLevel fallback) {
checkNotFrozen(); checkNotFrozen();

View File

@ -35,7 +35,7 @@
public final class DiskDriveBlockEntity extends AbstractContainerBlockEntity { public final class DiskDriveBlockEntity extends AbstractContainerBlockEntity {
private static final String NBT_ITEM = "Item"; private static final String NBT_ITEM = "Item";
private static class MountInfo { private static final class MountInfo {
@Nullable @Nullable
String mountPath; String mountPath;
} }

View File

@ -36,7 +36,7 @@
public class CableBlockEntity extends BlockEntity { public class CableBlockEntity extends BlockEntity {
private static final String NBT_PERIPHERAL_ENABLED = "PeripheralAccess"; private static final String NBT_PERIPHERAL_ENABLED = "PeripheralAccess";
private class CableElement extends WiredModemElement { private final class CableElement extends WiredModemElement {
@Override @Override
public Level getLevel() { public Level getLevel() {
return CableBlockEntity.this.getLevel(); return CableBlockEntity.this.getLevel();

View File

@ -239,7 +239,7 @@ private static void setSignText(Level world, BlockEntity tile, String message) {
world.sendBlockUpdated(tile.getBlockPos(), tile.getBlockState(), tile.getBlockState(), Block.UPDATE_ALL); world.sendBlockUpdated(tile.getBlockPos(), tile.getBlockState(), tile.getBlockState(), Block.UPDATE_ALL);
} }
private static class ErrorMessage { private static final class ErrorMessage {
@Nullable @Nullable
String message; String message;
} }

View File

@ -353,7 +353,7 @@ public Map<String, IPeripheral> allPeripherals() {
} }
} }
private static class NetworkPeripheral implements IPeripheral { private static final class NetworkPeripheral implements IPeripheral {
@Override @Override
public String getType() { public String getType() {
return "test"; return "test";

View File

@ -13,13 +13,13 @@
* <p> * <p>
* This is useful for emulators, where we'll never make any main thread calls. * This is useful for emulators, where we'll never make any main thread calls.
*/ */
public class NoWorkMainThreadScheduler implements MainThreadScheduler { public final class NoWorkMainThreadScheduler implements MainThreadScheduler {
@Override @Override
public Executor createExecutor(MetricsObserver observer) { public Executor createExecutor(MetricsObserver observer) {
return new ExecutorImpl(); return new ExecutorImpl();
} }
private static class ExecutorImpl implements Executor { private static final class ExecutorImpl implements Executor {
@Override @Override
public boolean enqueue(Runnable task) { public boolean enqueue(Runnable task) {
throw new IllegalStateException("Cannot schedule tasks"); throw new IllegalStateException("Cannot schedule tasks");

View File

@ -49,7 +49,7 @@ public int moveTo(ContainerTransfer destination, int maxAmount) {
* *
* @param <T> The type of the object to accept. * @param <T> The type of the object to accept.
*/ */
private static class GatePredicate<T> implements Predicate<T> { private static final class GatePredicate<T> implements Predicate<T> {
private @Nullable T instance = null; private @Nullable T instance = null;
@Override @Override
@ -67,7 +67,7 @@ boolean hasItem() {
} }
} }
private static class SlottedImpl extends FabricContainerTransfer implements ContainerTransfer.Slotted { private static final class SlottedImpl extends FabricContainerTransfer implements ContainerTransfer.Slotted {
private final SlottedStorage<ItemVariant> storage; private final SlottedStorage<ItemVariant> storage;
SlottedImpl(SlottedStorage<ItemVariant> storage) { SlottedImpl(SlottedStorage<ItemVariant> storage) {

View File

@ -32,7 +32,7 @@ enum class Side { CLIENT, SERVER, BOTH }
) )
class SideChecker : BugChecker(), BugChecker.IdentifierTreeMatcher, BugChecker.MemberSelectTreeMatcher { class SideChecker : BugChecker(), BugChecker.IdentifierTreeMatcher, BugChecker.MemberSelectTreeMatcher {
override fun matchIdentifier(tree: IdentifierTree, state: VisitorState): Description { override fun matchIdentifier(tree: IdentifierTree, state: VisitorState): Description {
val sym = ASTHelpers.getSymbol(tree) val sym = ASTHelpers.getSymbol(tree)!!
return when (sym.getKind()) { return when (sym.getKind()) {
ElementKind.LOCAL_VARIABLE, ElementKind.TYPE_PARAMETER -> Description.NO_MATCH ElementKind.LOCAL_VARIABLE, ElementKind.TYPE_PARAMETER -> Description.NO_MATCH
else -> report(tree, state) else -> report(tree, state)

View File

@ -4,7 +4,6 @@
# #
# SPDX-License-Identifier: MPL-2.0 # SPDX-License-Identifier: MPL-2.0
""" """
Upgrades textures to newer resource pack formats. Upgrades textures to newer resource pack formats.