1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-10-24 02:17:39 +00:00

Update to Gradle 8.x

- Update to Loom 1.2 and FG 6.0. ForgeGradle has changed how it
   generates the runXyz tasks, which makes running our tests much
   harder. I've raised an issue upstream, but for now we do some nasty
   poking of internals.

 - Fix Sodium/Iris tests. Loom 1.1 changed how remapped configurations
   are generated - we create a dummy source set and associate the
   remapped configuration with that. All nasty stuff.

 - Publish the common library. I'm not a fan of this, but given how much
   internals I'm poking elsewhere, should probably get off my high
   horse.

 - Add renderdoc support to the client gametests, enabled with
   -Prenderdoc.
This commit is contained in:
Jonathan Coates
2023-06-29 20:10:17 +01:00
parent 7eb3b691da
commit f5b16261cc
12 changed files with 113 additions and 27 deletions

View File

@@ -35,8 +35,6 @@ minecraft {
property("forge.logging.markers", "REGISTRIES")
property("forge.logging.console.level", "debug")
forceExit = false
mods.register("computercraft") {
cct.sourceDirectories.get().forEach {
if (it.classes) sources(it.sourceSet)
@@ -262,11 +260,7 @@ val runGametest by tasks.registering(JavaExec::class) {
dependsOn("cleanRunGametest")
usesService(MinecraftRunnerService.get(gradle))
// Copy from runGameTestServer. We do it in this slightly odd way as runGameTestServer
// isn't created until the task is configured (which is no good for us).
val exec = tasks.getByName<JavaExec>("runGameTestServer")
dependsOn(exec.dependsOn)
exec.copyToFull(this)
setRunConfig(minecraft.runs["gameTestServer"])
systemProperty("cctest.gametest-report", project.buildDir.resolve("test-results/$name.xml").absolutePath)
}
@@ -275,7 +269,7 @@ tasks.check { dependsOn(runGametest) }
val runGametestClient by tasks.registering(ClientJavaExec::class) {
description = "Runs client-side gametests with no mods"
copyFrom("runTestClient")
setRunConfig(minecraft.runs["testClient"])
tags("client")
}
cct.jacoco(runGametestClient)