Skip to content

Commit

Permalink
Fix #6
Browse files Browse the repository at this point in the history
  • Loading branch information
Juuxel committed Mar 17, 2022
1 parent 94937ab commit 1dcf95f
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,20 @@ public RepositoryQuiltflowerSource(Project project, Object dependencyNotation) {

private Dependency getDependency() {
if (dependency == null) {
dependency = project.getDependencies().create(dependencyNotation);
dependency = project.getDependencies().create(unwrapPossibleProviders(dependencyNotation));
}

return dependency;
}

private static Object unwrapPossibleProviders(Object o) {
while (o instanceof Provider<?>) {
o = ((Provider<?>) o).get();
}

return o;
}

@Override
public InputStream open() throws IOException {
if (quiltflowerFile == null) {
Expand Down

0 comments on commit 1dcf95f

Please sign in to comment.