1+ import me.modmuss50.mpp.ReleaseType
2+
13plugins {
24 id ' java-library'
35 id ' maven-publish'
46 id ' net.neoforged.moddev' version ' 2.0.99'
57 id ' idea'
8+ id " me.modmuss50.mod-publish-plugin" version " 0.8.4"
69}
710
811// tasks.named('wrapper', Wrapper).configure {
@@ -124,6 +127,7 @@ var generateModMetadata = tasks.register("generateModMetadata", ProcessResources
124127 mod_license : mod_license,
125128 mod_version : mod_version,
126129 mod_authors : mod_authors,
130+ mod_credits : mod_credits,
127131 mod_description : mod_description
128132 ]
129133 inputs. properties replaceProperties
@@ -147,6 +151,36 @@ publishing {
147151 }
148152}
149153
154+ def changelogFile = file(" build/changelog.txt" )
155+
156+ publishMods {
157+ file = jar. archiveFile
158+ displayName = " ${ mod_name.replace(' ','')} -NeoForge-${ minecraft_version} ${ project.version} "
159+ if (changelogFile. exists()) {
160+ changelog. set(changelogFile. getText())
161+ }
162+ type = ReleaseType . of(versionType. toUpperCase())
163+ modLoaders. add(" neoforge" )
164+
165+ curseforge {
166+ projectId = " 1157051"
167+ projectSlug = " dynamic-trees-regions-unexplored" // Required for discord webhook
168+ accessToken = curseApiKey ?: System . getenv(" CURSEFORGE_API_KEY" )
169+ minecraftVersions. add(" 1.21.1" )
170+ requires(" dynamictrees" )
171+ requires(" regions-unexplored" )
172+ optional(" dynamictreesplus" )
173+ }
174+ modrinth {
175+ projectId = " IOcN8dvy"
176+ accessToken = modrinthToken ?: System . getenv(" MODRINTH_TOKEN" )
177+ minecraftVersions. add(" 1.21.1" )
178+ requires(" vdjF5PL5" ) // dt
179+ requires(" Tkikq67H" ) // ru
180+ optional(" qaO9Dqpu" ) // dt+
181+ }
182+ }
183+
150184tasks. withType(JavaCompile ). configureEach {
151185 options. encoding = ' UTF-8' // Use the UTF-8 charset for Java compilation
152186}
0 commit comments