Fix FabricAPITest

This commit is contained in:
modmuss50
2022-08-24 20:21:31 +01:00
parent e16811eb74
commit e0476d4bdb
4 changed files with 7 additions and 18 deletions

View File

@@ -27,7 +27,7 @@ package net.fabricmc.loom.test
import org.gradle.util.GradleVersion
class LoomTestConstants {
private final static String NIGHTLY_VERSION = "7.6-20220729220941+0000"
private final static String NIGHTLY_VERSION = "7.7-20220823221227+0000"
private final static boolean NIGHTLY_EXISTS = nightlyExists(NIGHTLY_VERSION)
public final static String DEFAULT_GRADLE = GradleVersion.current().getVersion()

View File

@@ -44,7 +44,7 @@ class FabricAPITest extends Specification implements GradleProjectTestTrait {
setup:
def gradle = gradleProject(
repo: "https://github.com/FabricMC/fabric.git",
commit: "417b986df14c7cdd5f16b0a340d28645910f8aa6",
commit: "5f243a8b7849eac4b30cd876a22a127797a1c406",
version: version,
patch: "fabric_api"
)
@@ -52,7 +52,7 @@ class FabricAPITest extends Specification implements GradleProjectTestTrait {
// Set the version to something constant
gradle.buildGradle.text = gradle.buildGradle.text.replace('project.version + "+" + (ENV.GITHUB_RUN_NUMBER ? "" : "local-") + getBranch()', "\"$API_VERSION\"")
def server = ServerRunner.create(gradle.projectDir, "1.19.1")
def server = ServerRunner.create(gradle.projectDir, "1.19.2")
.withMod(gradle.getOutputFile("fabric-api-${API_VERSION}.jar"))
when:
def result = gradle.run(tasks: ["build", "publishToMavenLocal"], args: ["--parallel", "-x", "check", "-x", "runDatagen", "-x", "runGametest"]) // Note: checkstyle does not appear to like being ran in a test runner
@@ -62,11 +62,11 @@ class FabricAPITest extends Specification implements GradleProjectTestTrait {
then:
result.task(":build").outcome == SUCCESS
new File(gradle.mavenLocalDir, "net/fabricmc/fabric-api/fabric-biome-api-v1/9.0.15/fabric-biome-api-v1-9.0.15.jar").exists()
new File(gradle.mavenLocalDir, "net/fabricmc/fabric-api/fabric-biome-api-v1/9.0.15/fabric-biome-api-v1-9.0.15-sources.jar").exists()
new File(gradle.mavenLocalDir, "net/fabricmc/fabric-api/fabric-biome-api-v1/9.0.17/fabric-biome-api-v1-9.0.17.jar").exists()
new File(gradle.mavenLocalDir, "net/fabricmc/fabric-api/fabric-biome-api-v1/9.0.17/fabric-biome-api-v1-9.0.17-sources.jar").exists()
serverResult.successful()
serverResult.output.contains("- fabric $API_VERSION")
serverResult.output.contains("- fabric-api $API_VERSION")
where:
version << STANDARD_TEST_VERSIONS
}

View File

@@ -29,7 +29,7 @@ import groovy.transform.Immutable
import java.util.concurrent.TimeUnit
class ServerRunner {
static final String LOADER_VERSION = "0.14.8"
static final String LOADER_VERSION = "0.14.9"
static final Map<String, String> FABRIC_API_URLS = [
"1.16.5": "https://github.com/FabricMC/fabric/releases/download/0.37.1%2B1.16/fabric-api-0.37.1+1.16.jar",
"1.17.1": "https://github.com/FabricMC/fabric/releases/download/0.37.1%2B1.17/fabric-api-0.37.1+1.17.jar"

View File

@@ -20,14 +20,3 @@ diff --git a/build.gradle b/build.gradle
}
def getBranch() {
@@ -207,10 +197,6 @@
testmodImplementation sourceSets.client.output
}
- loom {
- shareRemapCaches = true
- }
-
tasks.withType(ProcessResources).configureEach {
inputs.property "version", project.version