Fix mixin pre-baker

This commit is contained in:
modmuss50 2016-10-09 13:18:00 +01:00
parent 3f24ce0289
commit 22f1743a08
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82
4 changed files with 7 additions and 9 deletions

View file

@ -58,8 +58,6 @@ dependencies {
shade 'com.google.guava:guava:19.0'
shade 'net.fabricmc:weave:0.1.0.6'
shade 'cuchaz:enigma:0.11.0.5:lib'
shade 'org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-depchain:2.2.4'
compile 'net.fabricmc:fabric-base:16w38a-0.0.4-SNAPSHOT'
}

View file

@ -77,6 +77,8 @@ public class AbstractPlugin implements Plugin<Project> {
project.getConfigurations().maybeCreate(Constants.CONFIG_NATIVES);
project.getConfigurations().maybeCreate(Constants.COMPILE_MODS);
project.getConfigurations().maybeCreate(Constants.PROCESS_MODS_DEPENDENCIES);
// Common libraries extends from client libraries, CONFIG_MC_DEPENDENCIES will contains all MC dependencies
project.getConfigurations().getByName(Constants.CONFIG_MC_DEPENDENCIES).extendsFrom(project.getConfigurations().getByName(Constants.CONFIG_MC_DEPENDENCIES_CLIENT));
@ -233,8 +235,8 @@ public class AbstractPlugin implements Plugin<Project> {
//only add this when not in a fabric dev env
project1.getDependencies().add(Constants.CONFIG_MC_DEPENDENCIES, "net.fabricmc:fabric-base:" + extension.version + "-" + extension.fabricVersion);
}
project1.getDependencies().add(Constants.PROCESS_MODS_DEPENDENCIES, "net.fabricmc:fabric-base:16w38a-0.0.4-SNAPSHOT");
});
}
protected void readModJson(LoomGradleExtension extension) {

View file

@ -32,8 +32,6 @@ import org.gradle.api.DefaultTask;
import org.gradle.api.artifacts.Configuration;
import org.gradle.api.artifacts.ResolvedArtifact;
import org.gradle.api.tasks.TaskAction;
import org.jboss.shrinkwrap.resolver.api.maven.ConfigurableMavenResolverSystem;
import org.jboss.shrinkwrap.resolver.api.maven.Maven;
import java.io.File;
import java.io.IOException;
@ -69,10 +67,9 @@ public class ProcessModsTask extends DefaultTask {
}
public void downloadRequiredDeps(LoomGradleExtension extension) {
ConfigurableMavenResolverSystem mavenResolver = Maven.configureResolver().withRemoteRepo("Fabric", "http://maven.fabricmc.net/", "default").withRemoteRepo("SpongePowered", "http://repo.spongepowered.org/maven/", "default").withRemoteRepo("Mojang", "https://libraries.minecraft.net/", "default");
File[] files = mavenResolver.resolve("net.fabricmc:fabric-base:16w38a-0.0.4-SNAPSHOT").withTransitivity().asFile();
for (File file : files) {
addFile(file, this);
Configuration configuration = getProject().getConfigurations().getByName(Constants.PROCESS_MODS_DEPENDENCIES);
for (ResolvedArtifact artifact : configuration.getResolvedConfiguration().getResolvedArtifacts()) {
addFile(artifact.getFile(), this);
}
}

View file

@ -65,6 +65,7 @@ public class Constants {
public static final String CONFIG_NATIVES = "MC_NATIVES";
public static final String CONFIG_MC_DEPENDENCIES = "MC_DEPENDENCIES";
public static final String CONFIG_MC_DEPENDENCIES_CLIENT = "MC_DEPENDENCIES_CLIENT";
public static final String PROCESS_MODS_DEPENDENCIES = "PROCESS_MODS_DEPENDENCIES";
public static final String SYSTEM_ARCH = System.getProperty("os.arch").equals("64") ? "64" : "32";
public static final String COMPILE_MODS = "modCompile";