Skip to content

Set Java 21 as minimal version #7451

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 20, 2025
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
2 changes: 1 addition & 1 deletion .github/actions/setup-env/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ inputs:
java-version:
description: Java version.
required: false
default: "17"
default: "21"

runs:
using: "composite"
Expand Down
10 changes: 8 additions & 2 deletions api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,15 @@ plugins {
group = 'run.halo.app'
description = 'API of halo project, connecting by other projects.'

tasks.withType(JavaCompile).configureEach {
options.release = 21
options.encoding = 'UTF-8'
}

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}

compileJava.options.encoding = "UTF-8"
Expand Down
12 changes: 8 additions & 4 deletions application/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@ plugins {
}

group = 'run.halo.app'
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'

tasks.withType(JavaCompile).configureEach {
options.release = 21
options.encoding = 'UTF-8'
}

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}

idea {
Expand Down
Loading