Skip to content

Commit

Permalink
add publishModrinth
Browse files Browse the repository at this point in the history
  • Loading branch information
plusls committed Sep 8, 2021
1 parent 3bb436f commit af27b7b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id 'fabric-loom' version '0.8-SNAPSHOT'
id "com.modrinth.minotaur" version "1.2.1"
id 'maven-publish'
}

Expand Down Expand Up @@ -63,6 +64,22 @@ tasks.withType(JavaCompile).configureEach {
// Minecraft 1.17 (21w19a) upwards uses Java 16.
it.options.release = 16
}

import com.modrinth.minotaur.TaskModrinthUpload
task publishModrinth (type: TaskModrinthUpload){
onlyIf {
System.getenv("MODRINTH") // Only attempt to run this task if the MODRINTH variable is set, otherwise SKIP it
}

token = System.getenv("MODRINTH")
projectId = 'oQgSAEhD'
versionNumber = version
// On fabric, use 'remapJar' instead of 'jar'
uploadFile = remapJar
addGameVersion(project.minecraft_version)
addLoader('fabric')
}

java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
Expand Down

0 comments on commit af27b7b

Please sign in to comment.