@@ -10,6 +10,7 @@ plugins {
1010 id(" io.papermc.hangar-publish-plugin" ) version " 0.1.2"
1111 id(" net.minecrell.plugin-yml.paper" ) version " 0.6.0"
1212 id(" xyz.jpenilla.run-paper" ) version " 2.1.0"
13+ id(" com.modrinth.minotaur" ) version " 2.+"
1314}
1415
1516group = " net.thenextlvl.gopaint"
@@ -84,6 +85,10 @@ tasks.runServer {
8485val versionString: String = project.version as String
8586val isRelease: Boolean = ! versionString.contains(" -pre" )
8687
88+ val versions: List <String > = (property(" gameVersions" ) as String )
89+ .split(" ," )
90+ .map { it.trim() }
91+
8792hangarPublish { // docs - https://docs.papermc.io/misc/hangar-publishing
8893 publications.register(" plugin" ) {
8994 id.set(" goPaintAdvanced" )
@@ -92,7 +97,7 @@ hangarPublish { // docs - https://docs.papermc.io/misc/hangar-publishing
9297 apiKey.set(System .getenv(" HANGAR_API_TOKEN" ))
9398 platforms.register(Platforms .PAPER ) {
9499 jar.set(tasks.shadowJar.flatMap { it.archiveFile })
95- platformVersions.set(listOf ( " 1.20.6 " ) )
100+ platformVersions.set(versions )
96101 dependencies {
97102 url(" FastAsyncWorldEdit" , " https://hangar.papermc.io/IntellectualSites/FastAsyncWorldEdit" ) {
98103 required.set(true )
@@ -101,3 +106,12 @@ hangarPublish { // docs - https://docs.papermc.io/misc/hangar-publishing
101106 }
102107 }
103108}
109+
110+ modrinth {
111+ token.set(System .getenv(" MODRINTH_TOKEN" ))
112+ projectId.set(" gBIw3Gvy" )
113+ versionType = if (isRelease) " release" else " beta"
114+ uploadFile.set(tasks.shadowJar.flatMap { it.archiveFile })
115+ gameVersions.set(versions)
116+ loaders.add(" paper" )
117+ }
0 commit comments