Skip to content

Commit ae069f5

Browse files
author
PingIsFun
committed
Added modrith upload gradle task
1 parent a011d17 commit ae069f5

3 files changed

Lines changed: 20 additions & 0 deletions

File tree

assets/icon_modrinth.jpg

165 KB
Loading

build.gradle

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
22
id 'fabric-loom' version '1.0-SNAPSHOT'
33
id 'maven-publish'
4+
id "com.modrinth.minotaur" version "2.+"
45
}
56

67
sourceCompatibility = JavaVersion.VERSION_17
@@ -55,6 +56,24 @@ jar {
5556
rename { "${it}_${project.archivesBaseName}"}
5657
}
5758
}
59+
modrinth {
60+
token = System.getenv("MODRINTH_TOKEN") // This is the default. Remember to have the MODRINTH_TOKEN environment variable set or else this will fail, or set it to whatever you want - just make sure it stays private!
61+
projectId = project.archivesBaseName // This can be the project ID or the slug. Either will work!
62+
versionNumber = project.version // You don't need to set this manually. Will fail if Modrinth has this version already
63+
versionType = project.release_type // This is the default -- can also be `beta` or `alpha`
64+
uploadFile = remapJar // With Loom, this MUST be set to `remapJar` instead of `jar`!
65+
gameVersions = ["1.19.2"] // Must be an array, even with only one version
66+
loaders = ["fabric"] // Must also be an array - no need to specify this if you're using Loom or ForgeGradle
67+
dependencies { // A special DSL for creating dependencies
68+
// scope.type
69+
// The scope can be `required`, `optional`, `incompatible`, or `embedded`
70+
// The type can either be `project` or `version`
71+
required.project "modmenu"
72+
required.project "cloth-config"
73+
}
74+
syncBodyFrom = rootProject.file("README.md").text
75+
debugMode = true
76+
}
5877

5978
// configure the maven publication
6079
publishing {

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ org.gradle.jvmargs=-Xmx1G
1111
mod_version = 0.1.0
1212
maven_group = io.github.pingisfun.hitboxplus
1313
archives_base_name = hitboxplus
14+
release_type = beta
1415

1516
# Dependencies
1617
cloth_config_version=8.2.88

0 commit comments

Comments
 (0)