Add CurseForge Build Script
Twine/pipeline/head This commit looks good Details

This commit is contained in:
TheBrokenRail 2020-06-15 17:14:07 -04:00
parent f93d8932d5
commit 3974c12dd8
4 changed files with 41 additions and 28 deletions

4
CHANGELOG.md Normal file
View File

@ -0,0 +1,4 @@
# Changelog
**1.0**
* Initial Release

View File

@ -1,6 +1,8 @@
# Twine # Twine
A simple survival mod for Minecraft encouraging a nomadic lifestyle. A simple survival mod for Minecraft encouraging a nomadic lifestyle.
Created For [ModFest 1.16](https://modfest.net/1.16)
## Backpacks ## Backpacks
A backpack can only hold one type of item or only hold unstackable items. 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 - Creepers Target Artificial Blocks
### Stage 5 ### Stage 5
- Neural Mobs Are Always Hostile - Neutral Mobs Are Always Hostile
### Stage 6 ### Stage 6
- Mobs No Longer Burn In Sunlight - 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 ## End Rods
Most hostile mobs are afraid of End Rods. Most hostile mobs are afraid of End Rods.
## Changelog
[View Changelog](CHANGELOG.md)
## Credits ## Credits
Thanks to ```sirikaros``` for the backpack textures! Thanks to ```sirikaros``` for the backpack textures!

View File

@ -1,21 +1,17 @@
plugins { plugins {
id 'fabric-loom' version '0.4-SNAPSHOT' id 'fabric-loom' version '0.4-SNAPSHOT'
id 'maven-publish' id 'com.matthewprenger.cursegradle' version '1.4.0'
} }
sourceCompatibility = JavaVersion.VERSION_1_8 compileJava {
targetCompatibility = JavaVersion.VERSION_1_8 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'
}
} }
def mod_version = project.mod_version as Object
version = "${mod_version}+${project.minecraft_version}"
group = project.maven_group as Object
dependencies { dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}" minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.minecraft_version}+build.${project.yarn_build}:v2" mappings "net.fabricmc:yarn:${project.minecraft_version}+build.${project.yarn_build}:v2"
@ -25,11 +21,11 @@ dependencies {
} }
processResources { processResources {
inputs.property "version", project.version inputs.property "version", mod_version
from(sourceSets.main.resources.srcDirs) { from(sourceSets.main.resources.srcDirs) {
include "fabric.mod.json" include "fabric.mod.json"
expand "version": project.version expand "version": mod_version
} }
from(sourceSets.main.resources.srcDirs) { from(sourceSets.main.resources.srcDirs) {
@ -56,21 +52,27 @@ jar {
from "LICENSE" from "LICENSE"
} }
// configure the maven publication if (project.hasProperty('curseforge.api_key')) {
publishing { curseforge {
publications { apiKey = project.getProperty('curseforge.api_key')
mavenJava(MavenPublication) { project {
artifact(remapJar) { id = project.curseforge_id
builtBy remapJar 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) { afterEvaluate {
builtBy remapSourcesJar uploadTask.dependsOn('remapJar')
}
relations {
requiredDependency 'fabric-api'
} }
} }
} options {
repositories { forgeGradleIntegration = false
maven {
url "/data/maven"
} }
} }
} }

View File

@ -4,6 +4,8 @@ org.gradle.jvmargs = -Xmx1G
# Fabric Properties # Fabric Properties
# check these on https://fabricmc.net/use # check these on https://fabricmc.net/use
minecraft_version = 1.16-pre6 minecraft_version = 1.16-pre6
curseforge_id = 390000
simple_minecraft_version = 1.16-Snapshot
yarn_build = 1 yarn_build = 1
fabric_loader_version = 0.8.7+build.201 fabric_loader_version = 0.8.7+build.201