Allow running without a POMF version set, and remove cyclic dep of fabric base to allow building for now.
parent
017a7a3688
commit
2eaae5be44
12
build.gradle
12
build.gradle
|
@ -15,7 +15,7 @@ apply from: 'https://github.com/FabricMC/fabric-docs/raw/master/gradle/license.g
|
|||
|
||||
group = 'net.fabricmc'
|
||||
archivesBaseName = project.name.toLowerCase()
|
||||
version = '0.0.5-SNAPSHOT'
|
||||
version = '0.0.6-SNAPSHOT'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
@ -60,7 +60,15 @@ dependencies {
|
|||
shade 'cuchaz:enigma:0.11.0.19:lib'
|
||||
shade 'net.fabricmc:tiny-remapper:+'
|
||||
|
||||
compile 'net.fabricmc:fabric-base:16w38a-0.0.4-SNAPSHOT'
|
||||
//Always fun when your dep needs the tool to build, but the tool needs the dep.
|
||||
//compile 'net.fabricmc:fabric-base:16w38a-0.0.4-SNAPSHOT'
|
||||
|
||||
shade('org.spongepowered:mixin:0.6-SNAPSHOT') {
|
||||
exclude module: 'launchwrapper'
|
||||
exclude module: 'guava'
|
||||
}
|
||||
shade 'org.apache.commons:commons-lang3:3.5'
|
||||
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
|
|
@ -253,8 +253,11 @@ public class AbstractPlugin implements Plugin<Project> {
|
|||
|
||||
project.getTasks().getByName("build").doLast(task -> {
|
||||
project.getLogger().lifecycle(":remapping mods");
|
||||
LoomGradleExtension extension = project.getExtensions().getByType(LoomGradleExtension.class);
|
||||
try {
|
||||
ModRemapper.remap(project);
|
||||
if(extension.hasPomf()){
|
||||
ModRemapper.remap(project);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
|
@ -56,4 +56,8 @@ public class LoomGradleExtension {
|
|||
}
|
||||
return userCache;
|
||||
}
|
||||
|
||||
public boolean hasPomf(){
|
||||
return pomfVersion != null && !pomfVersion.isEmpty();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,12 +72,12 @@ public class DownloadTask extends DefaultTask {
|
|||
Constants.POMF_DIR.get(extension).mkdir();
|
||||
}
|
||||
|
||||
if (!Constants.MAPPINGS_ZIP.get(extension).exists()) {
|
||||
if (!Constants.MAPPINGS_ZIP.get(extension).exists() && extension.hasPomf()) {
|
||||
this.getLogger().lifecycle(":downloading mappings");
|
||||
FileUtils.copyURLToFile(new URL("http://modmuss50.me:8080/job/pomf/" + extension.version + "/" + extension.pomfVersion + "/artifact/build/libs/pomf-enigma-" + extension.version + "." + extension.pomfVersion + ".zip"), Constants.MAPPINGS_ZIP.get(extension));
|
||||
}
|
||||
|
||||
if (!Constants.MAPPINGS_TINY.get(extension).exists()) {
|
||||
if (!Constants.MAPPINGS_TINY.get(extension).exists() && extension.hasPomf()) {
|
||||
if (!Constants.MAPPINGS_TINY_GZ.get(extension).exists()) {
|
||||
getLogger().lifecycle(":downloading tiny mappings");
|
||||
FileUtils.copyURLToFile(new URL("http://modmuss50.me:8080/job/pomf/" + extension.version + "/" + extension.pomfVersion + "/artifact/build/libs/pomf-tiny-" + extension.version + "." + extension.pomfVersion + ".gz"), Constants.MAPPINGS_TINY_GZ.get(extension));
|
||||
|
|
|
@ -49,6 +49,11 @@ public class MapJarsTask extends DefaultTask {
|
|||
public void mapJars() throws IOException, MappingParseException {
|
||||
LoomGradleExtension extension = this.getProject().getExtensions().getByType(LoomGradleExtension.class);
|
||||
if (!Constants.MINECRAFT_MAPPED_JAR.get(extension).exists()) {
|
||||
if(!extension.hasPomf()){
|
||||
this.getLogger().lifecycle("POMF version not set, skipping mapping!");
|
||||
FileUtils.copyFile(Constants.MINECRAFT_MERGED_JAR.get(extension), Constants.MINECRAFT_MAPPED_JAR.get(extension));
|
||||
return;
|
||||
}
|
||||
this.getLogger().lifecycle(":unpacking mappings");
|
||||
if (!Constants.MAPPINGS_DIR.get(extension).exists()) {
|
||||
ZipUtil.unpack(Constants.MAPPINGS_ZIP.get(extension), Constants.MAPPINGS_DIR.get(extension));
|
||||
|
|
|
@ -24,11 +24,9 @@
|
|||
|
||||
package net.fabricmc.loom.util.proccessing;
|
||||
|
||||
import net.fabricmc.base.util.mixin.MixinPrebaker;
|
||||
import net.fabricmc.loom.LoomGradleExtension;
|
||||
import net.fabricmc.loom.task.ProcessModsTask;
|
||||
import net.fabricmc.loom.util.Constants;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.gradle.api.Project;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -48,8 +46,8 @@ public class PreBakeMixins {
|
|||
}
|
||||
project.getLogger().lifecycle(":preBaking mixins");
|
||||
ProcessModsTask.addFile(Constants.MINECRAFT_MAPPED_JAR.get(extension), this);
|
||||
LogManager.getFormatterLogger("test");
|
||||
MixinPrebaker.main(args);
|
||||
//LogManager.getFormatterLogger("test");
|
||||
// MixinPrebaker.main(args);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue