Patch fabric api to fix loom deprecations
parent
2bdeb869ab
commit
ffaf893716
|
@ -46,7 +46,7 @@ class FabricAPITest extends Specification implements GradleProjectTestTrait {
|
|||
repo: "https://github.com/FabricMC/fabric.git",
|
||||
commit: "fc40aa9d88e9457957bdf3f8cec9698846828cd3",
|
||||
version: version,
|
||||
warningMode: "all" // TODO remove once api has updated to 0.10
|
||||
patch: "fabric_api"
|
||||
)
|
||||
|
||||
// Set the version to something constant
|
||||
|
|
|
@ -61,13 +61,23 @@ trait GradleProjectTestTrait {
|
|||
return
|
||||
}
|
||||
|
||||
if (options["repo"]) {
|
||||
if (options.repo) {
|
||||
String repo = options.repo
|
||||
String commit = options.commit
|
||||
|
||||
exec(projectDir, "git", "clone", repo, ".")
|
||||
exec(projectDir, "git", "checkout", commit)
|
||||
|
||||
if (options.patch) {
|
||||
def patchFile = new File("src/test/resources/patches/${options.patch}.patch")
|
||||
|
||||
if (!patchFile.exists()) {
|
||||
throw new FileNotFoundException("Could not find patch file at: " + patchFile.absolutePath)
|
||||
}
|
||||
|
||||
exec(projectDir, "git", "apply", patchFile.absolutePath)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
diff --git a/build.gradle b/build.gradle
|
||||
--- a/build.gradle (revision fc40aa9d88e9457957bdf3f8cec9698846828cd3)
|
||||
+++ b/build.gradle (date 1630855787420)
|
||||
@@ -270,13 +270,7 @@
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
- artifact(remapMavenJar) {
|
||||
- builtBy remapMavenJar
|
||||
- }
|
||||
-
|
||||
- artifact(sourcesJar) {
|
||||
- builtBy remapSourcesJar
|
||||
- }
|
||||
+ from components.java
|
||||
|
||||
artifact javadocJar
|
||||
|
Loading…
Reference in New Issue