mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-03-28 04:07:01 -05:00
Fix FabricAPITest
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user