Skip to content
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/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Set up JDK 21
uses: actions/setup-java@v6
with:
java-version: '21'
java-version: '25'
distribution: 'temurin'
cache: maven
# To handle both tag and manual runs, run a script that will define all required vars
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up JDK 21
uses: actions/setup-java@v6
with:
java-version: '21'
java-version: '25'
distribution: 'temurin'
cache: maven
- name: Build with Maven
Expand Down
4 changes: 2 additions & 2 deletions cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM eclipse-temurin:21.0.12_8-jre as build
FROM eclipse-temurin:25.0.4_7-jre as build

ARG VERSION=""

ADD target/text2confl${VERSION}-dist/text2confl /opt/app

RUN find /opt/app -exec touch -t 200001010101 {} \;

FROM eclipse-temurin:21.0.12_8-jre
FROM eclipse-temurin:25.0.4_7-jre

LABEL org.opencontainers.image.source="https://github.com/zeldigas/text2confl"

Expand Down
8 changes: 7 additions & 1 deletion cli/src/assembly/bin/text2confl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ case "$(uname -s)" in
;;
esac

java -cp "$CLASSPATH" ${JAVA_OPTS:-} \
JAVA_VERSION=$(java -version 2>&1 | sed -n 's/.* version "\([0-9]*\).*/\1/p' | head -n 1)
EXTRA_OPTS="--enable-native-access=ALL-UNNAMED"
if [ "${JAVA_VERSION:-0}" -gt 23 ]; then
EXTRA_OPTS="$EXTRA_OPTS --sun-misc-unsafe-memory-access=allow"
fi

java -cp "$CLASSPATH" ${JAVA_OPTS:-} $EXTRA_OPTS \
--add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED \
com.github.zeldigas.text2confl.cli.MainKt "$@"

10 changes: 9 additions & 1 deletion cli/src/assembly/bin/text2confl.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
@echo off
setlocal

java -cp "%~dp0app\*;%~dp0lib\*" --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED com.github.zeldigas.text2confl.cli.MainKt %*
set JAVA_MAJOR=0
for /f "tokens=3" %%v in ('java -version 2^>^&1 ^| findstr /i "version"') do (
for /f "delims=.-" %%m in ("%%~v") do set JAVA_MAJOR=%%m
)
set EXTRA_OPTS=--enable-native-access=ALL-UNNAMED
if %JAVA_MAJOR% GTR 23 set EXTRA_OPTS=%EXTRA_OPTS% --sun-misc-unsafe-memory-access=allow

java -cp "%~dp0app\*;%~dp0lib\*" %EXTRA_OPTS% --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED com.github.zeldigas.text2confl.cli.MainKt %*
8 changes: 8 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.6</version>
<configuration>
<argLine>--enable-native-access=ALL-UNNAMED --sun-misc-unsafe-memory-access=allow</argLine>
</configuration>
</plugin>
</plugins>
</build>
Expand Down Expand Up @@ -137,6 +140,11 @@
<artifactId>aedile-core</artifactId>
<version>3.0.4</version>
</dependency>
<dependency>
<groupId>com.github.jnr</groupId>
<artifactId>jffi</artifactId>
<version>1.3.15</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
Loading