Skip to content

Commit

Permalink
feat!: update to 1.21 (#22)
Browse files Browse the repository at this point in the history
* chore(nix): flake.nix -> shell.nix

yes yes, much debate here
but i don't care much about updating flake.lock here
and it doesn't have much practical benefit over a shell.nix

* feat!: update to 1.21

* ci: cleanup & modernize workflows

* ci: use new gradle/wrapper-validation-action location
  • Loading branch information
getchoo authored Jul 23, 2024
1 parent 202598b commit 243b8bb
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 87 deletions.
30 changes: 18 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
# certain platforms or Java versions, and provides a first line of defence
# against bad commits.

name: build
name: CI

on:
push:
branches: [main]
tags-ignore:
- "**"
pull_request:
Expand All @@ -14,6 +16,8 @@ on:

jobs:
build:
name: Build

strategy:
matrix:
# Use these Java versions
Expand All @@ -24,30 +28,32 @@ jobs:
os: [ubuntu-latest, windows-latest]

runs-on: ${{ matrix.os }}

steps:
- name: checkout repository
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v4

- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v3

- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v3
- name: Setup JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: ${{ matrix.java }}
cache: "gradle"

- name: make gradle wrapper executable
- name: Make Gradle wrapper executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew

- name: build
- name: Build
run: ./gradlew build

- name: capture build artifacts
- name: Capture build artifacts
if: ${{ runner.os == 'Linux' && matrix.java == '21' }} # Only upload artifacts built from latest java on one OS
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Artifacts
name: jars
path: build/libs/
if-no-files-found: error
14 changes: 9 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: release
name: Release

on:
push:
tags:
Expand All @@ -12,15 +13,18 @@ jobs:
uses: ./.github/workflows/build.yml

make-release:
runs-on: ubuntu-latest
name: Create release
needs: build

runs-on: ubuntu-latest

steps:
- uses: actions/download-artifact@v3
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: Artifacts
name: jars

- name: create release
- name: Create Release
uses: softprops/action-gh-release@v1
with:
draft: true
Expand Down
26 changes: 0 additions & 26 deletions flake.lock

This file was deleted.

37 changes: 0 additions & 37 deletions flake.nix

This file was deleted.

12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/develop/
minecraft_version=1.20.6
yarn_mappings=1.20.6+build.1
minecraft_version=1.21
yarn_mappings=1.21+build.9
loader_version=0.15.11

#Fabric api
fabric_version=0.98.0+1.20.6
# Fabric API
fabric_version=0.100.7+1.21

# Mod Properties
mod_version=0.1.3
mod_version=0.1.4
mod_id=threadtweak
mod_desc=Improve and tweak Minecraft CPU scheduling (again!)
maven_group=com.github.getchoo

# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
mod_menu_version=10.0.0-beta.1
mod_menu_version=11.0.1
16 changes: 16 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
pkgs ? import nixpkgs {
inherit system;
config = { };
overlays = [ ];
},
lib ? pkgs.lib,
nixpkgs ? <nixpkgs>,
system ? builtins.currentSystem,
}:
pkgs.mkShellNoCC {
packages = [
pkgs.jdk21_headless
pkgs.gradle_8
];
}
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"depends": {
"fabricloader": ">=0.15",
"fabric-api": "*",
"minecraft": "~1.20.5",
"minecraft": "~1.21",
"java": ">=21"
}
}

0 comments on commit 243b8bb

Please sign in to comment.