diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 115fbd3..f1cf0b1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - - name: Set up JDK 25 + - name: Set up Java LTS uses: actions/setup-java@v6 with: java-version: 25 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e880fc7..1975e15 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,7 +12,7 @@ Keep each change focused. Avoid unrelated formatting and dependency updates. ## Prepare a checkout -Use JDK 25 for the Gradle daemon. Java compilation selects the Java 21 toolchain declared in the build. +Use the latest Java LTS release (currently 25) for the Gradle daemon. Java compilation uses the Java 25 toolchain declared in the build. Run the commands below from the repository root unless a command names another directory. On Windows, use `gradlew.bat` in place of `./gradlew` for Gradle commands. @@ -55,3 +55,8 @@ Add a body when the reason or compatibility impact is not obvious. For vulnerabilities, follow [the security reporting instructions](SECURITY.md). Remove credentials and private data from examples, logs, and screenshots. + +## Java LTS updates + +Renovate groups Java workflow, daemon, and compiler updates and limits them to LTS releases. +When updating the daemon version, run `./gradlew updateDaemonJvm` to refresh its download URLs. diff --git a/README.md b/README.md index e1aa8db..6ffae36 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,8 @@ Create custom text commands on velocity. Read [the contribution guide](CONTRIBUTING.md) for development and review. Use [the support guide](SUPPORT.md) for questions and issue routing. + +## Java requirements + +Build and run MiniCommands with Java 25 or newer and Velocity 4. +Use the latest Java LTS release (currently 25) for development. diff --git a/build.gradle.kts b/build.gradle.kts index 320201a..f876e88 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -44,7 +44,7 @@ repositories { java { toolchain { - languageVersion = JavaLanguageVersion.of(21) + languageVersion = JavaLanguageVersion.of(25) } } @@ -56,8 +56,8 @@ dependencies { rewrite("org.openrewrite.recipe:rewrite-migrate-java:3.42.1") rewrite("org.openrewrite.recipe:rewrite-rewrite:0.30.0") - compileOnly("com.velocitypowered:velocity-api:3.5.1") - annotationProcessor("com.velocitypowered:velocity-api:3.5.1") + compileOnly("com.velocitypowered:velocity-api:4.3.1") + annotationProcessor("com.velocitypowered:velocity-api:4.3.1") compileOnly("net.kyori:adventure-text-minimessage:4.26.1") compileOnly("io.github.miniplaceholders:miniplaceholders-api:3.1.0") diff --git a/renovate.json b/renovate.json index b53073f..186582a 100644 --- a/renovate.json +++ b/renovate.json @@ -1,11 +1,49 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": ["config:base", "group:allNonMajor", ":semanticCommits"], + "extends": [ + "config:recommended", + "group:allNonMajor", + ":semanticCommits", + "workarounds:javaLTSVersions" + ], "packageRules": [ { - "matchUpdateTypes": ["minor", "patch", "pin", "digest"], + "matchUpdateTypes": [ + "minor", + "patch", + "pin", + "digest" + ], "automerge": true, "automergeType": "branch" + }, + { + "matchDatasources": [ + "java-version" + ], + "matchPackageNames": [ + "java-jdk" + ], + "groupName": "Java LTS", + "groupSlug": "java-lts", + "automerge": false + } + ], + "customManagers": [ + { + "customType": "regex", + "managerFilePatterns": [ + "/\\.gradle\\.kts$/", + "/(^|/)gradle-daemon-jvm\\.properties$/" + ], + "matchStrings": [ + "JavaLanguageVersion\\.of\\((?\\d+)\\)", + "UpgradeToJava(?\\d+)", + "toolchainVersion=(?\\d+)" + ], + "depNameTemplate": "java-jdk", + "datasourceTemplate": "java-version", + "versioningTemplate": "java" } ] }