Skip to content
Closed
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
184 changes: 92 additions & 92 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
@@ -1,93 +1,93 @@
plugins {
id 'multiloader-loader'
id 'fabric-loom' version '1.10-SNAPSHOT'
id "com.modrinth.minotaur" version "2.+"
id "net.darkhax.curseforgegradle" version "1.1.24"
}

repositories {
maven {
name = "Terraformers"
url = "https://maven.terraformersmc.com/"
}
}

dependencies {
minecraft "com.mojang:minecraft:${minecraft_version}"
mappings loom.layered {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-${parchment_minecraft}:${parchment_version}@zip")
}
modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}"
modImplementation("com.terraformersmc:modmenu:${project.modmenu_version}")

include implementation('com.moandjiezana.toml:toml4j:0.7.2') {
transitive = false
}
}

loom {
def aw = project(":common").file("src/main/resources/${mod_id}.accesswidener")
if (aw.exists()) {
accessWidenerPath.set(aw)
}
mixin {
defaultRefmapName.set("${mod_id}.refmap.json")
}
runs {
client {
client()
setConfigName("Fabric Client")
ideConfigGenerated(true)
runDir("runs/client")
}

datagen {
client()
setConfigName("Fabric Data Generation")
ideConfigGenerated(true)

property("fabric-api.datagen")
property("fabric-api.datagen.strict-validation", "true") // '--all' sets '--validate' to true as well
property("fabric-api.datagen.output-dir", file("src/main/generated").absolutePath)
runDir("build/datagen")
}
}
}

sourceSets.main.resources { srcDir "src/main/generated" }

modrinth { // Make sure it runs after build!
token = System.getenv("MODRINTH") // An environment property called MODRINTH that is your token, set via Gradle CLI, GitHub Actions, Idea Run Configuration, or other
projectId = 'F39sgYmY'
versionName = "Menu Pause ${project.version} (${project.minecraft_version})" // The version of the mod to upload.
versionNumber = "${project.version}" // Will fail if Modrinth has this version already
changelog = System.getenv("CHANGELOG")
versionType = "RELEASE"
// On fabric, use 'remapJar' instead of 'jar'
uploadFile = remapJar // This is the java jar task. If it can't find the jar, try 'jar.outputs.getFiles().asPath' in place of 'jar'
gameVersions = [project.minecraft_version] // Call this multiple times to add multiple game versions. There are tools that can help you generate the list of versions
// gameVersions = [project.additional_supported_version]
loaders = ['fabric']
}

