{"id":13543514,"url":"https://github.com/firstdarkdev/modpublisher","last_synced_at":"2025-07-26T11:32:00.448Z","repository":{"id":159465966,"uuid":"614565273","full_name":"firstdarkdev/modpublisher","owner":"firstdarkdev","description":"A dual publishing Gradle Plugin to publish mods to Modrinth, Curseforge and GitHub in one go","archived":false,"fork":false,"pushed_at":"2024-07-09T20:51:19.000Z","size":290,"stargazers_count":19,"open_issues_count":7,"forks_count":3,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2024-11-03T10:33:00.134Z","etag":null,"topics":["curseforge","curseforge-api","github","modrinth","modrinth-api"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/firstdarkdev.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-15T21:09:44.000Z","updated_at":"2024-10-03T17:26:21.000Z","dependencies_parsed_at":"2023-12-02T13:28:30.145Z","dependency_job_id":"527aea34-4dd4-4f86-9c81-a85ad706b131","html_url":"https://github.com/firstdarkdev/modpublisher","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstdarkdev%2Fmodpublisher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstdarkdev%2Fmodpublisher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstdarkdev%2Fmodpublisher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstdarkdev%2Fmodpublisher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/firstdarkdev","download_url":"https://codeload.github.com/firstdarkdev/modpublisher/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227673984,"owners_count":17802303,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["curseforge","curseforge-api","github","modrinth","modrinth-api"],"created_at":"2024-08-01T11:00:32.489Z","updated_at":"2024-12-02T05:14:28.777Z","avatar_url":"https://github.com/firstdarkdev.png","language":"Java","readme":"## ModPublisher\n\nModPublisher is a Gradle Plugin that allows modders to publish their mods to Modrinth, Curseforge and GitHub in one go.\n\nNo need for separate plugins, just one!\n\n---\n\n### Setup\n\nFor full documentation, checkout [ModPublisher Docs](https://modpublisher.fdd-docs.com/)\n\n\u003cdetails open=\"open\"\u003e\u003csummary\u003eGroovy DSL\u003c/summary\u003e\n\nTo use this plugin inside your project, first you have to add our maven.\n\nTo do this, open up `settings.gradle` and add the following:\n\n```groovy\npluginManagement {\n    repositories {\n        gradlePluginPortal()\n        maven {\n            url \"https://maven.firstdark.dev/releases\"\n        }\n        \n        /*\n        For unreleased versions\n        maven {\n            url \"https://maven.firstdark.dev/snapshots\"\n        }\n         */\n    }\n}\n```\n\nNext, in your `build.gradle` add:\n\n![badge](https://maven.firstdarkdev.xyz/api/badge/latest/releases/com/hypherionmc/modutils/modpublisher?color=40c14a\u0026name=modpublisher)\n![badge](https://maven.firstdarkdev.xyz/api/badge/latest/snapshots/com/hypherionmc/modutils/modpublisher?color=40c14a\u0026name=modpublisher-snapshot)\n\n```groovy\nplugins {\n    id \"com.hypherionmc.modutils.modpublisher\" version \"VERSION\"\n}\n```\n\nReplace VERSION with the version above.\n\nFinally, add the following to `build.gradle` file:\n\n```groovy\npublisher {\n    // Setup the required API keys. You only need to define the keys for \n    // the platforms you plan on uploading to\n    apiKeys {\n        // Modrinth Token\n        modrinth System.getenv(\"MODRINTH_TOKEN\")\n        // Curseforge Token\n        curseforge System.getenv(\"CURSE_TOKEN\")\n        // GitHub Token\n        github System.getenv(\"GITHUB_TOKEN\")\n    }\n\n    // Enable Debug mode. When enabled, no files will actually be uploaded\n    setDebug(true)\n    \n    // Curseforge Project ID\n    setCurseID(\"1234\")\n    \n    // Modrinth Project ID\n    setModrinthID(\"dsgfhs79789\")\n    \n    // Type of release. beta, alpha or release\n    // You can also use VersionType.BETA, VersionType.ALPHA or VersionType.RELEASE\n    setVersionType(\"beta\")\n    \n    // Changelog. This can be a file, string, OR, gist/github url\n    // For example: markdown.md, or \"This is my changelog\"\n    // Or: https://raw.githubusercontent.com/hypherionmc/changelogs/changelog.md\n    // Or https://gist.githubusercontent.com/hypherionmc/92f825d3c9337964cc77c9c8c9bf65e6/raw/ceeaaee5b98c688a23398864fe480b84796a1651/test_gist.md\n    setChangelog(\"changelog.md\")\n    \n    // Required for Modrinth/GitHub\n    setProjectVersion(\"1.20.2-${project.version}\")\n    \n    // Fancy display name for the upload.\n    // Will default to the project version if not set\n    setDisplayName(\"[1.20.x] Simple Discord Link - ${project.version}\")\n    \n    // The supported game versions\n    setGameVersions(\"1.20\", \"1.20.1\", \"1.20.2\")\n    \n    // The modloaders your upload supports.\n    // This can also be an Enum from ModLoader,\n    // like setLoaders(ModLoader.FABRIC, ModLoader.FORGE)\n    setLoaders(\"forge\", \"fabric\")\n    \n    // The new Curseforge Environment tag. Optional\n    // Valid values are \"server\", \"client\" or \"both\"\n    // You can also use CurseEnvironment.BOTH, or CurseEnvironment.SERVER or CurseEnvironment.CLIENT\n    setCurseEnvironment(\"both\")\n    \n    // Upload the release, but keep it \"private\" until you are ready\n    // Unreleased feature on CurseForge, working on Modrinth\n    setIsManualRelease(true)\n    \n    // The file to be uploaded. This can be a file, task, or string.\n    // setArtifact(\"build/libs/mymod.jar\")\n    // setArtifact(jar.getArchiveFile().get())\n    // If this is a task, the task specified will be executed before publishing\n    setArtifact(jar)\n    \n    // Override the artifact uploaded to modrinth\n    // setPlatformArtifact(Platform.Modrinth, \"build/libs/mymod.jar\")\n    // setPlatformArtifact(Platform.Modrinth, jar.getArchiveFile().get())\n    // If this is a task, the task specified will be executed before publishing\n    // Valid platforms are modrinth, curseforge and github\n    setPlatformArtifact(\"modrinth\", modrinthJar)\n\n    // Disable the built in Fractureizer scanner\n    setDisableMalwareScanner(true)\n    \n    // Add supported java versions. Currently only used by CurseForge\n    // Supports anything that can be parsed using JavaVersion.toVersion()\n    setJavaVersions(JavaVersion.VERSION_1_8, 11)\n    \n    // Safety check to check if the artifact contains a valid mod metadata entry,\n    // which could possibly mean that the jar is empty\n    setDisableEmptyJarCheck(true)\n    \n    // Additional files to upload. Same as artifact, this can be a task, file or string\n    addAdditionalFile(jar, secondJar)\n\n    // Additional files to upload with a custom display name and changelog.\n    // Currently only supported on Curseforge\n    addAdditionalFile {\n        // File, Task or String\n        artifact jar\n        displayName \"Some Name\"\n        changelog \"Hello Changelog\"\n    }\n}\n```\n\nAdditional values that can be added to the above:\n\n```groovy\n// GitHub options\ngithub {\n    // GitHub repo to publish to. Overrides githubRepo\n    repo = \"OWNER/REPO\"\n\n    // Tag to use for GitHub release. Defaults to version\n    tag = \"v${project.version}\"\n\n    // Whether to create a tag for the GitHub release, if one doesn't exist yet. Defaults to true\n    createTag = true\n\n    // Whether to create the GitHub release if it doesn't exist yet. Defaults to true\n    createRelease = true\n\n    // Whether to update the GitHub release if it already exists. Defaults to true\n    updateRelease = true\n\n    // Whether the release should be left as an unpublished draft.\n    //\n    // If enabled, newly created releases and existing drafts will not be published.\n    // Instead, a draft release is used.\n    //\n    // If disabled, the release will be published.\n    // This option does not allow converting a published release to a draft.\n    //\n    // Defaults to false\n    draft = false\n\n    // The commitish ref the tag should target (ignored when tag already exists)\n    target = \"main\"\n}\n\n// Modrinth Dependencies.\n// Accepts a slug or id\nmodrinthDepends {\n    // Multiple required dependencies\n    required \"fabric-api\", \"craterlib\"\n    \n    // Single dependency\n    required \"fabric-api\"\n    \n    // Optional dependency\n    optional 'optional-dep'\n    \n    // Your mod is not compatible with this mod\n    incompatible 'breaks-with'\n    \n    // Your mod embeds this dependency\n    embedded 'fabric-api'\n}\n\n// Curse Dependencies\ncurseDepends {\n    // Multiple required dependencies\n    required \"fabric-api\", \"craterlib\"\n\n    // Single dependency\n    required \"fabric-api\"\n\n    // Optional dependency\n    optional 'optional-dep'\n\n    // Your mod is not compatible with this mod\n    incompatible 'breaks-with'\n\n    // Your mod embeds this dependency\n    embedded 'fabric-api'\n}\n```\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\u003csummary\u003eKotlin DSL\u003c/summary\u003e\n\nTo use this plugin inside your project, first you have to add our maven.\n\nTo do this, open up `settings.gradle.kts` and add the following:\n\n```kotlin\npluginManagement {\n    repositories {\n        gradlePluginPortal()\n        maven {\n            url = uri(\"https://maven.firstdark.dev/releases\")\n        }\n        \n        /*\n        For Unreleased Versions\n        maven {\n            url = uri(\"https://maven.firstdark.dev/snapshots\")\n        }*/\n    }\n}\n```\n\nNext, in your `build.gradle.kts` add:\n\n![badge](https://maven.firstdarkdev.xyz/api/badge/latest/releases/com/hypherionmc/modutils/modpublisher?color=40c14a\u0026name=modpublisher)\n![badge](https://maven.firstdarkdev.xyz/api/badge/latest/snapshots/com/hypherionmc/modutils/modpublisher?color=40c14a\u0026name=modpublisher-snapshot)\n\n\n```kotlin\nplugins {\n    id(\"com.hypherionmc.modutils.modpublisher\") version \"VERSION\"\n}\n```\n\nReplace VERSION with the version above.\n\nFinally, add the following to `build.gradle.kts` file:\n\n```kotlin\npublisher {\n    // Setup the required API keys. You only need to define the keys for \n    // the platforms you plan on uploading to\n    apiKeys {\n        // Modrinth Token\n        modrinth(System.getenv(\"MODRINTH_TOKEN\"))\n        // Curseforge Token\n        curseforge(System.getenv(\"CURSE_TOKEN\"))\n        // GitHub Token\n        github(System.getenv(\"GITHUB_TOKEN\"))\n    }\n\n    // Enable Debug mode. When enabled, no files will actually be uploaded\n    debug.set(true)\n    \n    // Curseforge Project ID\n    curseID.set(\"12345\")\n    \n    // Modrinth Project ID\n    modrinthID.set(\"sdjkg8867\")\n    \n    // GitHub repo to publish to. Only required for GitHub\n    githubRepo.set(\"OWNER/REPO\")\n    \n    // Type of release. beta, alpha or release\n    // You can also use VersionType.BETA, VersionType.ALPHA or VersionType.RELEASE\n    versionType.set(\"release\")\n    \n    // Changelog. This can be a file, string, OR, gist/github url\n    // For example: markdown.md, or \"This is my changelog\"\n    // Or: https://raw.githubusercontent.com/hypherionmc/changelogs/changelog.md\n    // Or https://gist.githubusercontent.com/hypherionmc/92f825d3c9337964cc77c9c8c9bf65e6/raw/ceeaaee5b98c688a23398864fe480b84796a1651/test_gist.md\n    changelog.set(\"Coming Soon\")\n    \n    // Required for Modrinth/GitHub\n    projectVersion.set(\"1.3.0\")\n    \n    // Fancy display name for the upload.\n    // Will default to the project version if not set\n    displayName.set(\"MyAwesomeMod - Version\")\n    \n    // The supported game versions\n    // setGameVersions(\"1.20\", \"1.20.1\", \"1.20.2\")\n    gameVersions.set(listOf(\"1.19.3\", \"1.19.4\"))\n    \n    // The modloaders your upload supports.\n    // This can also be an Enum from ModLoader,\n    // like setLoaders(ModLoader.FORGE, ModLoader.FABRIC)\n    loaders.set(listOf(\"forge\", \"fabric\"))\n    \n    // The new Curseforge Environment tag. Optional\n    // Valid values are \"server\", \"client\" or \"both\"\n    // You can also use CurseEnvironment.BOTH, or CurseEnvironment.SERVER or CurseEnvironment.CLIENT\n    // setCurseEnvironment(CurseEnvironment.CLIENT)\n    curseEnvironment.set(\"both\")\n\n    // Upload the release, but keep it \"private\" until you are ready\n    // Unreleased feature on CurseForge, working on Modrinth\n    isManualRelease.set(true)\n    \n    // The file to be uploaded. This can be a file, task, or string.\n    // setArtifact(\"build/libs/mymod.jar\")\n    // setArtifact(jar.getArchiveFile().get())\n    // If this is a task, the task specified will be executed before publishing\n    artifact.set(tasks.jar)\n\n    // Override the artifact uploaded to modrinth\n    // setPlatformArtifact(Platform.Modrinth, \"build/libs/mymod.jar\")\n    // setPlatformArtifact(Platform.Modrinth, jar.getArchiveFile().get())\n    // If this is a task, the task specified will be executed before publishing\n    // Valid platforms are modrinth, curseforge and github\n    setPlatformArtifact(\"modrinth\", modrinthJar)\n\n    // Disable the built in Fractureizer scanner\n    disableMalwareScanner.set(true)\n    \n    // Safety check to check if the artifact contains a valid mod metadata entry,\n    // which could possibly mean that the jar is empty\n    disableEmptyJarCheck.set(true)\n\n    // Add supported java versions. Currently only used by CurseForge\n    // Supports anything that can be parsed using JavaVersion.toVersion()\n    setJavaVersions(JavaVersion.VERSION_1_8, 11)\n    \n    // Additional files to upload. Same as artifact, this can be a task, file or string\n    additionalFiles.set(listOf(tasks.jar))\n\n    // Additional files to upload with a custom display name and changelog.\n    // Currently, supports CurseForge only\n    addAdditionalFile {\n        // File, Task or String\n        artifact(tasks.jar)\n        displayName(\"Test Name\")\n        changelog(\"Some Changelog\")\n    }\n}\n```\n\nAdditional values that can be added to the above:\n\n```kotlin\n// GitHub options\ngithub {\n    // GitHub repo to publish to. Overrides githubRepo\n    repo = \"OWNER/REPO\"\n    \n    // Tag to use for GitHub release. Defaults to version\n    tag = \"v${project.version}\"\n\n    // Whether to create a tag for the GitHub release, if one doesn't exist yet. Defaults to true\n    createTag = true\n\n    // Whether to create the GitHub release if it doesn't exist yet. Defaults to true\n    createRelease = true\n\n    // Whether to update the GitHub release if it already exists. Defaults to true\n    updateRelease = true\n\n    // Whether the release should be left as an unpublished draft.\n    //\n    // If enabled, newly created releases and existing drafts will not be published.\n    // Instead, a draft release is used.\n    //\n    // If disabled, the release will be published.\n    // This option does not allow converting a published release to a draft.\n    //\n    // Defaults to false\n    draft = false\n\n    // The commitish ref the tag should target (ignored when tag already exists)\n    target = \"main\"\n}\n\n// Modrinth Dependencies.\n// Accepts a slug or id\nmodrinthDepends {\n    // Multiple required dependencies\n    required(\"fabric-api\", \"craterlib\")\n    \n    // Single dependency\n    required(\"fabric-api\")\n    \n    // Optional dependency\n    optional(\"optional-mod\")\n    \n    // Your mod is not compatible with this mod\n    incompatible(\"breaks-with\")\n    \n    // Your mod embeds this dependency\n    embedded(\"rift\")\n}\n\n// Curse Dependencies\ncurseDepends {\n    // Multiple required dependencies\n    required(\"fabric-api\", \"craterlib\")\n\n    // Single dependency\n    required(\"fabric-api\")\n\n    // Optional dependency\n    optional(\"optional-mod\", \"another-mod\")\n\n    // Your mod is not compatible with this mod\n    incompatible(\"breaks-with\")\n\n    // Your mod embeds this dependency\n    embedded(\"rift\")\n}\n```\n\u003c/details\u003e\n","funding_links":[],"categories":["Project/version management tools"],"sub_categories":["In-game"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirstdarkdev%2Fmodpublisher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirstdarkdev%2Fmodpublisher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirstdarkdev%2Fmodpublisher/lists"}