chore(infra+frontend): upgrade Gradle to 9.3.1 and fix KMP plugin conflicts in Docker builds

- Updated Gradle version in `.env`, Dockerfiles, and wrapper to 9.3.1.
- Replaced alias-based application of `kotlinMultiplatform` plugin with direct `id` usage in subprojects to resolve "Plugin loaded multiple times" error.
- Applied centralized plugin management and Gradle daemon optimizations to improve Docker build stability and address KMP classloading issues.
This commit is contained in:
2026-02-02 23:01:23 +01:00
parent 92cdd22f1f
commit 5be88b306c
23 changed files with 100 additions and 34 deletions
+4 -5
View File
@@ -5,7 +5,7 @@
# ===================================================================
# === GLOBAL ARGS ===
ARG GRADLE_VERSION=9.2.1
ARG GRADLE_VERSION=9.3.1
ARG JAVA_VERSION=25
ARG CADDY_VERSION=2.11-alpine
ARG VERSION=1.0.0-SNAPSHOT
@@ -21,8 +21,8 @@ WORKDIR /workspace
# 1. Gradle Optimizations (Memory & Caching)
# Increased Heap to 4g for Kotlin 2.3 JS Compilation
# REMOVED: -Dorg.gradle.daemon=false (We want the daemon to handle classloading correctly!)
ENV GRADLE_OPTS="-Dorg.gradle.caching=true \
-Dorg.gradle.daemon=false \
-Dorg.gradle.parallel=true \
-Dorg.gradle.workers.max=4 \
-Dorg.gradle.jvmargs=-Xmx4g \
@@ -49,14 +49,13 @@ COPY contracts/ contracts/
RUN mkdir -p docs
# 4. Build Web App
# Using --no-configuration-cache initially to avoid issues with first run in docker,
# but can be enabled if stable.
# REMOVED: --no-daemon flag to allow Gradle to manage its classloaders properly
# This fixes the "IsolatedKotlinClasspathClassCastException" in Gradle 9.x + KMP
RUN --mount=type=cache,target=/home/gradle/.gradle/caches \
--mount=type=cache,target=/home/gradle/.gradle/wrapper \
./gradlew :frontend:shells:meldestelle-portal:jsBrowserDistribution \
-Pproduction=true \
-PnoSourceMaps=true \
--no-daemon \
--stacktrace
# 5. Prepare Dist
+2 -2
View File
@@ -3,7 +3,7 @@
# ===================================================================
# 1. Build Stage (Debian-basiert für Stabilität bei Desktop-Builds)
FROM gradle:9.2.1-jdk-25-and-25-alpine AS builder
FROM gradle:9.3.1-jdk-25-and-25-alpine AS builder
WORKDIR /app
@@ -55,7 +55,7 @@ RUN set -eu; \
# ===================================================================
# Stage 2: Runtime Stage - Ubuntu mit VNC + noVNC
# ===================================================================
FROM ubuntu:22.04
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive
+1 -1
View File
@@ -5,7 +5,7 @@
# ===================================================================
# === GLOBAL ARGS ===
ARG GRADLE_VERSION=9.2.1
ARG GRADLE_VERSION=9.3.1
ARG JAVA_VERSION=25
ARG NGINX_IMAGE_TAG=1.28-alpine
ARG VERSION=1.0.0-SNAPSHOT