Skip to content

Commit

Permalink
Configure GitHub publishing.
Browse files Browse the repository at this point in the history
  • Loading branch information
Crystal-Spider committed May 16, 2024
1 parent 7813c1d commit c37ec02
Showing 1 changed file with 9 additions and 85 deletions.
94 changes: 9 additions & 85 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
plugins {
id "org.sonarqube" version "4.4.1.3373"
id "org.jetbrains.gradle.plugin.idea-ext" version "1.1.7"
// id "com.modrinth.minotaur" version "2.+" apply false
// id "me.hypherionmc.cursegradle" version "2.0.1" apply false
// id "com.github.breadmoirai.github-release" version "2.5.+" apply false
id "com.hypherionmc.modutils.modpublisher" version "2.1.2" apply false
id "fabric-loom" version "1.5-SNAPSHOT" apply false
}
Expand All @@ -24,9 +21,6 @@ subprojects { subproject ->
apply plugin: "java"
apply plugin: "idea"
apply plugin: "java-library"
// apply plugin: "com.modrinth.minotaur"
// apply plugin: "me.hypherionmc.cursegradle"
// apply plugin: "com.github.breadmoirai.github-release"
apply plugin: "com.hypherionmc.modutils.modpublisher"
apply plugin: "maven-publish"
if (isFabric) {
Expand Down Expand Up @@ -201,6 +195,15 @@ subprojects { subproject ->
setDisplayName("[${loader} - ${minecraft_version}] ${mod_title} v${mod_version}")
setJavaVersions([JavaVersion.VERSION_17])
setCurseEnvironment("both") // "server", "client" or "both".
github {
repo = "${github_user}/${mod_id_kebab}"
tag = "v${project.version}"
createTag = true
createRelease = true
updateRelease = true
draft = false
target = minecraft_version
}
modrinthDepends {
switch (loader) {
case "Fabric":
Expand Down Expand Up @@ -228,85 +231,6 @@ subprojects { subproject ->
}
}

// githubRelease {
// token = System.getenv("GITHUB_TOKEN") ?: ""
// owner = github_user
// repo = mod_id_kebab
// tagName = "v${project.version}"
// targetCommitish = minecraft_version
// releaseName = "v${project.version}"
// generateReleaseNotes = false
// body = changelog_body
// draft = false
// prerelease = version_type != "release"
// releaseAssets = isFabric ? remapJar : jar
// allowUploadToExisting = true
// overwrite = false
// dryRun = noPublish
// }
//
// modrinth {
// token = System.getenv("MODRINTH_TOKEN") ?: ""
// projectId = mod_id_kebab
// versionNumber = mod_version
// versionName = "[${loader} - ${minecraft_version}] ${mod_title} v${mod_version}"
// changelog = changelog_body
// uploadFile = isFabric ? remapJar : jar
// versionType = version_type
// gameVersions = [minecraft_version]
// loaders = [loader.toLowerCase()]
// dependencies {
// switch (loader) {
// case "Fabric":
// required.project "fabric-api"
// optional.project "forge-config-api-port"
// break
// case "Forge":
// optional.project "forge-config-api-port"
// break
// case "NeoForge":
// break
// }
// }
// debugMode = noPublish
// }
//
// curseforge {
// apiKey = System.getenv("CURSEFORGE_TOKEN") ?: ""
// project {
// id = curseforge_id
// changelogType = "markdown"
// changelog = changelog_body
// releaseType = version_type
// if (!noPublish) {
// addGameVersion loader
// }
// addGameVersion minecraft_version
// mainArtifact(isFabric ? remapJar : jar) {
// displayName = "[${loader} - ${minecraft_version}] ${mod_title} v${mod_version}"
// }
// relations {
// switch (loader) {
// case "Fabric":
// optionalDependency "forge-config-api-port-fabric"
// break
// case "Forge":
// optionalDependency "forge-config-api-port-fabric"
// break
// case "NeoForge":
// break
// }
// }
// }
// options {
// detectNewerJava = true
// forgeGradleIntegration = false
// fabricIntegration = isFabric
// detectFabricApi = isFabric
// debug = noPublish
// }
// }

tasks.register("publishLoader") {
group = "publishing"
description = "Publish ${loader} specific versions to all platforms"
Expand Down

0 comments on commit c37ec02

Please sign in to comment.