Skip to content

Commit

Permalink
change: Update to 1.20.6
Browse files Browse the repository at this point in the history
  • Loading branch information
FlashyReese committed May 10, 2024
1 parent e8ab78b commit dec76d4
Show file tree
Hide file tree
Showing 10 changed files with 103 additions and 95 deletions.
36 changes: 19 additions & 17 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
name: Java CI with Gradle

on: [ push, pull_request ]
on: [ pull_request, push ]

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Upload build artifacts
uses: actions/upload-artifact@v1
with:
name: build-artifacts
path: build/libs
- name: Checkout Repository
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v2
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
check-latest: true
- name: Build with Gradle
run: ./gradlew build
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: 'Command Aliases Artifacts'
path: build/libs
24 changes: 13 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,28 @@ on:
- published

jobs:
build:
runs-on: ubuntu-latest
publish:
if: github.repository_owner == 'FlashyReese'
runs-on: self-hosted
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
- name: Checkout Repository
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v2
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Upload assets to GitHub
java-version: 21
check-latest: true
- name: Upload assets to releases
run: ./gradlew build publishAllPublicationsToFlashyReeseReleasesRepository
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
BUILD_RELEASE: ${{ github.event.prerelease == false }}
- name: Publish to Modrinth & CurseForge
uses: Kir-Antipov/mc-publish@v3.2
uses: Kir-Antipov/mc-publish@v3.3
with:
modrinth-id: dHTBnV1v
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
Expand Down
37 changes: 20 additions & 17 deletions .github/workflows/self-hosted.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
name: Gradle build on push - Self-Hosted Runner
name: Self-Hosted runner CI with Gradle

on: [ push ]

