Skip to content

Commit d8aaf7a

Browse files
himekifeeclaude
andcommitted
chore: remove publisher blocks from build files
Publishing is handled by CI actions, so the publisher configuration in the build.gradle files is not needed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 408c906 commit d8aaf7a

4 files changed

Lines changed: 0 additions & 674 deletions

File tree

fabric/build.gradle

Lines changed: 0 additions & 182 deletions
Original file line numberDiff line numberDiff line change
@@ -74,185 +74,3 @@ sourcesJar {
7474
from commonSources.archiveFile.map { zipTree(it) }
7575
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
7676
}
77-
78-
publisher {
79-
// Setup the required API keys. You only need to define the keys for
80-
// the platforms you plan on uploading to
81-
apiKeys {
82-
// Modrinth Token
83-
modrinth System.getenv("MODRINTH_TOKEN")
84-
// Curseforge Token
85-
curseforge System.getenv("CURSE_TOKEN")
86-
// GitHub Token
87-
//github System.getenv("GITHUB_TOKEN")
88-
}
89-
90-
// Enable Debug mode. When enabled, no files will actually be uploaded
91-
setDebug(publish_debug_mode.toBoolean())
92-
93-
// Modrinth Project ID
94-
setModrinthID(modrinth_id)
95-
96-
// Curseforge Project ID
97-
setCurseID(curseforge_id)
98-
99-
// Type of release. beta, alpha or release
100-
// You can also use VersionType.BETA, VersionType.ALPHA or VersionType.RELEASE
101-
setVersionType(release_type)
102-
103-
// Changelog. This can be a file, string, OR, gist/github url
104-
// For example: markdown.md, or "This is my changelog"
105-
// Or: https://raw.githubusercontent.com/hypherionmc/changelogs/changelog.md
106-
// Or https://gist.githubusercontent.com/hypherionmc/92f825d3c9337964cc77c9c8c9bf65e6/raw/ceeaaee5b98c688a23398864fe480b84796a1651/test_gist.md
107-
setChangelog(file("$rootDir/docs/changelogs/${mod_version}.md").text.trim())
108-
109-
// Required for Modrinth/GitHub
110-
setProjectVersion(mod_version)
111-
112-
boolean quiltCompatible
113-
if (rootProject.hasProperty("fabric_is_quilt_compatible")){
114-
quiltCompatible = rootProject.fabric_is_quilt_compatible.toBoolean()
115-
}
116-
else {
117-
quiltCompatible = default_quilt_compatibility.toBoolean()
118-
}
119-
120-
// Fancy display name for the upload.
121-
// Will default to the project version if not set
122-
String DisplayName
123-
if (quiltCompatible) {
124-
DisplayName = "[Fabric & Quilt | ${rootProject.file_name}] ${mod_version}"
125-
}
126-
else {
127-
DisplayName = "[Fabric | ${rootProject.file_name}] ${mod_version}"
128-
}
129-
setDisplayName(DisplayName)
130-
131-
String gameVersionsString = rootProject.compatible_minecraft_versions
132-
def gameVersions = gameVersionsString.replace("[", "").replace("]", "").replaceAll(" ", "").replaceAll("\"", "").split(",")
133-
// The supported game versions
134-
setGameVersions(gameVersions)
135-
136-
// The modloaders your upload supports.
137-
// This can also be an Enum from ModLoader,
138-
// like setLoaders(ModLoader.FABRIC, ModLoader.FORGE)
139-
if (quiltCompatible) {
140-
setLoaders("fabric", "quilt")
141-
}
142-
else {
143-
setLoaders("fabric")
144-
}
145-
146-
// The new Curseforge Environment tag. Optional
147-
// Valid values are "server", "client" or "both"
148-
// You can also use CurseEnvironment.BOTH, or CurseEnvironment.SERVER or CurseEnvironment.CLIENT
149-
setCurseEnvironment(curse_environment)
150-
151-
// The file to be uploaded. This can be a file, task, or string.
152-
// setArtifact("build/libs/mymod.jar")
153-
// setArtifact(jar.getArchiveFile().get())
154-
// If this is a task, the task specified will be executed before publishing
155-
//setArtifact(remapJar)
156-
setArtifact("build/libs/${mod_id}-fabric-${rootProject.versionStr}.jar")
157-
158-
// Override the artifact uploaded to modrinth
159-
// setPlatformArtifact(Platform.Modrinth, "build/libs/mymod.jar")
160-
// setPlatformArtifact(Platform.Modrinth, jar.getArchiveFile().get())
161-
// If this is a task, the task specified will be executed before publishing
162-
// Valid platforms are modrinth, curseforge and github
163-
//setPlatformArtifact("modrinth", modrinthJar)
164-
165-
// Disable the built in Fractureizer scanner
166-
setDisableMalwareScanner(false)
167-
168-
// Add supported java versions. Currently only used by CurseForge
169-
// Supports anything that can be parsed using JavaVersion.toVersion()
170-
setJavaVersions([rootProject.java_version as Integer] as Integer[])
171-
172-
// Safety check to check if the artifact contains a valid mod metadata entry,
173-
// which could possibly mean that the jar is empty
174-
setDisableEmptyJarCheck(false)
175-
176-
// Additional files to upload. Same as artifact, this can be a task, file or string
177-
addAdditionalFile("build/libs/${mod_id}-fabric-${rootProject.versionStr}-sources.jar")
178-
179-
// Additional files to upload with a custom display name and changelog.
180-
// Currently only supported on Curseforge
181-
//addAdditionalFile {
182-
// // File, Task or String
183-
// artifact jar
184-
// displayName "Some Name"
185-
// changelog "Hello Changelog"
186-
//}
187-
188-
// GitHub options
189-
github {
190-
// GitHub repo to publish to. Overrides githubRepo
191-
repo(mod_source)
192-
193-
// Tag to use for GitHub release. Defaults to version
194-
tag("v${mod_version}")
195-
196-
// Whether to create a tag for the GitHub release, if one doesn't exist yet. Defaults to true
197-
createTag(true)
198-
199-
// Whether to create the GitHub release if it doesn't exist yet. Defaults to true
200-
createRelease(true)
201-
202-
// Whether to update the GitHub release if it already exists. Defaults to true
203-
updateRelease(true)
204-
205-
// Whether the release should be left as an unpublished draft.
206-
//
207-
// If enabled, newly created releases and existing drafts will not be published.
208-
// Instead, a draft release is used.
209-
//
210-
// If disabled, the release will be published.
211-
// This option does not allow converting a published release to a draft.
212-
//
213-
// Defaults to false
214-
draft(github_draft.toBoolean())
215-
216-
// The commitish ref the tag should target (ignored when tag already exists)
217-
target(github_target)
218-
219-
displayName(DisplayName)
220-
}
221-
222-
// Modrinth Dependencies.
223-
// Accepts a slug or id
224-
modrinthDepends {
225-
// Multiple required dependencies
226-
//required "fabric-api", "craterlib"
227-
228-
// Single dependency
229-
required "fabric-api"
230-
231-
// Optional dependency
232-
//optional 'optional-dep'
233-
234-
// Your mod is not compatible with this mod
235-
//incompatible 'breaks-with'
236-
237-
// Your mod embeds this dependency
238-
//embedded 'fabric-api'
239-
}
240-
241-
// Curse Dependencies
242-
curseDepends {
243-
// Multiple required dependencies
244-
//required "fabric-api", "craterlib"
245-
246-
// Single dependency
247-
required "fabric-api"
248-
249-
// Optional dependency
250-
//optional 'optional-dep'
251-
252-
// Your mod is not compatible with this mod
253-
//incompatible 'breaks-with'
254-
255-
// Your mod embeds this dependency
256-
//embedded 'fabric-api'
257-
}
258-
}