tasks.register('curseforge', net.darkhax.curseforgegradle.TaskPublishCurseForge) {
// This token is used to authenticate with CurseForge. It should be handled
// with the same level of care and security as your actual password. You
// should never share your token with an untrusted source or publish it
// publicly to GitHub or embed it within a project. The best practice is to
// store this token in an environment variable or a build secret.
apiToken = System.getenv("CURSEFORGE")

// Tells CurseForgeGradle to publish the output of the jar task. This will
// return a UploadArtifact object that can be used to further configure the
// file.

def mainFile = upload("495153", remapJar)
mainFile.changelog = System.getenv("CHANGELOG")
mainFile.changelogType = "markdown"
mainFile.displayName = "Menu Pause Fabric v${project.version} (${project.minecraft_version})"
mainFile.releaseType = "release"
// mainFile.addGameVersion(project.additional_supported_version)
plugins {
id 'multiloader-loader'
id 'fabric-loom' version '1.10-SNAPSHOT'
id "com.modrinth.minotaur" version "2.+"
id "net.darkhax.curseforgegradle" version "1.1.26"
}
repositories {
maven {
name = "Terraformers"
url = "https://maven.terraformersmc.com/"
}
}
dependencies {
minecraft "com.mojang:minecraft:${minecraft_version}"
mappings loom.layered {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-${parchment_minecraft}:${parchment_version}@zip")
}
modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}"
modImplementation("com.terraformersmc:modmenu:${project.modmenu_version}")
include implementation('com.moandjiezana.toml:toml4j:0.7.2') {
transitive = false
}
}
loom {
def aw = project(":common").file("src/main/resources/${mod_id}.accesswidener")
if (aw.exists()) {
accessWidenerPath.set(aw)
}
mixin {
defaultRefmapName.set("${mod_id}.refmap.json")
}
runs {
client {
client()
setConfigName("Fabric Client")
ideConfigGenerated(true)
runDir("runs/client")
}
datagen {
client()
setConfigName("Fabric Data Generation")
ideConfigGenerated(true)
property("fabric-api.datagen")
property("fabric-api.datagen.strict-validation", "true") // '--all' sets '--validate' to true as well
property("fabric-api.datagen.output-dir", file("src/main/generated").absolutePath)
runDir("build/datagen")
}
}
}
sourceSets.main.resources { srcDir "src/main/generated" }
modrinth { // Make sure it runs after build!
token = System.getenv("MODRINTH") // An environment property called MODRINTH that is your token, set via Gradle CLI, GitHub Actions, Idea Run Configuration, or other
projectId = 'F39sgYmY'
versionName = "Menu Pause ${project.version} (${project.minecraft_version})" // The version of the mod to upload.
versionNumber = "${project.version}" // Will fail if Modrinth has this version already
changelog = System.getenv("CHANGELOG")
versionType = "RELEASE"
// On fabric, use 'remapJar' instead of 'jar'
uploadFile = remapJar // This is the java jar task. If it can't find the jar, try 'jar.outputs.getFiles().asPath' in place of 'jar'
gameVersions = [project.minecraft_version] // Call this multiple times to add multiple game versions. There are tools that can help you generate the list of versions
// gameVersions = [project.additional_supported_version]
loaders = ['fabric']
}
tasks.register('curseforge', net.darkhax.curseforgegradle.TaskPublishCurseForge) {
// This token is used to authenticate with CurseForge. It should be handled
// with the same level of care and security as your actual password. You
// should never share your token with an untrusted source or publish it
// publicly to GitHub or embed it within a project. The best practice is to
// store this token in an environment variable or a build secret.
apiToken = System.getenv("CURSEFORGE")
// Tells CurseForgeGradle to publish the output of the jar task. This will
// return a UploadArtifact object that can be used to further configure the
// file.
def mainFile = upload("495153", remapJar)
mainFile.changelog = System.getenv("CHANGELOG")
mainFile.changelogType = "markdown"
mainFile.displayName = "Menu Pause Fabric v${project.version} (${project.minecraft_version})"
mainFile.releaseType = "release"
// mainFile.addGameVersion(project.additional_supported_version)
}
166 changes: 83 additions & 83 deletions neoforge/build.gradle
Original file line number Diff line number Diff line change
@@ -1,84 +1,84 @@
plugins {
id 'multiloader-loader'
id 'net.neoforged.moddev'
id "com.modrinth.minotaur" version "2.+"
id "net.darkhax.curseforgegradle" version "1.1.24"
}

neoForge {
version = neoforge_version
// Automatically enable neoforge AccessTransformers if the file exists
def at = project(':common').file('src/main/resources/META-INF/accesstransformer.cfg')
if (at.exists()) {
accessTransformers.from(at.absolutePath)
}
parchment {
minecraftVersion = parchment_minecraft
mappingsVersion = parchment_version
}
runs {
configureEach {
systemProperty('neoforge.enabledGameTestNamespaces', mod_id)
ideName = "NeoForge ${it.name.capitalize()} (${project.path})" // Unify the run config names with fabric
}
client {
client()
}
data {
data()
programArguments.addAll '--mod', project.mod_id, '--all', '--flat', '--output', file('src/main/generated').getAbsolutePath(), '--existing', file('src/main/resources').getAbsolutePath()
}
}
mods {
"${mod_id}" {
sourceSet sourceSets.main
}
}
}

sourceSets.main.resources { srcDir 'src/main/generated' }

dependencies {
// Mod Dependencies
jarJar(implementation('com.moandjiezana.toml:toml4j:0.7.2')) {
transitive = false
}
additionalRuntimeClasspath "com.moandjiezana.toml:toml4j:0.7.2"
}

modrinth { // Make sure it runs after build!
token = System.getenv("MODRINTH") // An environment property called MODRINTH that is your token, set via Gradle CLI, GitHub Actions, Idea Run Configuration, or other
projectId = 'F39sgYmY'
versionName = "Menu Pause ${project.version} (${project.minecraft_version})" // The version of the mod to upload.
versionNumber = "${project.version}" // Will fail if Modrinth has this version already
changelog = System.getenv("CHANGELOG")
versionType = "RELEASE"
syncBodyFrom = rootProject.file("README.md").text
// On fabric, use 'remapJar' instead of 'jar'
// uploadFile = jar.outputs.getFiles().asPath.replace(".jar", "-all.jar") // This is the java jar task. If it can't find the jar, try 'jar.outputs.getFiles().asPath' in place of 'jar'
uploadFile = jar
gameVersions = [project.minecraft_version] // Call this multiple times to add multiple game versions. There are tools that can help you generate the list of versions
// gameVersions = [project.additional_supported_version]
loaders = ['neoforge']
}

