diff options
Diffstat (limited to 'build.gradle')
-rw-r--r-- | build.gradle | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/build.gradle b/build.gradle index 4594368c..43ca9fe0 100644 --- a/build.gradle +++ b/build.gradle @@ -1,13 +1,17 @@ plugins { id 'fabric-loom' version '0.9-SNAPSHOT' id 'maven-publish' + id 'com.modrinth.minotaur' version '1.2.+' } +import com.modrinth.minotaur.TaskModrinthUpload +import com.modrinth.minotaur.request.VersionType + sourceCompatibility = JavaVersion.VERSION_16 targetCompatibility = JavaVersion.VERSION_16 archivesBaseName = project.archives_base_name -version = project.mod_version +version = "${project.mod_version}+${project.minecraft_version}" group = project.maven_group repositories { @@ -90,6 +94,24 @@ test { useJUnitPlatform() } +task publishModrinth(type: TaskModrinthUpload) { + dependsOn(build) + onlyIf { + System.getenv('MODRINTH_TOKEN') + } + + token = System.getenv('MODRINTH_TOKEN') + projectId = project.modrinth_id + versionNumber = version + versionName = "Skyblocker ${project.mod_version} (${project.minecraft_version})" + uploadFile = remapJar + addGameVersion((String) project.minecraft_version) + addLoader('fabric') + versionType = VersionType.RELEASE + changelog = System.getenv('CHANGELOG') + +} + // configure the maven publication publishing { publications { |