Skip to content

Commit

Permalink
Readd autopublish, jij yacl
Browse files Browse the repository at this point in the history
  • Loading branch information
Luligabi1 committed Nov 15, 2024
1 parent 03b5396 commit 95e0a5c
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 2 deletions.
69 changes: 68 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
id 'idea'
id 'maven-publish'
id 'net.neoforged.gradle.userdev' version '7.0.165'
id "me.modmuss50.mod-publish-plugin" version '0.7.4'
}

tasks.named('wrapper', Wrapper).configure {
Expand Down Expand Up @@ -77,7 +78,7 @@ dependencies {
implementation "thedarkcolour:kotlinforforge-neoforge:${project.kotlinforforge_version}"

compileOnly "dev.isxander:yet-another-config-lib:${project.yacl_version}-neoforge"
// FIXME include compileOnly("dev.isxander:yet-another-config-lib:${project.yacl_version}-neoforge")
jarJar "dev.isxander:yet-another-config-lib:${project.yacl_version}-neoforge"
runtimeOnly "dev.isxander:yet-another-config-lib:${project.yacl_version}-neoforge"

compileOnly "me.shedaniel:RoughlyEnoughItems-neoforge:${project.rei_version}"
Expand Down Expand Up @@ -137,4 +138,70 @@ idea {
downloadSources = true
downloadJavadoc = true
}
}

ext.getChangeLog = { ->
return "- First Neoforge release"
}

publishMods {
changelog = project.getChangeLog()
type = STABLE

def optionsCurseforge = curseforgeOptions {
accessToken = providers.environmentVariable("CURSEFORGE_API_KEY")
projectId = "576449"
projectSlug = "coxinha-utilities"
minecraftVersions.add("${project.minecraft_version}")
}

def optionsModrinth = modrinthOptions {
accessToken = providers.environmentVariable("MODRINTH_TOKEN")
projectId = "NXqpbY3F"
minecraftVersions.add("${project.minecraft_version}")
}


curseforge("curseforgeForge") {
from optionsCurseforge
modLoaders.add("neoforge")
file = jar.archiveFile
displayName = "${rootProject.mod_version} (NeoForge)"
version = "${rootProject.mod_version}-neoforge"

optional {
slug = "emi"
}
optional {
slug = "kibe"
}

announcementTitle = "Download from CurseForge"
}


modrinth("modrinthForge") {
from optionsModrinth
modLoaders.add("neoforge")
file = jar.archiveFile
displayName = "${rootProject.mod_version} (NeoForge)"
version = "${rootProject.mod_version}-neoforge"

optional {
slug = "emi"
}
optional {
slug = "kibe"
}

announcementTitle = "Download from Modrinth"
}

discord {
webhookUrl = providers.environmentVariable("CAFETERIA_MOD_RELEASE_WEBHOOK")
username = "Coxinha Utilities (Neoforge)"
avatarUrl = "https://cdn.modrinth.com/data/NXqpbY3F/icon.png"

content = changelog.map { "# Coxinha Utilities (Neoforge) " + (project.mod_version as String) + " has been released \n" + it}
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ mod_group_id=me.luligabi.coxinhautilities
mod_authors=Luligabi
mod_description=A utility mod featuring stuff missing from Kibe Utilities.
# Testing
active_recipe_viewer=rei
active_recipe_viewer=emi
# Publishing
curseforge_id=576449
modrinth_id=NXqpbY3F

0 comments on commit 95e0a5c

Please sign in to comment.