1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-08-30 17:17:55 +00:00

A few more gametests, update to Gradle 8.12

Okay, listen. I started writing a few more gametests (see #1682), and
then thought I'd do a cheeky Gradle update. However, that broke
vanilla-extract[^1], and also triggered a load of deprecation warnings,
and at that point it was too late to separate the too.

[^1]: 8975ed5a7b
This commit is contained in:
Jonathan Coates
2025-01-12 18:26:51 +00:00
parent 0b389e04b0
commit f881c0ced0
30 changed files with 757 additions and 195 deletions

View File

@@ -31,10 +31,10 @@ fun addRemappedConfiguration(name: String) {
}
val capitalName = name.replaceFirstChar { it.titlecase(Locale.ROOT) }
loom.addRemapConfiguration("mod$capitalName") {
onCompileClasspath.set(false)
onRuntimeClasspath.set(true)
sourceSet.set(ourSourceSet)
targetConfigurationName.set(name)
onCompileClasspath = false
onRuntimeClasspath = true
sourceSet = ourSourceSet
targetConfigurationName = name
}
configurations.create(name) {
isCanBeConsumed = false
@@ -107,8 +107,8 @@ dependencies {
}
loom {
accessWidenerPath.set(project(":common").file("src/main/resources/computercraft.accesswidener"))
mixin.defaultRefmapName.set("computercraft.refmap.json")
accessWidenerPath = project(":common").file("src/main/resources/computercraft.accesswidener")
mixin.defaultRefmapName = "computercraft.refmap.json"
mods {
register("computercraft") {
@@ -285,7 +285,7 @@ tasks.register("checkClient") {
}
modPublishing {
output.set(tasks.remapJar)
output = tasks.remapJar
}
tasks.withType(GenerateModuleMetadata::class).configureEach { isEnabled = false }

View File

@@ -26,7 +26,7 @@ public class TestMod implements ModInitializer, ClientModInitializer {
var phase = new ResourceLocation(ComputerCraftAPI.MOD_ID, "test_mod");
ServerLifecycleEvents.SERVER_STARTED.addPhaseOrdering(Event.DEFAULT_PHASE, phase);
ServerLifecycleEvents.SERVER_STARTED.register(phase, TestHooks::onServerStarted);
CommandRegistrationCallback.EVENT.register((dispatcher, registryAccess, environment) -> CCTestCommand.register(dispatcher));
CommandRegistrationCallback.EVENT.register((dispatcher, buildContext, environment) -> CCTestCommand.register(dispatcher, buildContext));
PlayerBlockBreakEvents.BEFORE.register((level, player, pos, state, blockEntity) -> !TestHooks.onBeforeDestroyBlock(level, pos, state));
TestHooks.loadTests(GameTestRegistry::register);