forge/build.gradle

Lines changed: 0 additions & 164 deletions
Original file line numberDiff line numberDiff line change
@@ -79,167 +79,3 @@ tasks.named('runClient') {
7979
finalizedBy(deleteResources)
8080
}
8181

82-
publisher {
83-
// Setup the required API keys. You only need to define the keys for
84-
// the platforms you plan on uploading to
85-
apiKeys {
86-
// Modrinth Token
87-
modrinth System.getenv("MODRINTH_TOKEN")
88-
// Curseforge Token
89-
curseforge System.getenv("CURSE_TOKEN")
90-
// GitHub Token
91-
//github System.getenv("GITHUB_TOKEN")
92-
}
93-
94-
// Enable Debug mode. When enabled, no files will actually be uploaded
95-
setDebug(publish_debug_mode.toBoolean())
96-
97-
// Modrinth Project ID
98-
setModrinthID(modrinth_id)
99-
100-
// Curseforge Project ID
101-
setCurseID(curseforge_id)
102-
103-
// Type of release. beta, alpha or release
104-
// You can also use VersionType.BETA, VersionType.ALPHA or VersionType.RELEASE
105-
setVersionType(release_type)
106-
107-
// Changelog. This can be a file, string, OR, gist/github url
108-
// For example: markdown.md, or "This is my changelog"
109-
// Or: https://raw.githubusercontent.com/hypherionmc/changelogs/changelog.md
110-
// Or https://gist.githubusercontent.com/hypherionmc/92f825d3c9337964cc77c9c8c9bf65e6/raw/ceeaaee5b98c688a23398864fe480b84796a1651/test_gist.md
111-
setChangelog(file("$rootDir/docs/changelogs/${mod_version}.md").text.trim())
112-
113-
// Required for Modrinth/GitHub
114-
setProjectVersion(mod_version)
115-
116-
// DisplayName is also used for github below
117-
String DisplayName = "[Forge | ${rootProject.file_name}] ${mod_version}"
118-
// Fancy display name for the upload.
119-
// Will default to the project version if not set
120-
setDisplayName(DisplayName)
121-
122-
String gameVersionsString = rootProject.compatible_minecraft_versions
123-
def gameVersions = gameVersionsString.replace("[", "").replace("]", "").replaceAll(" ", "").replaceAll("\"", "").split(",")
124-
// The supported game versions
125-
setGameVersions(gameVersions)
126-
127-
// The modloaders your upload supports.
128-
// This can also be an Enum from ModLoader,
129-
// like setLoaders(ModLoader.FABRIC, ModLoader.FORGE)
130-
setLoaders("forge")
131-
132-
// The new Curseforge Environment tag. Optional
133-
// Valid values are "server", "client" or "both"
134-
// You can also use CurseEnvironment.BOTH, or CurseEnvironment.SERVER or CurseEnvironment.CLIENT
135-
setCurseEnvironment(curse_environment)
136-
137-
// The file to be uploaded. This can be a file, task, or string.
138-
// setArtifact("build/libs/mymod.jar")
139-
// setArtifact(jar.getArchiveFile().get())
140-
// If this is a task, the task specified will be executed before publishing
141-
//setArtifact(remapJar)
142-
setArtifact("build/libs/${mod_id}-forge-${rootProject.versionStr}.jar")
143-
144-
// Override the artifact uploaded to modrinth
145-
// setPlatformArtifact(Platform.Modrinth, "build/libs/mymod.jar")
146-
// setPlatformArtifact(Platform.Modrinth, jar.getArchiveFile().get())
147-
// If this is a task, the task specified will be executed before publishing
148-
// Valid platforms are modrinth, curseforge and github
149-
//setPlatformArtifact("modrinth", modrinthJar)
150-
151-
// Disable the built in Fractureizer scanner
152-
setDisableMalwareScanner(false)
153-
154-
// Add supported java versions. Currently only used by CurseForge
155-
// Supports anything that can be parsed using JavaVersion.toVersion()
156-
setJavaVersions([rootProject.java_version as Integer] as Integer[])
157-
158-
// Safety check to check if the artifact contains a valid mod metadata entry,
159-
// which could possibly mean that the jar is empty
160-
setDisableEmptyJarCheck(false)
161-
162-
// Additional files to upload. Same as artifact, this can be a task, file or string
163-
addAdditionalFile("build/libs/${mod_id}-forge-${rootProject.versionStr}-sources.jar")
164-
165-
// Additional files to upload with a custom display name and changelog.
166-
// Currently only supported on Curseforge
167-
//addAdditionalFile {
168-
// // File, Task or String
169-
// artifact jar
170-
// displayName "Some Name"
171-
// changelog "Hello Changelog"
172-
//}
173-
174-
// GitHub options
175-
github {
176-
// GitHub repo to publish to. Overrides githubRepo
177-
repo(mod_source)
178-
179-
// Tag to use for GitHub release. Defaults to version
180-
tag("v${mod_version}")
181-
182-
// Whether to create a tag for the GitHub release, if one doesn't exist yet. Defaults to true
183-
createTag(true)
184-
185-
// Whether to create the GitHub release if it doesn't exist yet. Defaults to true
186-
createRelease(true)
187-
188-
// Whether to update the GitHub release if it already exists. Defaults to true
189-
updateRelease(true)
190-
191-
// Whether the release should be left as an unpublished draft.
192-
//
193-
// If enabled, newly created releases and existing drafts will not be published.
194-
// Instead, a draft release is used.
195-
//
196-
// If disabled, the release will be published.
197-
// This option does not allow converting a published release to a draft.
198-
//
199-
// Defaults to false
200-
draft(github_draft.toBoolean())
201-
202-
// The commitish ref the tag should target (ignored when tag already exists)
203-
target(github_target)
204-
205-
displayName(DisplayName)
206-
}
207-
208-
// Modrinth Dependencies.
209-
// Accepts a slug or id
210-
modrinthDepends {
211-
// Multiple required dependencies
212-
//required "fabric-api", "craterlib"
213-
214-
// Single dependency
215-
//required "fabric-api"
216-
217-
// Optional dependency
218-
//optional 'optional-dep'
219-
220-
// Your mod is not compatible with this mod
221-
//incompatible 'breaks-with'
222-
223-
// Your mod embeds this dependency
224-
//embedded 'fabric-api'
225-
}
226-
227-
// Curse Dependencies
228-
curseDepends {
229-
// Multiple required dependencies
230-
//required "fabric-api", "craterlib"
231-
232-
// Single dependency
233-
//required "fabric-api"
234-
235-
// Optional dependency
236-
//optional 'optional-dep'
237-
238-
// Your mod is not compatible with this mod
239-
//incompatible 'breaks-with'
240-
241-
// Your mod embeds this dependency
242-
//embedded 'fabric-api'
243-
}
244-
}
245-

0 commit comments

Comments
 (0)