Skip to content

Commit

Permalink
Add GradleUtils.minecraftLibsMaven (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
PaintNinja authored Oct 24, 2023
1 parent b2a45f3 commit efced38
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,17 @@ class GradleUtils {
}
}

/**
* Get a closure for the Minecraft libraries maven to be passed into {@link org.gradle.api.artifacts.dsl.RepositoryHandler#maven(groovy.lang.Closure)}
* in a repositories block.
*/
static Closure getMinecraftLibsMaven() {
return { MavenArtifactRepository repo ->
repo.name = 'Minecraft libraries'
repo.url = 'https://libraries.minecraft.net/'
}
}

private static Map<String, String> getFilteredInfo(Map<String, String> info, boolean prefix, String filter) {
if (prefix)
filter += '**'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,8 @@ class GradleUtilsExtension {
static Closure getForgeMaven() {
return GradleUtils.getForgeMaven()
}

static Closure getMinecraftLibsMaven() {
return GradleUtils.getMinecraftLibsMaven()
}
}

0 comments on commit efced38

Please sign in to comment.