Skip to content

Commit

Permalink
Patch dependency loading from closures
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTemportalist committed Jun 16, 2016
1 parent 296cdda commit 739008e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ class PropertyDependencies {
Map<String, String> repositories;
PropertyDependency[] dependencies;

def setDependencies(Closure<?>[] closures) {
this.dependencies = new PropertyDependency[closures.length]
for (int i = 0; i < closures.length; i++)
this.dependencies.with closures[i]
}

def load(Project project, ForgeExtension minecraft) {
project.getRepositories().mavenCentral()
project.getRepositories().jcenter()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ class PropertyDependency {
String group, name, version, compileWith;
PropertyReplaceDep replace;

def setReplace(Closure<?> closure) {
this.replace = new PropertyReplaceDep();
this.replace.with(closure)
}

static class PropertyReplaceDep {
String instruction, modid, versionRange;
}
Expand Down

0 comments on commit 739008e

Please sign in to comment.