Skip to content

Commit

Permalink
Add DummyArchiveTask
Browse files Browse the repository at this point in the history
  • Loading branch information
zbx1425 committed Jul 20, 2023
1 parent c810cb4 commit f3a0451
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,30 @@ forgix {
jarLocation = "build/libs/fabric" + "-" + rootProject.mod_version + "+" + minecraft_version + ".jar"
}
}

import org.gradle.api.internal.file.copy.CopyAction;
import org.gradle.api.internal.file.copy.CopyActionProcessingStream;

class DummyArchiveTask extends AbstractArchiveTask {

protected CopyAction createCopyAction() {
return new DummyCopyAction();
}

class DummyCopyAction implements CopyAction {

@Override
WorkResult execute(CopyActionProcessingStream stream) {
return WorkResults.didWork(true);
}
}
}

task dummyForgixOutput(type: DummyArchiveTask) {
// Forgix's mergeJars task doesn't extend AbstractArchiveTask.
// This is to make github.com/teaconmc/longjing happy.
destinationDirectory = file("build/")
archiveBaseName = "WorldComment"
archiveVersion = rootProject.mod_version + "+" + minecraft_version
archiveExtension = "jar"
}

0 comments on commit f3a0451

Please sign in to comment.