Skip to content

Gradle plugin to allow easy access to modrinth files

Notifications You must be signed in to change notification settings

vampire-studios/ModrinthMaven

This branch is 23 commits ahead of Wyn-Price/CurseMaven-OLD:2.x.x.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Cat Core
Nov 11, 2020
b8ac058 · Nov 11, 2020

History

89 Commits
May 11, 2020
Nov 11, 2020
Jun 17, 2019
Nov 11, 2020
Nov 11, 2020
May 11, 2020
May 11, 2020
Nov 7, 2020
Nov 7, 2020

Repository files navigation

ModrinthMaven

Gradle plugin to allow easy access to modrinth files for your project.

It is based on CurseMaven plugin.

Applying the plugin

Latest version:

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"
}

Usage

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 url https://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 url https://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

Special Thanks to

  • Wyn-Price for write the original plugin for curseforge
  • Tamaized for working with Wyn-Price to figure out the cloudflare/403 issues.

About

Gradle plugin to allow easy access to modrinth files

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Groovy 100.0%