From 3974c12dd81e7a1bcff49992941fe071de13a903 Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Mon, 15 Jun 2020 17:14:07 -0400 Subject: [PATCH] Add CurseForge Build Script --- CHANGELOG.md | 4 ++++ README.md | 7 +++++- build.gradle | 56 ++++++++++++++++++++++++----------------------- gradle.properties | 2 ++ 4 files changed, 41 insertions(+), 28 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..8d689ff --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,4 @@ +# Changelog + +**1.0** +* Initial Release \ No newline at end of file diff --git a/README.md b/README.md index a976422..5f4fa0f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # Twine A simple survival mod for Minecraft encouraging a nomadic lifestyle. +Created For [ModFest 1.16](https://modfest.net/1.16) + ## Backpacks A backpack can only hold one type of item or only hold unstackable items. @@ -47,7 +49,7 @@ Each player has a "personal" stage of an area, the highest online player's diffi - Creepers Target Artificial Blocks ### Stage 5 -- Neural Mobs Are Always Hostile +- Neutral Mobs Are Always Hostile ### Stage 6 - Mobs No Longer Burn In Sunlight @@ -58,5 +60,8 @@ Each player has a 6-element long list in their data. Each element in the list ha ## End Rods Most hostile mobs are afraid of End Rods. +## Changelog +[View Changelog](CHANGELOG.md) + ## Credits Thanks to ```sirikaros``` for the backpack textures! \ No newline at end of file diff --git a/build.gradle b/build.gradle index 940f839..8d9cc6e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,21 +1,17 @@ plugins { id 'fabric-loom' version '0.4-SNAPSHOT' - id 'maven-publish' + id 'com.matthewprenger.cursegradle' version '1.4.0' } -sourceCompatibility = JavaVersion.VERSION_1_8 -targetCompatibility = JavaVersion.VERSION_1_8 - -version = project.mod_version -group = project.maven_group - -repositories { - maven { - name = "Ladysnake Libs" - url = 'https://dl.bintray.com/ladysnake/libs' - } +compileJava { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } +def mod_version = project.mod_version as Object +version = "${mod_version}+${project.minecraft_version}" +group = project.maven_group as Object + dependencies { minecraft "com.mojang:minecraft:${project.minecraft_version}" mappings "net.fabricmc:yarn:${project.minecraft_version}+build.${project.yarn_build}:v2" @@ -25,11 +21,11 @@ dependencies { } processResources { - inputs.property "version", project.version + inputs.property "version", mod_version from(sourceSets.main.resources.srcDirs) { include "fabric.mod.json" - expand "version": project.version + expand "version": mod_version } from(sourceSets.main.resources.srcDirs) { @@ -56,21 +52,27 @@ jar { from "LICENSE" } -// configure the maven publication -publishing { - publications { - mavenJava(MavenPublication) { - artifact(remapJar) { - builtBy remapJar +if (project.hasProperty('curseforge.api_key')) { + curseforge { + apiKey = project.getProperty('curseforge.api_key') + project { + id = project.curseforge_id + changelog = 'A changelog can be found at https://gitea.thebrokenrail.com/TheBrokenRail/Twine/src/branch/master/CHANGELOG.md' + releaseType = 'release' + addGameVersion project.simple_minecraft_version + addGameVersion 'Fabric' + mainArtifact(remapJar) { + displayName = "Twine v${mod_version} for ${project.minecraft_version}" } - artifact(sourcesJar) { - builtBy remapSourcesJar + afterEvaluate { + uploadTask.dependsOn('remapJar') + } + relations { + requiredDependency 'fabric-api' } } - } - repositories { - maven { - url "/data/maven" + options { + forgeGradleIntegration = false } } -} +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 4f8b140..e09bf90 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,6 +4,8 @@ org.gradle.jvmargs = -Xmx1G # Fabric Properties # check these on https://fabricmc.net/use minecraft_version = 1.16-pre6 + curseforge_id = 390000 + simple_minecraft_version = 1.16-Snapshot yarn_build = 1 fabric_loader_version = 0.8.7+build.201