Skip to content

Commit

Permalink
Switch to java 21
Browse files Browse the repository at this point in the history
  • Loading branch information
rainbowdashlabs committed Oct 10, 2024
1 parent 63c071e commit 2a922d3
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use nix
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar
/run/
/.direnv
16 changes: 12 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import io.papermc.hangarpublishplugin.model.Platforms

plugins {
id("com.github.johnrengelman.shadow") version "8.1.1"
id("com.gradleup.shadow") version "8.3.3"
java
`maven-publish`
alias(libs.plugins.hangar)
alias(libs.plugins.hangar)
id("de.chojo.publishdata") version "1.4.0"
id("net.minecrell.plugin-yml.bukkit") version "0.6.0"
id("xyz.jpenilla.run-paper") version "2.3.1"
}

repositories {
Expand All @@ -26,7 +27,7 @@ dependencies {
compileOnly(libs.spigot.v16)
compileOnly("com.mojang", "authlib", "1.5.25")
compileOnly(libs.jetbrains.annotations)
compileOnly("net.citizensnpcs", "citizens-main","2.0.30-SNAPSHOT") {
compileOnly("net.citizensnpcs", "citizens-main", "2.0.30-SNAPSHOT") {
exclude("*")
}
compileOnly("world.bentobox", "bentobox", "2.3.0-SNAPSHOT")
Expand Down Expand Up @@ -66,7 +67,7 @@ java {
withSourcesJar()
withJavadocJar()
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
languageVersion.set(JavaLanguageVersion.of(21))
}
}

Expand Down Expand Up @@ -136,6 +137,13 @@ tasks {
build {
dependsOn(shadowJar)
}

runServer {
// Configure the Minecraft version for our task.
// This is the only required configuration besides applying the plugin.
// Your plugin's jar (or shadowJar if present) will be used automatically.
minecraftVersion("1.21.1")
}
}

bukkit {
Expand Down
11 changes: 11 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{ pkgs ? import <nixpkgs> {}, ... }:

let
jdk = pkgs.jdk21;
gradle= pkgs.gradle.override { java = jdk; };
in
pkgs.mkShell
{
packages = with pkgs; [jdk gradle];
}

0 comments on commit 2a922d3

Please sign in to comment.