Fix OML not being in IDE's scopes

dev/0.11
modmuss50 2018-06-20 13:19:44 +01:00
parent fb94d092ad
commit 5296c98606
No known key found for this signature in database
GPG Key ID: 773D17BE8BF49C82
2 changed files with 3 additions and 1 deletions

View File

@ -169,10 +169,12 @@ public class AbstractPlugin implements Plugin<Project> {
ideaModule.getModule().setDownloadSources(true); ideaModule.getModule().setDownloadSources(true);
ideaModule.getModule().setInheritOutputDirs(true); ideaModule.getModule().setInheritOutputDirs(true);
ideaModule.getModule().getScopes().get("COMPILE").get("plus").add(project.getConfigurations().getByName(Constants.CONFIG_MC_DEPENDENCIES)); ideaModule.getModule().getScopes().get("COMPILE").get("plus").add(project.getConfigurations().getByName(Constants.CONFIG_MC_DEPENDENCIES));
ideaModule.getModule().getScopes().get("COMPILE").get("plus").add(project.getConfigurations().getByName(Constants.COMPILE_MODS));
// ECLIPSE // ECLIPSE
EclipseModel eclipseModule = (EclipseModel) project.getExtensions().getByName("eclipse"); EclipseModel eclipseModule = (EclipseModel) project.getExtensions().getByName("eclipse");
eclipseModule.getClasspath().getPlusConfigurations().add(project.getConfigurations().getByName(Constants.CONFIG_MC_DEPENDENCIES)); eclipseModule.getClasspath().getPlusConfigurations().add(project.getConfigurations().getByName(Constants.CONFIG_MC_DEPENDENCIES));
eclipseModule.getClasspath().getPlusConfigurations().add(project.getConfigurations().getByName(Constants.COMPILE_MODS));
} }
/** /**

View File

@ -50,7 +50,7 @@ public class ProcessModsTask extends DefaultTask {
Configuration configuration = getProject().getConfigurations().getByName(Constants.COMPILE_MODS); Configuration configuration = getProject().getConfigurations().getByName(Constants.COMPILE_MODS);
List<File> mods = new ArrayList<>(); List<File> mods = new ArrayList<>();
for (ResolvedArtifact artifact : configuration.getResolvedConfiguration().getResolvedArtifacts()) { for (ResolvedArtifact artifact : configuration.getResolvedConfiguration().getResolvedArtifacts()) {
getProject().getLogger().lifecycle(":found mod to mix:" + artifact.getFile().getName()); //getProject().getLogger().lifecycle(":found mod to mix:" + artifact.getFile().getName());
mods.add(artifact.getFile()); mods.add(artifact.getFile());
} }
if (Constants.MINECRAFT_FINAL_JAR.get(extension).exists()) { if (Constants.MINECRAFT_FINAL_JAR.get(extension).exists()) {