Skip to content

Commit

Permalink
Update versions & add menu links (#34)
Browse files Browse the repository at this point in the history
Update Minecraft to 1.21.1, add [Mod
Menu](https://modrinth.com/mod/modmenu) links, and update the following
dependencies:

- [Gradle](https://gradle.org/) 8.10
- [Kotlin
JVM](https://plugins.gradle.org/plugin/org.jetbrains.kotlin.jvm) 2.0.20
- [Spotless](https://github.com/diffplug/spotless) 7.0.0.BETA2
- [Fabric Yarn](https://github.com/FabricMC/yarn) 1.21.1+build.3
- [Fabric Loader](https://github.com/FabricMC/fabric-loader) 0.16.3
- Target is left at
[`>=0.15.11`](https://github.com/FabricMC/fabric-loader/releases/tag/0.15.11),
the first update to support Minecraft 1.21.
- [Fabric API](https://modrinth.com/mod/fabric-api) 0.103.0+1.21.1
- [Fabric Language
Kotlin](https://modrinth.com/mod/fabric-language-kotlin)
1.12.1+kotlin.2.0.20

This is mostly to test publishing.
  • Loading branch information
sam-k authored Aug 27, 2024
1 parent ad7332b commit 63b5250
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 23 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
type: string
minecraft-version:
type: string
minecraft-target-version:
minecraft-target-versions:
type: string

permissions:
Expand All @@ -28,7 +28,7 @@ jobs:
id: get-gradle-properties
uses: ./.github/actions/read-gradle-properties
with:
keys: java_version, mod_version, minecraft_version, minecraft_target_version
keys: java_version, mod_version, minecraft_version, minecraft_target_versions

- name: Resolve environment variables
run: |
Expand All @@ -42,8 +42,8 @@ jobs:
if [ -n "${{ inputs.minecraft-version }}" ]; then \
echo "MINECRAFT_VERSION='${{ inputs.minecraft-version }}'" >> $GITHUB_ENV; \
fi
if [ -n "${{ inputs.minecraft-target-version }}" ]; then \
echo "MINECRAFT_TARGET_VERSION='${{ inputs.minecraft-target-version }}'" >> $GITHUB_ENV; \
if [ -n "${{ inputs.minecraft-target-versions }}" ]; then \
echo "MINECRAFT_TARGET_VERSIONS='${{ inputs.minecraft-target-versions }}'" >> $GITHUB_ENV; \
fi
shell: bash

Expand All @@ -60,7 +60,7 @@ jobs:
version-type: release

java: ${{ env.JAVA_VERSION }}
game-versions: ${{ env.MINECRAFT_TARGET_VERSION }}
game-versions: ${{ env.MINECRAFT_TARGET_VERSIONS }}
files: build/libs/!(*-sources).jar

github-generate-changelog: true
Expand Down
20 changes: 13 additions & 7 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("fabric-loom") version "1.7-SNAPSHOT"
id("maven-publish")
id("org.jetbrains.kotlin.jvm") version "2.0.0"
id("com.diffplug.spotless") version "7.0.0.BETA1"
kotlin("jvm") version "2.0.20"
id("com.diffplug.spotless") version "7.0.0.BETA2"
}

val gradle_version: String by project
Expand All @@ -20,10 +20,11 @@ val archives_base_name: String by project
val access_widener_path: String by project

val minecraft_version: String by project
val minecraft_target_version: String by project
val minecraft_target_versions: String by project

val fabric_yarn_mappings: String by project
val fabric_loader_version: String by project
val fabric_loader_target_versions: String by project
val fabric_api_version: String by project
val fabric_kotlin_version: String by project

Expand Down Expand Up @@ -69,9 +70,8 @@ tasks.named<ProcessResources>("processResources") {
expand(
mapOf(
"version" to version,
"minecraft_version" to minecraft_version,
"minecraft_target_version" to minecraft_target_version,
"fabric_loader_version" to fabric_loader_version,
"minecraft_target_versions" to minecraft_target_versions,
"fabric_loader_target_versions" to fabric_loader_target_versions,
)
)
}
Expand Down Expand Up @@ -106,7 +106,13 @@ extensions.configure<SpotlessExtension>("spotless") {
ratchetFrom("origin/main")

format("misc") {
target("*.gradle", ".git-blame-ignore-revs", ".gitignore")
target(
"*.gradle.*",
".editorconfig",
".git-blame-ignore-revs",
".gitignore",
"gradle.properties",
)

trimTrailingWhitespace()
indentWithSpaces(2)
Expand Down
15 changes: 8 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx1G
org.gradle.parallel=true

# Build properties.
gradle_version=8.8
gradle_version=8.10
java_version=21

# Mod properties.
Expand All @@ -13,14 +13,15 @@ archives_base_name=vanillastar-horses
access_widener_path=src/main/resources/vshorses.accesswidener

# Minecraft properties.
minecraft_version=1.21
minecraft_target_version=1.21
minecraft_version=1.21.1
minecraft_target_versions=1.21.x

# Fabric properties. See https://fabricmc.net/develop.
fabric_yarn_mappings=1.21+build.9
fabric_loader_version=0.15.11
fabric_api_version=0.100.8+1.21
fabric_kotlin_version=1.11.0+kotlin.2.0.0
fabric_yarn_mappings=1.21.1+build.3
fabric_loader_version=0.16.3
fabric_loader_target_versions=>=0.15.11
fabric_api_version=0.103.0+1.21.1
fabric_kotlin_version=1.12.1+kotlin.2.0.20

# Formatter properties.
palantir_java_format_version=2.50.0
Expand Down
18 changes: 14 additions & 4 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"schemaVersion": 1,
"id": "vshorses",
"version": "${version}+${minecraft_version}",
"version": "${version}",
"name": "Vanilla* Horses",
"description": "Makes horses a viable mode of transportation.",
"description": "Ride horses in your world again!",
"authors": [
"Sam Kim"
],
Expand All @@ -14,6 +14,16 @@
},
"license": "MIT",
"icon" : "vshorses-icon.png",
"custom": {
"modmenu": {
"links": {
"modmenu.github_releases" : "https://github.com/sam-k/vanillastar-horses/releases",
"modmenu.modrinth" : "https://modrinth.com/mod/vanillastar-horses",
"modmenu.kofi" : "https://ko-fi.com/sam_k"
},
"update_checker": true
}
},
"environment": "*",
"entrypoints": {
"fabric-datagen": [
Expand All @@ -31,8 +41,8 @@
],
"accessWidener": "vshorses.accesswidener",
"depends": {
"fabricloader": ">=${fabric_loader_version}",
"minecraft": "~${minecraft_target_version}",
"minecraft": "${minecraft_target_versions}",
"fabricloader": "${fabric_loader_target_versions}",
"fabric-api": "*",
"fabric-language-kotlin": "*"
}
Expand Down

0 comments on commit 63b5250

Please sign in to comment.