jobs:
build:
selfhost-build:
if: github.repository_owner == 'FlashyReese'
runs-on: self-hosted

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Upload build artifacts
uses: actions/upload-artifact@v1
with:
name: build-artifacts
path: build/libs
- name: Checkout Repository
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v2
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
check-latest: true
- name: Build with Gradle
run: ./gradlew build
- name: Upload Auild Artifacts
uses: actions/upload-artifact@v4
with:
name: 'Sodium Extra Artifacts'
path: build/libs
26 changes: 13 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.2-SNAPSHOT'
id 'fabric-loom' version '1.6-SNAPSHOT'
id 'maven-publish'
id 'io.github.juuxel.loom-quiltflower' version '1.10.0'
}
Expand Down Expand Up @@ -39,32 +39,32 @@ dependencies {
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

// Permissions API
include(modImplementation("me.lucko:fabric-permissions-api:0.2-SNAPSHOT"))
include(modImplementation("me.lucko:fabric-permissions-api:0.3.1"))

// LevelDB
include(implementation("org.iq80.leveldb:leveldb:0.12"))
include(implementation("org.iq80.leveldb:leveldb-api:0.12"))

// MySQL
include(implementation("mysql:mysql-connector-java:8.0.29"))
include(implementation("mysql:mysql-connector-java:8.0.33"))

// Redis
include(implementation("redis.clients:jedis:4.2.3"))
include(implementation("org.apache.commons:commons-pool2:2.11.1"))
include(implementation("redis.clients:jedis:5.1.2"))
include(implementation("org.apache.commons:commons-pool2:2.12.0"))

// Parsing Libraries
include(implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-toml:2.15.2"))
include(implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.15.2"))
include(implementation("org.yaml:snakeyaml:2.0"))
include(implementation("com.fasterxml.jackson.core:jackson-core:2.15.2"))
include(implementation("com.fasterxml.jackson.core:jackson-databind:2.15.2"))
include(implementation("com.fasterxml.jackson.core:jackson-annotations:2.15.2"))
include(implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-toml:2.17.1"))
include(implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.17.1"))
include(implementation("org.yaml:snakeyaml:2.2"))
include(implementation("com.fasterxml.jackson.core:jackson-core:2.17.1"))
include(implementation("com.fasterxml.jackson.core:jackson-databind:2.17.1"))
include(implementation("com.fasterxml.jackson.core:jackson-annotations:2.17.1"))

// Math Evaluator
include(implementation("com.fathzer:javaluator:3.0.3"))

// Placeholders API
modImplementation include("eu.pb4:placeholder-api:2.1.1+1.20")
modImplementation include("eu.pb4:placeholder-api:2.4.0-pre.1+1.20.5")

//modRuntimeOnly "maven.modrinth:lazydfu:0.1.3"
//modRuntimeOnly "maven.modrinth:sodium:mc1.19-0.4.2"
Expand All @@ -82,7 +82,7 @@ processResources {

tasks.withType(JavaCompile).configureEach {
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
it.options.release = 17
it.options.release = 21
}

java {
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ org.gradle.jvmargs=-Xmx2G

# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.20
yarn_mappings=1.20+build.1
loader_version=0.14.21
minecraft_version=1.20.6
yarn_mappings=1.20.6+build.1
loader_version=0.15.11

# Mod Properties
mod_version = 1.0.1
Expand All @@ -14,4 +14,4 @@ org.gradle.jvmargs=-Xmx2G

# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
fabric_version=0.83.0+1.20
fabric_version=0.98.0+1.20.6
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
7 changes: 4 additions & 3 deletions gradlew
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ done
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum

Expand Down Expand Up @@ -197,6 +194,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private void registerArgumentTypes(CommandRegistryAccess registryAccess) {
this.argumentMap.put("minecraft:item_stack", ItemStackArgumentType.itemStack(registryAccess));
this.argumentMap.put("minecraft:item_predicate", ItemPredicateArgumentType.itemPredicate(registryAccess));
this.argumentMap.put("minecraft:color", ColorArgumentType.color());
this.argumentMap.put("minecraft:component", TextArgumentType.text());
this.argumentMap.put("minecraft:component", TextArgumentType.text(registryAccess));
this.argumentMap.put("minecraft:message", MessageArgumentType.message());
this.argumentMap.put("minecraft:nbt_compound_tag", NbtCompoundArgumentType.nbtCompound());
this.argumentMap.put("minecraft:nbt_tag", NbtElementArgumentType.nbtElement());
Expand All @@ -88,11 +88,11 @@ private void registerArgumentTypes(CommandRegistryAccess registryAccess) {
this.argumentMap.put("minecraft:time", TimeArgumentType.time());

// Todo: Allow entire registry keys by creating registry map
this.argumentMap.put("minecraft:entry.attribute_key", RegistryEntryArgumentType.registryEntry(registryAccess, RegistryKeys.ATTRIBUTE));
this.argumentMap.put("minecraft:entry.status_effect_key", RegistryEntryArgumentType.registryEntry(registryAccess, RegistryKeys.STATUS_EFFECT));
this.argumentMap.put("minecraft:entry.enchantment_type", RegistryEntryArgumentType.registryEntry(registryAccess, RegistryKeys.ENCHANTMENT));
this.argumentMap.put("minecraft:entry.biome_key", RegistryEntryArgumentType.registryEntry(registryAccess, RegistryKeys.BIOME));
this.argumentMap.put("minecraft:entry.entity_type_key", RegistryEntryArgumentType.registryEntry(registryAccess, RegistryKeys.ENTITY_TYPE));
this.argumentMap.put("minecraft:entry.attribute_key", RegistryEntryReferenceArgumentType.registryEntry(registryAccess, RegistryKeys.ATTRIBUTE));
this.argumentMap.put("minecraft:entry.status_effect_key", RegistryEntryReferenceArgumentType.registryEntry(registryAccess, RegistryKeys.STATUS_EFFECT));
this.argumentMap.put("minecraft:entry.enchantment_type", RegistryEntryReferenceArgumentType.registryEntry(registryAccess, RegistryKeys.ENCHANTMENT));
this.argumentMap.put("minecraft:entry.biome_key", RegistryEntryReferenceArgumentType.registryEntry(registryAccess, RegistryKeys.BIOME));
this.argumentMap.put("minecraft:entry.entity_type_key", RegistryEntryReferenceArgumentType.registryEntry(registryAccess, RegistryKeys.ENTITY_TYPE));

this.argumentMap.put("minecraft:entry_predicate.biome_key", RegistryEntryPredicateArgumentType.registryEntryPredicate(registryAccess, RegistryKeys.BIOME));
this.argumentMap.put("minecraft:entry_predicate.poi_type_key", RegistryEntryPredicateArgumentType.registryEntryPredicate(registryAccess, RegistryKeys.POINT_OF_INTEREST_TYPE));
Expand Down
Loading

0 comments on commit dec76d4

Please sign in to comment.