Use minotaur dependency container dsl

This commit is contained in:
Johannes Frohnmeyer 2022-05-10 17:35:08 +00:00
parent f0db30c511
commit ec876a0319
1 changed files with 10 additions and 8 deletions

View File

@ -15,7 +15,7 @@ buildscript {
dependencies {
classpath "net.fabricmc:fabric-loom:0.11-SNAPSHOT"
classpath "org.ajoberstar.grgit:grgit-gradle:5.0.0"
classpath "com.modrinth.minotaur:Minotaur:2.1.0"
classpath "com.modrinth.minotaur:Minotaur:2.2.0"
classpath "io.gitlab.jfronny:CurseGradle:1.4.0-1642087331626"
classpath "gradle.plugin.com.github.johnrengelman:shadow:7.1.2"
}
@ -332,14 +332,16 @@ if (ext.modrinthAvailable) {
uploadFile = remapJar
gameVersions = ["${project.minecraft_version}"]
loaders = ['fabric']
if (!project.ext.modrinth_required_dependencies.isEmpty()) {
project.ext.modrinth_required_dependencies.split(", ").each {
String dep -> dependencies.add(new com.modrinth.minotaur.dependencies.ModDependency(dep, "required"))
dependencies {
if (!project.ext.modrinth_required_dependencies.isEmpty()) {
project.ext.modrinth_required_dependencies.split(", ").each { String dep ->
required.project dep
}
}
}
if (!project.ext.modrinth_optional_dependencies.isEmpty()) {
project.ext.modrinth_optional_dependencies.split(", ").each {
String dep -> dependencies.add(new com.modrinth.minotaur.dependencies.ModDependency(dep, "optional"))
if (!project.ext.modrinth_optional_dependencies.isEmpty()) {
project.ext.modrinth_optional_dependencies.split(", ").each { String dep ->
optional.project dep
}
}
}
if (readmeFile.exists()) {