Skip to content

Commit 2d0995d

Browse files
Use eclipse-temurin 25
Also enable Generational Shenandoah GC and Compact Object Headers
1 parent 3ed8921 commit 2d0995d

File tree

6 files changed

+36
-17
lines changed

6 files changed

+36
-17
lines changed

Dockerfile

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

33
WORKDIR /app
44
COPY . .

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 24 (or higher)
58+
1. Install JDK 25 (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 24 (or higher) JDK
62+
5. Ensure your IDE is correctly configured to use a Java 25 (or higher) JDK
6363

6464
## How to run the bot locally
6565

build.gradle

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import com.github.stickerifier.stickerify.JlinkJavaLauncher
22
import com.github.stickerifier.stickerify.JlinkTask
3+
import org.apache.tools.ant.taskdefs.condition.Os
34

45
plugins {
56
id('java')
@@ -31,12 +32,12 @@ version = '2.0'
3132
description = 'Telegram bot to convert medias in the format required to be used as Telegram stickers'
3233

3334
java.toolchain {
34-
languageVersion = JavaLanguageVersion.of(24)
35+
languageVersion = JavaLanguageVersion.of(25)
3536
vendor = JvmVendorSpec.ADOPTIUM
3637
}
3738

3839
updateDaemonJvm {
39-
languageVersion = JavaLanguageVersion.of(24)
40+
languageVersion = JavaLanguageVersion.of(25)
4041
vendor = JvmVendorSpec.ADOPTIUM
4142
}
4243

@@ -84,8 +85,26 @@ jacocoTestReport {
8485
}
8586
}
8687

88+
def generateCohArchive = tasks.register('generateCohArchive', JavaExec) {
89+
inputs.dir(jlink.map { it.outputDirectory.get().asFile })
90+
def dir = Os.isFamily(Os.FAMILY_WINDOWS) ? 'bin' : 'lib'
91+
outputs.file(jlink.map { it.outputDirectory.file("$dir/server/classes_coh.jsa").get().asFile })
92+
93+
javaLauncher = providers.provider { new JlinkJavaLauncher(jlink.get()) }
94+
jvmArgs('-XX:+UseCompactObjectHeaders', '-Xshare:dump')
95+
mainClass = '' // needed to use JavaExec task
96+
}
97+
98+
jlink.configure {
99+
finalizedBy(generateCohArchive)
100+
}
101+
102+
test.mustRunAfter(generateCohArchive)
103+
installDist.mustRunAfter(generateCohArchive)
104+
87105
application {
88106
mainClass = 'com.github.stickerifier.stickerify.runner.Main'
107+
applicationDefaultJvmArgs = ['-XX:+UseCompactObjectHeaders', '-XX:+UseShenandoahGC', '-XX:ShenandoahGCMode=generational']
89108
}
90109

91110
distributions {

buildSrc/build.gradle

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(24)
10+
languageVersion = JavaLanguageVersion.of(25)
1111
vendor = JvmVendorSpec.ADOPTIUM
1212
}
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#This file is generated by updateDaemonJvm
2-
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/6d0adbce30460017fe61d2993dfa663e/redirect
3-
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/50f16d2dc2bb80a421afc1af38fc92e3/redirect
4-
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/6d0adbce30460017fe61d2993dfa663e/redirect
5-
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/50f16d2dc2bb80a421afc1af38fc92e3/redirect
6-
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/4f4ebe4f162f6deb29540c4ebe629d79/redirect
7-
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/79d5995ef1c3e4df39a3b2f545cada5e/redirect
8-
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/6d0adbce30460017fe61d2993dfa663e/redirect
9-
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/50f16d2dc2bb80a421afc1af38fc92e3/redirect
10-
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/61fdd87038cf8b094dadad8566609a29/redirect
2+
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/dcd2068273614ddddeba9b7cbf486173/redirect
3+
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/c7dbcf54bacc4c888b93cc42ef334a2a/redirect
4+
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/dcd2068273614ddddeba9b7cbf486173/redirect
5+
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/c7dbcf54bacc4c888b93cc42ef334a2a/redirect
6+
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/f2eb759b13be68e51cbe892c2e95efbe/redirect
7+
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/9fafe4c46611108fb1379058ea84c17b/redirect
8+
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/dcd2068273614ddddeba9b7cbf486173/redirect
9+
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/c7dbcf54bacc4c888b93cc42ef334a2a/redirect
10+
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/303c95a051768711e2ec6e0c82bc7dbb/redirect
1111
toolchainVendor=ADOPTIUM
12-
toolchainVersion=24
12+
toolchainVersion=25

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:([\d.]+)/ docker:jetbrains/qodana-jvm|/^[\d]{4}\.\d+$/|sort
77
linter: jetbrains/qodana-jvm:2025.2
8-
projectJDK: temurin-24
8+
projectJDK: temurin-25

0 commit comments

Comments
 (0)