Skip to content

Commit 0773bc4

Browse files
committed
fix: Modrinth publish failed
1 parent c4cdb8e commit 0773bc4

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ plugins {
88
}
99

1010
group = "one.pkg"
11-
version = "0.0.8"
11+
version = "0.0.9"
1212
val targetJavaVersion = 17
1313

1414
repositories {

changelogs/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## v0.0.9
2+
3+
### Fix
4+
- Modrinth publish failed
5+
16
## v0.0.8
27

38
### Optimize

src/main/kotlin/one/pkg/modpublish/data/network/modrinth/ModrinthData.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ data class ModrinthData(
4141

4242
@SerializedName("version_body")
4343
var versionBody: String? = null,
44-
var dependencies: MutableList<ProjectRelation>? = null,
44+
var dependencies: MutableList<ProjectRelation> = arrayListOf(),
4545

4646
@SerializedName("game_versions")
4747
var gameVersions: MutableList<String?>? = null,
@@ -109,9 +109,8 @@ data class ModrinthData(
109109
}*/
110110

111111
fun dependency(dependency: ProjectRelation) {
112-
if (this.dependencies == null) this.dependencies = ArrayList()
113-
for (rel in this.dependencies!!) if (rel.projectID == dependency.projectID) return
114-
this.dependencies!!.add(dependency)
112+
for (rel in this.dependencies) if (rel.projectID == dependency.projectID) return
113+
this.dependencies.add(dependency)
115114
}
116115

117116
fun requiredDependency(slug: String) {

src/main/resources/META-INF/plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</description>
1616
<change-notes><![CDATA[
1717
18-
<h2>v0.0.8</h2><h3>Optimize</h3><ul><li>Improved KToml parser</li></ul><h3>Chore</h3><ul><li>Bump minecraft version list</li></ul><h3>Fix</h3><ul><li>LocalModInfo not being updated correctly</li></ul><h2>v0.0.7</h2><h3>Refactor</h3><ul><li>Refactoring part of the code using Kotlin</li></ul><h3>Optimize</h3><ul><li>Improved KToml parser</li></ul><h3>Change</h3><ul><li>Java 17 is now required</li><li>Use Kotlin coroutines instead of JVM virtual threads</li></ul><h3>Remove</h3><ul><li>remove lombok</li></ul><h3>Chore</h3><ul><li>Bump minecraft version list</li></ul><h3>Fix</h3><ul><li>Fix file selector and ReleaseChannel to the left side of the page to resolve the issue where they sometimes moved to the center.</li><li>Under certain conditions, the PublishUI success dialog cannot pop up</li></ul><hr><h2>v0.0.6</h2><h3>Feat</h3><ul><li>More configurable network options</li><li>Support proxy simple auth</li><li>Add pluginIcon</li><li>Curseforge supports multiple file uploads</li><li>When the previous publication target fails, the later publishing tasks will not be canceled</li><li>When publishing fails, all error messages are displayed</li><li>Supports hot updates of the Minecraft version list</li></ul><h3>Performance</h3><ul><li>PublishTask is now parallel</li><li>PublishTask no longer freezes PublishUI</li><li>Improved Toml parser</li></ul><h3>Optimize</h3><ul><li>Enhanced number input field validation</li><li>More icons</li></ul><h3>Translate</h3><ul><li>Improved translations</li></ul><h3>Change</h3><ul><li>Java 21 is now required</li></ul><h3>Remove</h3><ul><li>remove modrinth test server</li></ul><h3>Chore</h3><ul><li>Bump minecraft version list</li></ul><h3>Fix</h3><ul><li>Incorrect reading of ProxyType</li><li>In some cases, the GUI could not start due to VersionRangeParser initialization failure.</li></ul><hr><h2>v0.0.5</h2><h3>Feat</h3><ul><li>More uses for version parser: Automatically select version ranges</li><li>Upload multiple files simultaneously</li><li>Improved Toml parser</li><li>When API errors occur, should return API ID</li><li>Support using proxy server. Need to configure in settings.</li><li>Support auto detecting current Git branch</li></ul><h3>Performance</h3><ul><li>Don't process Minecraft version list synchronously when creating UI</li><li>Cache isn't used effectively</li></ul><h3>Change</h3><ul><li>Network request timeout increased from 15 to 20 seconds</li></ul><h3>Translate</h3><ul><li>Added German translation</li></ul><h3>Remove</h3><ul><li>Cancel plans to provide GitLab compatibility</li></ul><h3>Chore</h3><ul><li>Use Lombok to clean code</li><li>Add a prompt for CurseForge</li><li>Bump minecraft version list</li></ul><h3>Fix</h3><ul><li>Version parts should not be null</li><li>The first value is not selected by default after refreshing Minecraft version list</li><li>An incorrect judgment in the dependency manager</li><li>When API returns error message, should not call getI18n method to create PublishResult</li><li>Settings options disappeared due to ID conflict</li></ul><hr><h2>v0.0.4</h2><h3>Feat</h3><ul><li>Improved Toml Parser</li><li>Added variables for name template: low-version, max-version</li><li>When publishing to Github, it will now automatically reuse existing release tags</li></ul><h3>UI</h3><ul><li>Allow scrolling in the Publish page</li><li>Replaced Changelog input component with EditorTextField</li><li>PublishUI layout optimization</li></ul><h3>Change</h3><ul><li>When publishing to Github/Gitlab, loader and support target selection is no longer mandatory</li></ul><h3>Translate</h3><ul><li>Improved translations</li><li>Added French translation</li><li>Added Russian translation</li><li>Added Spanish translation</li></ul><h3>Chore</h3><ul><li>Bump minecraft version list</li></ul><h3>Fix</h3><ul><li>Title repeatedly requests i18n</li><li>Fixed incorrect Korean reference</li></ul><hr><h2>v0.0.3</h2><h3>Feat</h3><ul><li>Detect token decryption status on release page</li><li>Improved hardware ID algorithm to prevent frequent token invalidation</li><li>Added support for Github</li><li>Github/GitLab branches are now optional, ModPublish will search for them in the repo</li><li>Quick access to token application pages from settings</li></ul><h3>Fix</h3><ul><li>Do not display tooltip for disabled release targets on release page</li></ul><h3>Translate</h3><ul><li>Improved translations</li></ul><h3>Change</h3><ul><li>ModType name should be capitalized</li></ul><hr><h2>v0.0.2</h2><h3>Feat</h3><ul><li>Auto generate title based on mod name/version/loader or user-customized format</li><li>Support for selecting release channels</li></ul><h3>Optimize</h3><ul><li>Project configuration UI optimization</li><li>Project structure optimization</li></ul><h3>Fix</h3><ul><li>Unable to read TOML</li><li>Some other bugs (my commit records were lost, so I don't remember)</li></ul><h3>Remove</h3><ul><li>No longer using JToml</li></ul><hr><h3>v0.0.1</h3><ul><li>Release</li></ul>
18+
<h2>v0.0.9</h2><h3>Fix</h3><ul><li>Modrinth publish failed</li></ul><h2>v0.0.8</h2><h3>Optimize</h3><ul><li>Improved KToml parser</li></ul><h3>Chore</h3><ul><li>Bump minecraft version list</li></ul><h3>Fix</h3><ul><li>LocalModInfo not being updated correctly</li></ul><h2>v0.0.7</h2><h3>Refactor</h3><ul><li>Refactoring part of the code using Kotlin</li></ul><h3>Optimize</h3><ul><li>Improved KToml parser</li></ul><h3>Change</h3><ul><li>Java 17 is now required</li><li>Use Kotlin coroutines instead of JVM virtual threads</li></ul><h3>Remove</h3><ul><li>remove lombok</li></ul><h3>Chore</h3><ul><li>Bump minecraft version list</li></ul><h3>Fix</h3><ul><li>Fix file selector and ReleaseChannel to the left side of the page to resolve the issue where they sometimes moved to the center.</li><li>Under certain conditions, the PublishUI success dialog cannot pop up</li></ul><hr><h2>v0.0.6</h2><h3>Feat</h3><ul><li>More configurable network options</li><li>Support proxy simple auth</li><li>Add pluginIcon</li><li>Curseforge supports multiple file uploads</li><li>When the previous publication target fails, the later publishing tasks will not be canceled</li><li>When publishing fails, all error messages are displayed</li><li>Supports hot updates of the Minecraft version list</li></ul><h3>Performance</h3><ul><li>PublishTask is now parallel</li><li>PublishTask no longer freezes PublishUI</li><li>Improved Toml parser</li></ul><h3>Optimize</h3><ul><li>Enhanced number input field validation</li><li>More icons</li></ul><h3>Translate</h3><ul><li>Improved translations</li></ul><h3>Change</h3><ul><li>Java 21 is now required</li></ul><h3>Remove</h3><ul><li>remove modrinth test server</li></ul><h3>Chore</h3><ul><li>Bump minecraft version list</li></ul><h3>Fix</h3><ul><li>Incorrect reading of ProxyType</li><li>In some cases, the GUI could not start due to VersionRangeParser initialization failure.</li></ul><hr><h2>v0.0.5</h2><h3>Feat</h3><ul><li>More uses for version parser: Automatically select version ranges</li><li>Upload multiple files simultaneously</li><li>Improved Toml parser</li><li>When API errors occur, should return API ID</li><li>Support using proxy server. Need to configure in settings.</li><li>Support auto detecting current Git branch</li></ul><h3>Performance</h3><ul><li>Don't process Minecraft version list synchronously when creating UI</li><li>Cache isn't used effectively</li></ul><h3>Change</h3><ul><li>Network request timeout increased from 15 to 20 seconds</li></ul><h3>Translate</h3><ul><li>Added German translation</li></ul><h3>Remove</h3><ul><li>Cancel plans to provide GitLab compatibility</li></ul><h3>Chore</h3><ul><li>Use Lombok to clean code</li><li>Add a prompt for CurseForge</li><li>Bump minecraft version list</li></ul><h3>Fix</h3><ul><li>Version parts should not be null</li><li>The first value is not selected by default after refreshing Minecraft version list</li><li>An incorrect judgment in the dependency manager</li><li>When API returns error message, should not call getI18n method to create PublishResult</li><li>Settings options disappeared due to ID conflict</li></ul><hr><h2>v0.0.4</h2><h3>Feat</h3><ul><li>Improved Toml Parser</li><li>Added variables for name template: low-version, max-version</li><li>When publishing to Github, it will now automatically reuse existing release tags</li></ul><h3>UI</h3><ul><li>Allow scrolling in the Publish page</li><li>Replaced Changelog input component with EditorTextField</li><li>PublishUI layout optimization</li></ul><h3>Change</h3><ul><li>When publishing to Github/Gitlab, loader and support target selection is no longer mandatory</li></ul><h3>Translate</h3><ul><li>Improved translations</li><li>Added French translation</li><li>Added Russian translation</li><li>Added Spanish translation</li></ul><h3>Chore</h3><ul><li>Bump minecraft version list</li></ul><h3>Fix</h3><ul><li>Title repeatedly requests i18n</li><li>Fixed incorrect Korean reference</li></ul><hr><h2>v0.0.3</h2><h3>Feat</h3><ul><li>Detect token decryption status on release page</li><li>Improved hardware ID algorithm to prevent frequent token invalidation</li><li>Added support for Github</li><li>Github/GitLab branches are now optional, ModPublish will search for them in the repo</li><li>Quick access to token application pages from settings</li></ul><h3>Fix</h3><ul><li>Do not display tooltip for disabled release targets on release page</li></ul><h3>Translate</h3><ul><li>Improved translations</li></ul><h3>Change</h3><ul><li>ModType name should be capitalized</li></ul><hr><h2>v0.0.2</h2><h3>Feat</h3><ul><li>Auto generate title based on mod name/version/loader or user-customized format</li><li>Support for selecting release channels</li></ul><h3>Optimize</h3><ul><li>Project configuration UI optimization</li><li>Project structure optimization</li></ul><h3>Fix</h3><ul><li>Unable to read TOML</li><li>Some other bugs (my commit records were lost, so I don't remember)</li></ul><h3>Remove</h3><ul><li>No longer using JToml</li></ul><hr><h3>v0.0.1</h3><ul><li>Release</li></ul>
1919
2020
]]></change-notes>
2121
<resource-bundle>messages.ModPublish</resource-bundle>

0 commit comments

Comments
 (0)