Gradle plugin to allow easy access to modrinth files for your project.
It is based on CurseMaven plugin.
First, add jitpack.io to your plugin repositories:
maven {
name = 'Jitpack'
url = 'https://jitpack.io'
}
Then add a resolution strategy to your plugin management:
resolutionStrategy {
eachPlugin {
if (requested.id.id == "io.github.vampirestudios.modrinthmaven" && requested.version?.endsWith("-SNAPSHOT") != true) {
useModule("com.github.vampire-studios.ModrinthMaven:ModrinthMaven:${requested.version}")
}
}
}
Finally add this to your plugins:
plugins {
id "io.github.vampirestudios.modrinthmaven" version "1.0.1"
}
Using the plugin is very simple. The dependency format is as follows:
modrinth.maven:<modpageid>:<fileid>
modrinth.maven
-> Required. Marks the dependency to be resolved by the modrinth maven plugin.<modpageid>
-> the id of the mod on modrinth. e.g. :tyCNRhS8
which is the mod id of VampireLib on modrinth, you can find it in the mod page urlhttps://modrinth.com/mod/tyCNRhS8/
.<fileid>
-> the file id of the file you want to add as a dependency. Same you can also find it in the file page's urlhttps://modrinth.com/mod/tyCNRhS8/version/UjMEn7wu
.
dependencies {
compile "modrinth.maven:tyCNRhS8:UjMEn7wu"
}
resolves the file here, with the scope compile
dependencies {
include "modrinth.maven:aXf2OSFU:L7TmfftT"
}
resolves the file here, with the scope include