Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
### Version 2.2.0

* [Exp] - Add experimental support for multi-sourceset projects
* [Feat] - Add support for new snapshot version formats for CurseForge
* [Feat] - Add option to not set GitHub release as latest
* [Feat] - Add Support for Modtale
* [Feat] - Add Support for uploading Hytale plugins to CurseForge and NightBloom

### Version 2.1.8

* [Bug] - Fix commit `3562a62` that was wiped out by release 2.1.7
* [Chore] - Update dependencies
* [Bug] - Fix NightBloom File ID extraction regex following API change
* [Exp] - Add experimental support for multi-sourceset projects
* [Feat] - Add support for new snapshot version formats for CurseForge
* [Feat] - Add option to not set GitHub release as latest

### Version 2.1.7

Expand Down
Binary file added dummy.jar
Binary file not shown.
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
version_major=2
version_minor=1
version_patch=8
version_build=4
version_minor=2
version_patch=0
version_build=1
release_type=snapshot

# Dependencies
curse4j=1.0.12
curse4j=1.0.13
modrinth4j=2.2.0
github=1.318
github=1.330
mavenart=4.0.0-alpha-10
junit=5.10.1
lombok=1.18.38
nightbloom=1.2.8
nightbloom=1.2.13
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
12 changes: 7 additions & 5 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 14 additions & 12 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion license.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023-2025 HypherionSA and Contributors
Copyright (c) 2023-2026 HypherionSA and Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
42 changes: 33 additions & 9 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
## ModPublisher

ModPublisher is a Gradle Plugin that allows modders to publish their mods to Modrinth, Curseforge and GitHub in one go.
ModPublisher is a Gradle Plugin that allows modders to publish their mods to Modrinth, CurseForge and GitHub in one go.

No need for separate plugins, just one!

---

### Supported Platforms

