Skip to content

Commit f2bc57c

Browse files
committed
added mod publish plugin
1 parent 57f26fe commit f2bc57c

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@ run
2323
runs
2424
run-data
2525

26-
repo
26+
repo
27+
/libs

build.gradle

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import me.modmuss50.mpp.ReleaseType
2+
13
plugins {
24
id 'java-library'
35
id 'eclipse'
@@ -131,6 +133,31 @@ publishing {
131133
}
132134
}
133135

136+
def changelogFile = file("build/changelog.txt")
137+
138+
publishMods {
139+
file = jar.archiveFile
140+
if (changelogFile.exists()) {
141+
changelog.set(changelogFile.getText())
142+
}
143+
type = ReleaseType.of(version_type.toUpperCase())
144+
modLoaders.add("neoforge")
145+
146+
curseforge {
147+
projectId = "478155"
148+
projectSlug = "dynamictreesplus" // Required for discord webhook
149+
accessToken = curseApiKey ?: System.getenv("CURSEFORGE_API_KEY")
150+
minecraftVersions.add("1.21.1")
151+
requires("252818")
152+
}
153+
modrinth {
154+
projectId = "qaO9Dqpu"
155+
accessToken = modrinthToken ?: System.getenv("MODRINTH_TOKEN")
156+
minecraftVersions.add("1.21.1")
157+
requires("vdjF5PL5")
158+
}
159+
}
160+
134161
tasks.withType(JavaCompile).configureEach {
135162
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
136163
}

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ mod_id=dynamictreesplus
33
mod_name=DynamicTreesPlus
44
mod_license=MIT
55
mod_version=1.3.0
6+
version_type=beta
67
mod_group_id=com.dtteam.dynamictreesplus
78
mod_authors=Ferreusveritas, Max Hyper, Harley O'Connor
89
mod_credits=

0 commit comments

Comments
 (0)