Update the modrinth minotaur plugin
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
This commit is contained in:
parent
b3b5dc237a
commit
d7db981f1e
|
@ -1,5 +1,6 @@
|
|||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
import com.modrinth.minotaur.request.VersionType
|
||||
import com.modrinth.minotaur.dependencies.DependencyType
|
||||
import net.fabricmc.loom.LoomGradleExtension
|
||||
import net.fabricmc.loom.LoomGradlePlugin
|
||||
|
||||
|
@ -26,7 +27,7 @@ plugins {
|
|||
id("com.github.ben-manes.versions") version "0.42.0"
|
||||
id("net.kyori.indra.git") version "2.1.1"
|
||||
id("org.cqfn.diktat.diktat-gradle-plugin") version "1.0.3"
|
||||
id("com.modrinth.minotaur") version "1.2.1"
|
||||
id("com.modrinth.minotaur") version "2.1.1"
|
||||
}
|
||||
|
||||
group = "fr.username404"
|
||||
|
@ -260,28 +261,29 @@ repositories {
|
|||
mavenCentral()
|
||||
}
|
||||
|
||||
tasks {
|
||||
file("remappedJars").let { if (it.exists()) clean.get().delete.add(it) }
|
||||
val publishToModrinth = register<com.modrinth.minotaur.TaskModrinthUpload>("publishtoModrinth") {
|
||||
val envStr: String? = System.getenv("MODRINTH")
|
||||
onlyIf { envStr != null }
|
||||
versionNumber = version.toString()
|
||||
projectId = "OuGyGg6A"
|
||||
token = envStr
|
||||
addGameVersion(mcBase)
|
||||
addDependency("Bxm9xbNJ", com.modrinth.minotaur.request.Dependency.DependencyType.REQUIRED) // Kotlinforforge dependency
|
||||
versionType = VersionType.ALPHA
|
||||
detectLoaders = false
|
||||
versionName = "${project.name} $versionNumber for Minecraft $gameVersions and higher"
|
||||
fileTree("$rootDir/remappedJars/").files.forEach {
|
||||
with(it.name) {
|
||||
when {
|
||||
contains("fabric") -> uploadFile = it
|
||||
contains("forge") -> addFile(it)
|
||||
file("remappedJars").let { if (it.exists()) tasks.clean.get().delete.add(it) }
|
||||
|
||||
modrinth {
|
||||
projectId.set("OuGyGg6A")
|
||||
gameVersions.add(mcBase)
|
||||
dependencies.add(com.modrinth.minotaur.dependencies.Dependency("Bxm9xbNJ", DependencyType.REQUIRED)) // Kotlinforforge dependency
|
||||
versionType.set(VersionType.ALPHA.name)
|
||||
detectLoaders.set(false)
|
||||
versionName.set("${project.name} $versionNumber for Minecraft $gameVersions and higher")
|
||||
fileTree("$rootDir/remappedJars/").files.forEach {
|
||||
with(it.name) {
|
||||
when {
|
||||
contains("fabric") -> {
|
||||
loaders.add("fabric")
|
||||
uploadFile.set(it)
|
||||
}
|
||||
contains("forge") -> {
|
||||
loaders.add("forge")
|
||||
additionalFiles.add(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
addLoader("fabric"); addLoader("forge")
|
||||
}
|
||||
build.get().finalizedBy(publishToModrinth)
|
||||
}
|
||||
|
||||
tasks.modrinth.get().dependsOn(tasks.build)
|
||||
|
|
Loading…
Reference in New Issue