Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ⏳ Advanced PlayTime Plugin

[![Build Status](https://github.com/imDMK/AdvancedPlayTime/actions/workflows/gradle.yml/badge.svg)](https://github.com/imDMK/AdvancedPlayTime/actions/workflows/gradle.yml)
![JDK](https://img.shields.io/badge/JDK-25-blue.svg)
![JDK](https://img.shields.io/badge/JDK-21%2B-blue.svg)
![Supported versions](https://img.shields.io/badge/Minecraft-1.21--26.2-green.svg)
[![SpigotMC](https://img.shields.io/badge/SpigotMC-yellow.svg)](https://www.spigotmc.org/resources/%E2%8F%B0%EF%B8%8F-advancedplaytime-1-21-1-21-10.130458/)
[![Modrinth](https://img.shields.io/badge/Modrinth-1bd96a.svg)](https://modrinth.com/plugin/advancedplaytime)
Expand All @@ -14,7 +14,7 @@
---

### 📦 Requirements
- **Java 25** or newer on the server.
- **Java 21** or newer on the server.
- **Spigot / Paper 1.21 – 26.2**.

### ✨ Key Features
Expand Down
11 changes: 9 additions & 2 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
object Versions {

/** Java release the plugin is compiled for and requires at runtime. */
const val JAVA = 25
/** JDK the project is built with. */
const val JAVA_TOOLCHAIN = 25

/**
* Bytecode level of the shipped plugin, and therefore the oldest JVM a server may
* run it on. Kept at 21 because that is what Minecraft 1.21 itself requires — a
* higher target would lock the plugin out of the low end of the supported range.
*/
const val JAVA_RELEASE = 21

/** Spigot API the plugin is compiled against (newest supported server). */
const val SPIGOT_API = "26.2-R0.1-SNAPSHOT"
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/playtime-java.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ group = "com.github.imdmk"
version = "3.0.2"

java {
toolchain.languageVersion.set(JavaLanguageVersion.of(Versions.JAVA))
toolchain.languageVersion.set(JavaLanguageVersion.of(Versions.JAVA_TOOLCHAIN))
}

tasks.withType<JavaCompile>().configureEach {
options.compilerArgs = listOf("-Xlint:deprecation", "-parameters")
options.encoding = "UTF-8"
options.release.set(Versions.JAVA)
options.release.set(Versions.JAVA_RELEASE)
}
2 changes: 1 addition & 1 deletion playtime-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ playTimeShadow {
}

shadowJar {
archiveFileName.set("AdvancedPlayTime v${project.version} (MC 1.21-26.2, Java ${Versions.JAVA}).jar")
archiveFileName.set("AdvancedPlayTime v${project.version} (MC 1.21-26.2, Java ${Versions.JAVA_RELEASE}).jar")

mergeServiceFiles()

Expand Down
Loading