From a0fb8c9ef6b107d2d42b0542b40ca7f71a7e1bca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Horv=C3=A1th=20Istv=C3=A1n?= Date: Tue, 2 Dec 2025 20:50:19 +0100 Subject: [PATCH] Update java and kotlin version --- .github/workflows/build-candidate.yml | 4 +-- .github/workflows/build-release.yml | 4 +-- .github/workflows/lint.yml | 4 +-- .github/workflows/sonar-backend.yml | 4 +-- backend/Dockerfile | 2 +- backend/Dockerfile-build | 2 +- backend/build.gradle.kts | 26 +++++++++---------- .../component/countdown/CountdownApiFilter.kt | 2 +- .../component/login/SessionIncreaseFilter.kt | 2 +- .../script/sandbox/ScriptingContext.kt | 2 +- .../component/sheets/SheetsUpdaterService.kt | 8 +++--- .../hu/bme/sch/cmsch/config/AppConfig.kt | 2 +- .../dashboard/InstanceInfoDashboard.kt | 8 +++--- frontend/package-lock.json | 15 ----------- 14 files changed, 35 insertions(+), 50 deletions(-) diff --git a/.github/workflows/build-candidate.yml b/.github/workflows/build-candidate.yml index 79e053bb..24ed33a3 100644 --- a/.github/workflows/build-candidate.yml +++ b/.github/workflows/build-candidate.yml @@ -19,10 +19,10 @@ jobs: - name: Login to Docker Registry run: echo ${{ secrets.DOCKER_REGISTRY_PASSWORD }} | docker login -u ${{ secrets.DOCKER_REGISTRY_USERNAME }} --password-stdin ${{ secrets.DOCKER_REGISTRY_URL }} - - name: Set up JDK 24 + - name: Set up JDK 25 uses: actions/setup-java@v5 with: - java-version: 24 + java-version: 25 distribution: temurin - name: Set up Gradle diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 6d607cce..f437800a 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -24,10 +24,10 @@ jobs: - name: Login to Docker Registry run: echo ${{ secrets.DOCKER_REGISTRY_PASSWORD }} | docker login -u ${{ secrets.DOCKER_REGISTRY_USERNAME }} --password-stdin ${{ secrets.DOCKER_REGISTRY_URL }} - - name: Set up JDK 24 + - name: Set up JDK 25 uses: actions/setup-java@v5 with: - java-version: 24 + java-version: 25 distribution: temurin - name: Build OCI Image diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 7a490dd9..b78547ca 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,10 +19,10 @@ jobs: - name: Check out Git repository uses: actions/checkout@v5 - - name: Set up Node.js 24 + - name: Set up Node.js 25 uses: actions/setup-node@v4 with: - node-version: 24 + node-version: 25 - name: Install Node.js dependencies run: npm ci diff --git a/.github/workflows/sonar-backend.yml b/.github/workflows/sonar-backend.yml index 4d5fffd2..1a953fc9 100644 --- a/.github/workflows/sonar-backend.yml +++ b/.github/workflows/sonar-backend.yml @@ -15,10 +15,10 @@ jobs: - uses: actions/checkout@v5 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Set up JDK 24 + - name: Set up JDK 25 uses: actions/setup-java@v5 with: - java-version: 24 + java-version: 25 distribution: temurin - name: Cache SonarCloud packages uses: actions/cache@v4 diff --git a/backend/Dockerfile b/backend/Dockerfile index f1304228..04303380 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,4 +1,4 @@ -FROM eclipse-temurin:24-jre-alpine +FROM eclipse-temurin:25-jre-alpine MAINTAINER kir-dev@sch.bme.hu COPY build/libs/cmsch.jar /opt/cmsch/ WORKDIR /opt/cmsch diff --git a/backend/Dockerfile-build b/backend/Dockerfile-build index 0680f5b0..c0b4814b 100644 --- a/backend/Dockerfile-build +++ b/backend/Dockerfile-build @@ -3,7 +3,7 @@ COPY --chown=gradle:gradle . /home/gradle/src WORKDIR /home/gradle/src RUN gradle clean assemble bootJar -FROM eclipse-temurin:24-jre-alpine +FROM eclipse-temurin:25-jre-alpine MAINTAINER kir-dev@sch.bme.hu COPY --from=build /home/gradle/src/build/libs/cmsch.jar /opt/cmsch/ WORKDIR /opt/cmsch diff --git a/backend/build.gradle.kts b/backend/build.gradle.kts index 6174c85d..ea191fa4 100644 --- a/backend/build.gradle.kts +++ b/backend/build.gradle.kts @@ -2,12 +2,12 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - id("org.springframework.boot") version "4.0.0" + id("org.springframework.boot") version "4.0.1" id("io.spring.dependency-management") version "1.1.7" id("org.owasp.dependencycheck") version "12.1.9" - kotlin("jvm") version "2.2.21" - kotlin("plugin.spring") version "2.2.21" - id("org.sonarqube") version "7.1.0.6387" + kotlin("jvm") version "2.3.0" + kotlin("plugin.spring") version "2.3.0" + id("org.sonarqube") version "7.2.2.6593" } group = "hu.bme.sch" @@ -17,7 +17,7 @@ group = "hu.bme.sch" val ghRef: String? = System.getenv("GITHUB_REF") version = if (ghRef != null && ghRef.startsWith("refs/tags/v")) ghRef.substring(11) else "dev" -java.sourceCompatibility = JavaVersion.VERSION_24 +java.sourceCompatibility = JavaVersion.VERSION_25 springBoot { buildInfo() @@ -46,7 +46,7 @@ dependencies { developmentOnly("org.springframework.boot:spring-boot-devtools") implementation("tools.jackson.dataformat:jackson-dataformat-csv") implementation("tools.jackson.module:jackson-module-kotlin") - implementation("com.fasterxml.uuid:java-uuid-generator:5.1.1") + implementation("com.fasterxml.uuid:java-uuid-generator:5.2.0") implementation("com.github.spullara.mustache.java:compiler:0.9.14") implementation("com.google.firebase:firebase-admin:9.7.0") implementation("com.google.zxing:core:3.5.4") @@ -57,7 +57,7 @@ dependencies { runtimeOnly("io.jsonwebtoken:jjwt-impl") runtimeOnly("io.jsonwebtoken:jjwt-jackson") implementation("io.jsonwebtoken:jjwt-api") - implementation(platform("io.micrometer:micrometer-bom:1.16.0")) + implementation(platform("io.micrometer:micrometer-bom:1.16.1")) runtimeOnly("io.micrometer:micrometer-core") runtimeOnly("io.micrometer:micrometer-observation") runtimeOnly("io.micrometer:micrometer-registry-prometheus") @@ -71,7 +71,7 @@ dependencies { implementation("org.jetbrains.kotlin:kotlin-scripting-jvm-host") implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2") - implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:3.0.0") + implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:3.0.1") implementation("org.springframework.boot:spring-boot-starter-actuator") implementation("org.springframework.boot:spring-boot-starter-data-jpa") implementation("org.springframework.boot:spring-boot-starter-oauth2-client") @@ -81,11 +81,11 @@ dependencies { implementation("org.springframework.boot:spring-boot-starter-web") implementation("org.springframework.boot:spring-boot-starter-webclient") implementation("org.springframework.session:spring-session-jdbc") - implementation("software.amazon.awssdk:s3:2.39.3") + implementation("software.amazon.awssdk:s3:2.41.1") runtimeOnly("com.h2database:h2") runtimeOnly("org.postgresql:postgresql") - testApi("org.springframework.boot:spring-boot-starter-test") - testApi("org.springframework.security:spring-security-test") + testImplementation("org.springframework.boot:spring-boot-starter-test") + testImplementation("org.springframework.security:spring-security-test") } dependencyCheck { @@ -95,8 +95,8 @@ dependencyCheck { tasks.withType { compilerOptions { freeCompilerArgs.add("-Xjsr305=strict") - apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_2) - jvmTarget.set(JvmTarget.JVM_24) + apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_3) + jvmTarget.set(JvmTarget.JVM_25) } } diff --git a/backend/src/main/kotlin/hu/bme/sch/cmsch/component/countdown/CountdownApiFilter.kt b/backend/src/main/kotlin/hu/bme/sch/cmsch/component/countdown/CountdownApiFilter.kt index 8bcf3c91..eec3c5a9 100644 --- a/backend/src/main/kotlin/hu/bme/sch/cmsch/component/countdown/CountdownApiFilter.kt +++ b/backend/src/main/kotlin/hu/bme/sch/cmsch/component/countdown/CountdownApiFilter.kt @@ -16,7 +16,7 @@ class CountdownApiFilter( override fun doFilterInternal(req: HttpServletRequest, res: HttpServletResponse, filterChain: FilterChain) { if (req.servletPath.startsWith("/api/") && !req.servletPath.startsWith("/api/app")) { - val cmschUser = SecurityContextHolder.getContext()?.authentication?.getUserOrNull() + val cmschUser = SecurityContextHolder.getContext().authentication?.getUserOrNull() val role = cmschUser?.role ?: RoleType.GUEST if (countdown.isBlockedAt(clock.getTimeInSeconds(), role)) { res.sendError(HttpServletResponse.SC_BAD_REQUEST, "Countdown is not finished") diff --git a/backend/src/main/kotlin/hu/bme/sch/cmsch/component/login/SessionIncreaseFilter.kt b/backend/src/main/kotlin/hu/bme/sch/cmsch/component/login/SessionIncreaseFilter.kt index 1d6e6c7a..f35785dd 100644 --- a/backend/src/main/kotlin/hu/bme/sch/cmsch/component/login/SessionIncreaseFilter.kt +++ b/backend/src/main/kotlin/hu/bme/sch/cmsch/component/login/SessionIncreaseFilter.kt @@ -24,7 +24,7 @@ class SessionIncreaseFilter( val request = servletRequest as HttpServletRequest if (request.servletPath.startsWith("/admin/")) { val session = request.getSession(true) - val user = SecurityContextHolder.getContext()?.authentication?.getUserOrNull() + val user = SecurityContextHolder.getContext().authentication?.getUserOrNull() if (user?.let { ControlPermissions.PERMISSION_INCREASED_SESSION_DURATION.validate(it) } == true) { log.debug( "Increasing session time for user {} is {}", diff --git a/backend/src/main/kotlin/hu/bme/sch/cmsch/component/script/sandbox/ScriptingContext.kt b/backend/src/main/kotlin/hu/bme/sch/cmsch/component/script/sandbox/ScriptingContext.kt index eefc2ec9..f3d30247 100644 --- a/backend/src/main/kotlin/hu/bme/sch/cmsch/component/script/sandbox/ScriptingContext.kt +++ b/backend/src/main/kotlin/hu/bme/sch/cmsch/component/script/sandbox/ScriptingContext.kt @@ -103,7 +103,7 @@ class ScriptingContext( @Suppress("UNCHECKED_CAST") class ModifyingScriptingDbContext(private val supportedRepos: List>, private val readOnly: Boolean) { - fun > repository(selectedRepo: KClass): R { + fun > repository(selectedRepo: KClass): R { if (readOnly) error("modifyingDb cannot be used in a read-only context") diff --git a/backend/src/main/kotlin/hu/bme/sch/cmsch/component/sheets/SheetsUpdaterService.kt b/backend/src/main/kotlin/hu/bme/sch/cmsch/component/sheets/SheetsUpdaterService.kt index ad06f3d4..bc9fd0d4 100644 --- a/backend/src/main/kotlin/hu/bme/sch/cmsch/component/sheets/SheetsUpdaterService.kt +++ b/backend/src/main/kotlin/hu/bme/sch/cmsch/component/sheets/SheetsUpdaterService.kt @@ -67,7 +67,7 @@ class SheetsUpdaterService( throw IOException("Unexpected code $response") } - return sheetsUpdateResponseReader.readValue(response.body?.string())?.status + return sheetsUpdateResponseReader.readValue(response.body.string())?.status ?: SheetsUpdateStatus.CONNECTION_ERROR } } catch (e: Exception) { @@ -92,7 +92,7 @@ class SheetsUpdaterService( client.newCall(request).execute().use { response -> if (!response.isSuccessful) throw IOException("Unexpected code $response") - return sheetsUpdateResponseReader.readValue(response.body?.string())?.status + return sheetsUpdateResponseReader.readValue(response.body.string())?.status ?: SheetsUpdateStatus.CONNECTION_ERROR } } catch (e: Exception) { @@ -117,7 +117,7 @@ class SheetsUpdaterService( client.newCall(request).execute().use { response -> if (!response.isSuccessful) throw IOException("Unexpected code $response") - return sheetsUpdateResponseReader.readValue(response.body?.string())?.status + return sheetsUpdateResponseReader.readValue(response.body.string())?.status ?: SheetsUpdateStatus.CONNECTION_ERROR } } catch (e: Exception) { @@ -142,7 +142,7 @@ class SheetsUpdaterService( client.newCall(request).execute().use { response -> if (!response.isSuccessful) throw IOException("Unexpected code $response") - return sheetsUpdateResponseReader.readValue(response.body?.string())?.status + return sheetsUpdateResponseReader.readValue(response.body.string())?.status ?: SheetsUpdateStatus.CONNECTION_ERROR } } catch (e: Exception) { diff --git a/backend/src/main/kotlin/hu/bme/sch/cmsch/config/AppConfig.kt b/backend/src/main/kotlin/hu/bme/sch/cmsch/config/AppConfig.kt index 685230ce..a1818ebb 100644 --- a/backend/src/main/kotlin/hu/bme/sch/cmsch/config/AppConfig.kt +++ b/backend/src/main/kotlin/hu/bme/sch/cmsch/config/AppConfig.kt @@ -51,7 +51,7 @@ class AppConfig { } override fun getConvertibleTypes(): MutableSet? { - return Collections.singleton(GenericConverter.ConvertiblePair(Object::class.java, URL::class.java)) + return Collections.singleton(GenericConverter.ConvertiblePair(Any::class.java, URL::class.java)) } }) diff --git a/backend/src/main/kotlin/hu/bme/sch/cmsch/controller/dashboard/InstanceInfoDashboard.kt b/backend/src/main/kotlin/hu/bme/sch/cmsch/controller/dashboard/InstanceInfoDashboard.kt index e5d754be..84d36d23 100644 --- a/backend/src/main/kotlin/hu/bme/sch/cmsch/controller/dashboard/InstanceInfoDashboard.kt +++ b/backend/src/main/kotlin/hu/bme/sch/cmsch/controller/dashboard/InstanceInfoDashboard.kt @@ -87,10 +87,10 @@ class InstanceInfoDashboard( listOf("Time zone id", startupPropertyConfig.zoneId), listOf("Storage implementation", startupPropertyConfig.storageImplementation.toString()), listOf("Filesystem storage path", startupPropertyConfig.filesystemStoragePath), - listOf("S3 endpoint", startupPropertyConfig.s3Endpoint.toString()), - listOf("S3 public endpoint", startupPropertyConfig.s3PublicEndpoint.toString()), - listOf("S3 bucket", startupPropertyConfig.s3Bucket.toString()), - listOf("S3 region", startupPropertyConfig.s3Region.toString()), + listOf("S3 endpoint", startupPropertyConfig.s3Endpoint), + listOf("S3 public endpoint", startupPropertyConfig.s3PublicEndpoint), + listOf("S3 bucket", startupPropertyConfig.s3Bucket), + listOf("S3 region", startupPropertyConfig.s3Region), listOf("Mailgun token length", startupPropertyConfig.mailgunToken.length.toString()), listOf("Session validity seconds", startupPropertyConfig.sessionValiditySeconds.toString()), listOf("Increased session time (ms)", startupPropertyConfig.increasedSessionTime.toString()), diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 2189dc76..d9df595e 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -10427,21 +10427,6 @@ "dev": true, "license": "ISC" }, - "node_modules/yaml": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.1.tgz", - "integrity": "sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==", - "dev": true, - "license": "ISC", - "optional": true, - "peer": true, - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14.6" - } - }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",