- [CurseForge](https://curseforge.com)
- [Modrinth](https://modrinth.com)
- [GitHub](https://github.com)
- [NightBloom](https://nightbloom.cc)
- [Modtale](https://modtale.net)

### Setup

For full documentation, checkout [ModPublisher Docs](https://modpublisher.fdd-docs.com/)
Expand Down Expand Up @@ -60,8 +68,14 @@ publisher {
curseforge System.getenv("CURSE_TOKEN")
// GitHub Token
github System.getenv("GITHUB_TOKEN")
// Modtale Token
modtale System.getenv("MODTALE_TOKEN")
}

// Set the Game Type you are uploading for. This is Optional, but needed for Hytale Mods
// Current valid values are `hytale` and `minecraft`. minecraft is the default
setGameType("minecraft")

// Enable Debug mode. When enabled, no files will actually be uploaded
setDebug(true)

Expand All @@ -71,6 +85,9 @@ publisher {
// Modrinth Project ID
setModrinthID("dsgfhs79789")

// Modtale Project ID
setModtaleID("jfghg")

// Type of release. beta, alpha or release
// You can also use VersionType.BETA, VersionType.ALPHA or VersionType.RELEASE
setVersionType("beta")
Expand All @@ -81,7 +98,7 @@ publisher {
// Or https://gist.githubusercontent.com/hypherionmc/92f825d3c9337964cc77c9c8c9bf65e6/raw/ceeaaee5b98c688a23398864fe480b84796a1651/test_gist.md
setChangelog("changelog.md")

// Required for Modrinth/GitHub
// Required for Modrinth/GitHub/Modtale
setProjectVersion("1.20.2-${project.version}")

// Fancy display name for the upload.
Expand All @@ -94,15 +111,17 @@ publisher {
// The modloaders your upload supports.
// This can also be an Enum from ModLoader,
// like setLoaders(ModLoader.FABRIC, ModLoader.FORGE)
// NOT NEEDED FOR HYTALE PLUGINS
setLoaders("forge", "fabric")

// The new Curseforge Environment tag. Optional
// Valid values are "server", "client" or "both"
// You can also use CurseEnvironment.BOTH, or CurseEnvironment.SERVER or CurseEnvironment.CLIENT
// NOT NEEDED FOR HYTALE PLUGINS
setCurseEnvironment("both")

// Upload the release, but keep it "private" until you are ready
// Unreleased feature on CurseForge, working on Modrinth
// Working CurseForge, not working on Modrinth
setIsManualRelease(true)

// The file to be uploaded. This can be a file, task, or string.
Expand All @@ -117,16 +136,15 @@ publisher {
// If this is a task, the task specified will be executed before publishing
// Valid platforms are modrinth, curseforge and github
setPlatformArtifact("modrinth", modrinthJar)

// Disable the built in Fractureizer scanner
setDisableMalwareScanner(true)

// Add supported java versions. Currently only used by CurseForge
// Supports anything that can be parsed using JavaVersion.toVersion()
// NOT NEEDED FOR HYTALE PLUGINS
setJavaVersions(JavaVersion.VERSION_1_8, 11)

// Safety check to check if the artifact contains a valid mod metadata entry,
// which could possibly mean that the jar is empty
// NOT NEEDED FOR HYTALE PLUGINS
setDisableEmptyJarCheck(true)

// Additional files to upload. Same as artifact, this can be a task, file or string
Expand Down Expand Up @@ -268,8 +286,14 @@ publisher {
curseforge(System.getenv("CURSE_TOKEN"))
// GitHub Token
github(System.getenv("GITHUB_TOKEN"))
// Modtale Token
modtale(System.getenv("MODTALE_TOKEN"))
}

// Set the Game Type you are uploading for. This is Optional, but needed for Hytale Mods
// Current valid values are `hytale` and `minecraft`. minecraft is the default
gameType.set("minecraft")

// Enable Debug mode. When enabled, no files will actually be uploaded
debug.set(true)

Expand All @@ -279,6 +303,9 @@ publisher {
// Modrinth Project ID
modrinthID.set("sdjkg8867")

// Modtale Project ID
modtaleID.set("gjgndg")

// GitHub repo to publish to. Only required for GitHub
githubRepo.set("OWNER/REPO")

Expand Down Expand Up @@ -330,9 +357,6 @@ publisher {
// If this is a task, the task specified will be executed before publishing
// Valid platforms are modrinth, curseforge and github
setPlatformArtifact("modrinth", modrinthJar)

// Disable the built in Fractureizer scanner
disableMalwareScanner.set(true)

// Safety check to check if the artifact contains a valid mod metadata entry,
// which could possibly mean that the jar is empty
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/hypherionmc/modpublisher/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public class Constants {
public static final String GITHUB_TASK = "publishGitHub";
public static final String MODRINTH_TASK = "publishModrinth";
public static final String NIGHTBLOOM_TASK = "publishNightbloom";
public static final String MODTALE_TASK = "publishModtale";
public static final String TASK_GROUP = "publishing";
public static final String EXTENSION_NAME = "publisher";
public static final String INTERNAL_TASK_GROUP = "modpublisher";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ public class ModPublisherGradleExtension {
// GitHub Repo. username/repo or URL
@Getter private final Property<String> githubRepo;

// Modtale Project ID
@Getter private final Property<String> modtaleID;

// Type of release. Valid entries: release, beta, alpha
@Getter private final Property<String> versionType;

Expand Down Expand Up @@ -117,6 +120,8 @@ public class ModPublisherGradleExtension {

@Getter private final Property<Boolean> isManualRelease;

@Getter private final Property<String> gameType;

// Proxy Config
@Getter private final ProxyConfig proxyConfig;

Expand All @@ -129,6 +134,7 @@ public ModPublisherGradleExtension(Project project) {
this.modrinthID = project.getObjects().property(String.class);
this.nightbloomID = project.getObjects().property(String.class);
this.githubRepo = project.getObjects().property(String.class);
this.modtaleID = project.getObjects().property(String.class);
this.versionType = project.getObjects().property(String.class).convention("release");
this.changelog = project.getObjects().property(Object.class);
this.version = project.getObjects().property(String.class);
Expand All @@ -140,6 +146,7 @@ public ModPublisherGradleExtension(Project project) {
this.artifacts = new HashMap<>();
this.artifact = project.getObjects().property(Object.class);
this.isManualRelease = project.getObjects().property(Boolean.class).convention(false);
this.gameType = project.getObjects().property(String.class).convention("minecraft");

// GitHub config
this.github = new GithubConfig();
Expand Down Expand Up @@ -384,6 +391,7 @@ public void copyFrom(ModPublisherGradleExtension other, SourceSet sourceSet) {
this.modrinthID.convention(other.modrinthID);
this.nightbloomID.convention(other.nightbloomID);
this.githubRepo.convention(other.githubRepo);
this.modtaleID.convention(other.modtaleID);
this.versionType.convention(other.versionType);
this.changelog.convention(other.changelog);
this.version.convention(other.version);
Expand All @@ -399,6 +407,7 @@ public void copyFrom(ModPublisherGradleExtension other, SourceSet sourceSet) {
this.useModrinthStaging.convention(other.useModrinthStaging);
this.additionalFiles.convention(other.additionalFiles);
this.javaVersions.convention(other.javaVersions);
this.gameType.convention(other.gameType);

if (other.artifacts != null && !other.artifacts.isEmpty()) {
if (this.artifacts == null) this.artifacts = new HashMap<>();
Expand Down Expand Up @@ -457,6 +466,7 @@ public static class ApiKeys {
private String modrinth = "";
private String github = "";
private String nightbloom = "";
private String modtale = "";

/**
* Mostly for Kotlin support
Expand Down Expand Up @@ -493,6 +503,15 @@ public void github(String github) {
public void nightbloom(String nightbloom) {
this.nightbloom = nightbloom;
}

/**
* Mostly for Kotlin support
* Set the Modtale API key
* @param modtale The API Key
*/
public void modtale(String modtale) {
this.modtale = modtale;
}
}

/**
Expand Down
Loading