Skip to content

Commit a74f4b1

Browse files
authored
Switch to DiffPatch (#710)
* Switch to DiffPatch * Remove deprecated legacy compat. * Use forge published DiffPatch
1 parent 74d291d commit a74f4b1

File tree

18 files changed

+382
-1674
lines changed

18 files changed

+382
-1674
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ wrapper {
7171

7272
dependencies {
7373
commonImplementation gradleApi()
74-
commonImplementation 'com.cloudbees:diff4j:1.3'
7574
commonImplementation 'commons-io:commons-io:2.8.0'
7675
commonImplementation 'com.github.jponge:lzma-java:1.3' // replaces the LZMA binary
7776
commonImplementation 'com.nothome:javaxdelta:2.0.1' // GDIFF implementation for BinPatches
@@ -82,6 +81,7 @@ dependencies {
8281
commonImplementation 'org.apache.maven:maven-artifact:3.6.3'
8382
commonImplementation 'org.apache.httpcomponents:httpclient:4.5.13'
8483
commonImplementation 'net.minecraftforge:srgutils:0.2.13'
84+
commonImplementation 'net.minecraftforge:DiffPatch:2.0.0:all'
8585

8686
mcpImplementation sourceSets.common.output
8787
patcherImplementation sourceSets.mcp.output

src/common/java/net/minecraftforge/gradle/common/diff/ContextualPatch.java

Lines changed: 0 additions & 836 deletions
This file was deleted.

src/common/java/net/minecraftforge/gradle/common/diff/HunkReport.java

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/common/java/net/minecraftforge/gradle/common/diff/LocalContext.java

Lines changed: 0 additions & 38 deletions
This file was deleted.

src/common/java/net/minecraftforge/gradle/common/diff/PatchContextProvider.java

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/common/java/net/minecraftforge/gradle/common/diff/PatchFile.java

Lines changed: 0 additions & 44 deletions
This file was deleted.

src/common/java/net/minecraftforge/gradle/common/diff/PatchUtils.java

Lines changed: 0 additions & 59 deletions
This file was deleted.

src/common/java/net/minecraftforge/gradle/common/diff/ZipContext.java

Lines changed: 0 additions & 140 deletions
This file was deleted.

src/common/java/net/minecraftforge/gradle/common/util/BaseRepo.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
import net.minecraftforge.artifactural.gradle.GradleRepositoryAdapter;
4040

4141
public abstract class BaseRepo implements ArtifactProvider<ArtifactIdentifier> {
42+
43+
public static final boolean DEBUG = Boolean.getBoolean("fg.debugRepo");
44+
4245
private final File cache;
4346
protected final Logger log;
4447
protected final String REPO_NAME = getClass().getSimpleName();
@@ -61,7 +64,7 @@ protected String clean(ArtifactIdentifier art) {
6164
}
6265

6366
protected void debug(String message) {
64-
if (System.getProperty("fg.debugRepo", "false").equals("true"))
67+
if (DEBUG)
6568
this.log.lifecycle(message);
6669
}
6770
protected void info(String message) {

0 commit comments

Comments
 (0)