Skip to content

Commit

Permalink
Fix compilation on Gradle 5.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Johni0702 committed May 24, 2019
1 parent 8781de8 commit da6f9e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
import org.gradle.api.DefaultTask;
import org.gradle.api.Project;
import org.gradle.api.Task;
import org.gradle.api.internal.ClosureBackedAction;
import org.gradle.api.specs.Spec;
import org.gradle.api.tasks.OutputFile;
import org.gradle.api.tasks.TaskAction;
import org.gradle.util.ClosureBackedAction;

import java.io.File;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@

import net.minecraftforge.gradle.testsupport.TaskTest;
import net.minecraftforge.gradle.testsupport.TestResource;
import org.gradle.api.internal.artifacts.dependencies.DefaultSelfResolvingDependency;
import org.gradle.api.internal.file.collections.SimpleFileCollection;
import org.gradle.api.Project;
import org.junit.Assert;
import org.junit.Test;

Expand All @@ -39,7 +38,8 @@ public void runTask() throws IOException
throw new IOException("Couldn't create file in " + outputDir);
File modWithAtJar = TestResource.MOD_WITH_AT.getFile(temporaryFolder);
TaskExtractDepAts task = getTask(TaskExtractDepAts.class);
task.getProject().getConfigurations().maybeCreate("test_at").getDependencies().add(new DefaultSelfResolvingDependency(new SimpleFileCollection(modWithAtJar)));
Project project = task.getProject();
project.getConfigurations().maybeCreate("test_at").getDependencies().add(project.getDependencies().create(project.files(modWithAtJar)));
task.addCollection("test_at");
task.setOutputDir(outputDir);
task.doTask();
Expand Down

0 comments on commit da6f9e2

Please sign in to comment.