-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodrinth.gradle
More file actions
27 lines (24 loc) · 844 Bytes
/
modrinth.gradle
File metadata and controls
27 lines (24 loc) · 844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import com.modrinth.minotaur.TaskModrinthUpload
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.com.modrinth.minotaur:Minotaur:1.1.0"
}
}
task publishModrinth(type: TaskModrinthUpload) {
dependsOn(build)
token = System.getenv().MODRINTH_TOKEN
projectId = project.modrinth_id
versionNumber = project.mod_version
versionName = "$project.mod_name v$version"
uploadFile = file("${project.buildDir}/libs/${archivesBaseName}-${project.mod_version}+${project.minecraft_version}.jar")
changelog = new String(new FileInputStream("${project.rootDir}/changelogs/${project.mod_version}.md").readAllBytes())
releaseType = project.modrinth_type
addGameVersion project.minecraft_version.toString()
addLoader project.mod_loader.toString()
wasUploadSuccessful()
}