Skip to content

Commit 343b0dd

Browse files
Updated to Java 27
- Compact Object Headers are on by default, so the jre creation was simplified - C1 is the new GC, and for the bot usage should be better than Generational Shenandoah
1 parent 8596a61 commit 343b0dd

7 files changed

Lines changed: 20 additions & 30 deletions

File tree

‎.github/workflows/unit-test.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
uses: actions/setup-java@v6
5050
with:
5151
distribution: temurin
52-
java-version: 26
52+
java-version: 27
5353

5454
- name: Setup project and upload dependency graph
5555
uses: gradle/actions/setup-gradle@v6

‎Dockerfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM eclipse-temurin:26-alpine AS builder
1+
FROM eclipse-temurin:27-alpine AS builder
22

33
WORKDIR /app
44

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ And it's done!
5555

5656
## How to set up the project
5757

58-
1. Install JDK 26 (or higher)
58+
1. Install JDK 27 (or higher)
5959
2. Clone the project and move into its folder
6060
3. Run the command `./gradlew build -x test`
6161
4. Import the project inside your IDE as a Gradle project
62-
5. Ensure your IDE is correctly configured to use a Java 26 (or higher) JDK
62+
5. Ensure your IDE is correctly configured to use a Java 27 (or higher) JDK
6363

6464
## How to run the bot locally
6565

‎build.gradle.kts‎

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import com.github.stickerifier.stickerify.JlinkTask
33
import com.github.stickerifier.stickerify.JunitSeedArgumentProvider
44
import io.spring.gradle.nullability.NullabilityOptions
55
import org.gradle.internal.buildconfiguration.DaemonJvmPropertiesConfigurator
6-
import org.gradle.kotlin.dsl.support.serviceOf
76

87
plugins {
98
java
@@ -39,19 +38,19 @@ version = "2.0"
3938
description = "Telegram bot to convert medias into the format required to be used as Telegram stickers"
4039

4140
java.toolchain {
42-
languageVersion = JavaLanguageVersion.of(26)
41+
languageVersion = JavaLanguageVersion.of(27)
4342
vendor = JvmVendorSpec.ADOPTIUM
4443
}
4544

4645
tasks.named<UpdateDaemonJvm>(DaemonJvmPropertiesConfigurator.TASK_NAME) {
47-
languageVersion = JavaLanguageVersion.of(26)
46+
languageVersion = JavaLanguageVersion.of(27)
4847
vendor = JvmVendorSpec.ADOPTIUM
4948
}
5049

5150
val jlink = tasks.register<JlinkTask>("jlink") {
5251
description = "Generates a minimal JRE for the project with compact object headers archive."
5352

54-
options = listOf("--strip-debug", "--no-header-files", "--no-man-pages", "--ignore-modified-runtime")
53+
options = listOf("--strip-debug", "--no-header-files", "--no-man-pages", "--ignore-modified-runtime", "--generate-cds-archive")
5554
modules = listOf(
5655
"java.instrument", // for JUnit
5756
"java.naming", // for Logback
@@ -61,14 +60,6 @@ val jlink = tasks.register<JlinkTask>("jlink") {
6160
)
6261
includeModulePath = false
6362
javaCompiler = javaToolchains.compilerFor(java.toolchain)
64-
65-
val execOps = serviceOf<ExecOperations>()
66-
doLast {
67-
val javaExe = outputDirectory.file("jre/bin/java").get().asFile.absolutePath
68-
execOps.exec {
69-
commandLine(javaExe, "-XX:+UseCompactObjectHeaders", "-Xshare:dump")
70-
}
71-
}
7263
}
7364

7465
val CompileOptions.nullability: NullabilityOptions
@@ -99,7 +90,7 @@ tasks.test {
9990

10091
application {
10192
mainClass = "com.github.stickerifier.stickerify.runner.Main"
102-
applicationDefaultJvmArgs = listOf("-XX:+UseCompactObjectHeaders", "-XX:+UseShenandoahGC", "-XX:ShenandoahGCMode=generational", "--enable-final-field-mutation=ALL-UNNAMED")
93+
applicationDefaultJvmArgs = listOf("--enable-final-field-mutation=ALL-UNNAMED")
10394
}
10495

10596
distributions {

‎buildSrc/build.gradle.kts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ repositories {
77
}
88

99
java.toolchain {
10-
languageVersion = JavaLanguageVersion.of(26)
10+
languageVersion = JavaLanguageVersion.of(27)
1111
vendor = JvmVendorSpec.ADOPTIUM
1212
}
Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
#This file is generated by updateDaemonJvm
2-
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/39e8ce74cee3e629d6fade20d237fff5/redirect
3-
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/b7f6da648647bf05d05a14cdca409f73/redirect
4-
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/39e8ce74cee3e629d6fade20d237fff5/redirect
5-
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/b7f6da648647bf05d05a14cdca409f73/redirect
6-
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/b5e76458e870841069679392d5855834/redirect
7-
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/ef59bf670a5688da71dc8f2e9d1f8b76/redirect
8-
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/39e8ce74cee3e629d6fade20d237fff5/redirect
9-
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/b7f6da648647bf05d05a14cdca409f73/redirect
10-
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/06340fb34ff0b1b2e0cde9562b75744e/redirect
1+
#This file is generated by :updateDaemonJvm
2+
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/22fd4fd9a5dedf12964be0a987f4e90b/redirect
3+
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/c753409d258f3e09db9cfda022a8b52a/redirect
4+
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/22fd4fd9a5dedf12964be0a987f4e90b/redirect
5+
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/c753409d258f3e09db9cfda022a8b52a/redirect
6+
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/7857181a003a2064a9272111de852844/redirect
7+
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/22fd4fd9a5dedf12964be0a987f4e90b/redirect
8+
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/c753409d258f3e09db9cfda022a8b52a/redirect
9+
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/36c6fff412e42f23a647ccc8ac1ee8fe/redirect
1110
toolchainVendor=ADOPTIUM
12-
toolchainVersion=26
11+
toolchainVersion=27

‎qodana.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ include:
55
- name: VulnerableLibrariesGlobal
66
# bump: Qodana /qodana-jvm-community:([\d.]+)/ docker:jetbrains/qodana-jvm-community|/^[\d]{4}\.\d+$/|sort
77
linter: jetbrains/qodana-jvm-community:2026.2
8-
projectJDK: temurin-26
8+
projectJDK: temurin-27

0 commit comments

Comments
 (0)