Best solution for forge having awful dependency management system? Just get rid off those dependencies!

Forge-1.14.4
Szum123321 2020-04-14 20:55:33 +02:00
parent c1f742e88f
commit 4dbfb8f3d2
3 changed files with 19 additions and 16 deletions

View File

@ -13,17 +13,12 @@ apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse' apply plugin: 'eclipse'
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
version = '1.1.1-L-1.14.4' version = '1.1.2-1.14.4'
group = 'szum123321.textile_backup' group = 'szum123321.textile_backup'
archivesBaseName = 'textile_backup[FORGE]' archivesBaseName = 'textile_backup[FORGE]'
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
configurations {
shade
compile.extendsFrom shade
}
minecraft { minecraft {
mappings channel: 'snapshot', version: '20190719-1.14.3' mappings channel: 'snapshot', version: '20190719-1.14.3'
@ -84,17 +79,16 @@ repositories {
mavenCentral() mavenCentral()
} }
configurations {
shade
compile.extendsFrom shade
}
dependencies { dependencies {
minecraft 'net.minecraftforge:forge:1.14.4-28.2.0' minecraft 'net.minecraftforge:forge:1.14.4-28.2.0'
compile "blue.endless:jankson:1.2.0" compile "blue.endless:jankson:1.2.0"
shade "blue.endless:jankson:1.2.0" shade "blue.endless:jankson:1.2.0"
compile "org.apache.commons:commons-compress:1.9"
shade "org.apache.commons:commons-compress:1.9"
compile "org.apache.commons:commons-io:1.3.2"
shade "org.apache.commons:commons-io:1.3.2"
} }
// Example for how to get properties into the manifest for reading by the runtime.. // Example for how to get properties into the manifest for reading by the runtime..

View File

@ -20,7 +20,6 @@ package szum123321.textile_backup.core;
import net.minecraft.command.CommandSource; import net.minecraft.command.CommandSource;
import szum123321.textile_backup.TextileBackup; import szum123321.textile_backup.TextileBackup;
import org.apache.commons.compress.utils.IOUtils;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
@ -49,7 +48,16 @@ public class ZipCompressor {
ZipEntry entry = new ZipEntry(file.getAbsolutePath().substring(rootPathLength)); ZipEntry entry = new ZipEntry(file.getAbsolutePath().substring(rootPathLength));
arc.putNextEntry(entry); arc.putNextEntry(entry);
entry.setSize(file.length()); entry.setSize(file.length());
IOUtils.copy(new FileInputStream(file), arc); //I HATE FORGE!
//IOUtils.copy(new FileInputStream(file), arc);
FileInputStream fis = new FileInputStream(file);
byte[] bytes = new byte[1024];
int length;
while((length = fis.read(bytes)) >= 0) {
arc.write(bytes, 0, length);
}
fis.close();
arc.closeEntry(); arc.closeEntry();
}catch (IOException e){ }catch (IOException e){
TextileBackup.logger.error(e.getMessage()); TextileBackup.logger.error(e.getMessage());

View File

@ -2,9 +2,10 @@
"homepage": "https://www.curseforge.com/minecraft/mc-mods/textile-backup", "homepage": "https://www.curseforge.com/minecraft/mc-mods/textile-backup",
"promos": { "promos": {
"1.14.4-latest": "1.1.1-1.14.4", "1.14.4-latest": "1.1.1-1.14.4",
"1.14.4-recommended": "1.1.1-1.14.4" "1.14.4-recommended": "1.1.2-1.14.4"
}, },
"1.14.4": { "1.14.4": {
"1.1.1": "Initial release for forge" "1.1.1-1.14.4": "Initial release for forge",
"1.1.2-1.14.4": "Fixed missing library."
} }
} }