tasks.register('curseforge', net.darkhax.curseforgegradle.TaskPublishCurseForge) {
// This token is used to authenticate with CurseForge. It should be handled
// with the same level of care and security as your actual password. You
// should never share your token with an untrusted source or publish it
// publicly to GitHub or embed it within a project. The best practice is to
// store this token in an environment variable or a build secret.
apiToken = System.getenv("CURSEFORGE")

// Tells CurseForgeGradle to publish the output of the jar task. This will
// return a UploadArtifact object that can be used to further configure the
// file.

//def mainFile = upload("495153", jar.outputs.getFiles().asPath.replace(".jar", "-all.jar"))
def mainFile = upload("495153", jar)
mainFile.changelog = System.getenv("CHANGELOG")
mainFile.changelogType = "markdown"
mainFile.displayName = "Menu Pause NeoForge v${project.version} (${project.minecraft_version})"
mainFile.releaseType = "release"
// mainFile.addGameVersion(project.additional_supported_version)
plugins {
id 'multiloader-loader'
id 'net.neoforged.moddev'
id "com.modrinth.minotaur" version "2.+"
id "net.darkhax.curseforgegradle" version "1.1.26"
}
neoForge {
version = neoforge_version
// Automatically enable neoforge AccessTransformers if the file exists
def at = project(':common').file('src/main/resources/META-INF/accesstransformer.cfg')
if (at.exists()) {
accessTransformers.from(at.absolutePath)
}
parchment {
minecraftVersion = parchment_minecraft
mappingsVersion = parchment_version
}
runs {
configureEach {
systemProperty('neoforge.enabledGameTestNamespaces', mod_id)
ideName = "NeoForge ${it.name.capitalize()} (${project.path})" // Unify the run config names with fabric
}
client {
client()
}
data {
data()
programArguments.addAll '--mod', project.mod_id, '--all', '--flat', '--output', file('src/main/generated').getAbsolutePath(), '--existing', file('src/main/resources').getAbsolutePath()
}
}
mods {
"${mod_id}" {
sourceSet sourceSets.main
}
}
}
sourceSets.main.resources { srcDir 'src/main/generated' }
dependencies {
// Mod Dependencies
jarJar(implementation('com.moandjiezana.toml:toml4j:0.7.2')) {
transitive = false
}
additionalRuntimeClasspath "com.moandjiezana.toml:toml4j:0.7.2"
}
modrinth { // Make sure it runs after build!
token = System.getenv("MODRINTH") // An environment property called MODRINTH that is your token, set via Gradle CLI, GitHub Actions, Idea Run Configuration, or other
projectId = 'F39sgYmY'
versionName = "Menu Pause ${project.version} (${project.minecraft_version})" // The version of the mod to upload.
versionNumber = "${project.version}" // Will fail if Modrinth has this version already
changelog = System.getenv("CHANGELOG")
versionType = "RELEASE"
syncBodyFrom = rootProject.file("README.md").text
// On fabric, use 'remapJar' instead of 'jar'
// uploadFile = jar.outputs.getFiles().asPath.replace(".jar", "-all.jar") // This is the java jar task. If it can't find the jar, try 'jar.outputs.getFiles().asPath' in place of 'jar'
uploadFile = jar
gameVersions = [project.minecraft_version] // Call this multiple times to add multiple game versions. There are tools that can help you generate the list of versions
// gameVersions = [project.additional_supported_version]
loaders = ['neoforge']
}
tasks.register('curseforge', net.darkhax.curseforgegradle.TaskPublishCurseForge) {
// This token is used to authenticate with CurseForge. It should be handled
// with the same level of care and security as your actual password. You
// should never share your token with an untrusted source or publish it
// publicly to GitHub or embed it within a project. The best practice is to
// store this token in an environment variable or a build secret.
apiToken = System.getenv("CURSEFORGE")
// Tells CurseForgeGradle to publish the output of the jar task. This will
// return a UploadArtifact object that can be used to further configure the
// file.
//def mainFile = upload("495153", jar.outputs.getFiles().asPath.replace(".jar", "-all.jar"))
def mainFile = upload("495153", jar)
mainFile.changelog = System.getenv("CHANGELOG")
mainFile.changelogType = "markdown"
mainFile.displayName = "Menu Pause NeoForge v${project.version} (${project.minecraft_version})"
mainFile.releaseType = "release"
// mainFile.addGameVersion(project.additional_supported_version)
}