Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
distribution: temurin
java-version: 24

- name: Setup project and upload dependency graph
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM azul/zulu-openjdk-alpine:24 AS builder
FROM eclipse-temurin:24-alpine AS builder

# bump: libwebp /LIBWEBP_VERSION=([\d.]+)/ git:https://chromium.googlesource.com/webm/libwebp.git|^1
# bump: libwebp after ./hashupdate Dockerfile LIBWEBP $LATEST
ARG LIBWEBP_VERSION=1.6.0
ARG LIBWEBP_SHA256=1c5ffab71efecefa0e3c23516c3a3a1dccb45cc310ae1095c6f14ae268e38067
ARG LIBWEBP_URL="https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$LIBWEBP_VERSION-linux-x86-64.tar.gz"
ARG LIBWEBP_FILE="libwebp-$LIBWEBP_VERSION-linux-x86-64.tar.gz"
ARG LIBWEBP_URL="https://storage.googleapis.com/downloads.webmproject.org/releases/webp/$LIBWEBP_FILE"

WORKDIR /app
RUN apk --no-cache add binutils curl tar
Expand Down
7 changes: 4 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,18 @@ description = 'Telegram bot to convert medias in the format required to be used

java.toolchain {
languageVersion = JavaLanguageVersion.of(24)
vendor = JvmVendorSpec.AZUL
vendor = JvmVendorSpec.ADOPTIUM
}

updateDaemonJvm {
languageVersion = JavaLanguageVersion.of(24)
vendor = JvmVendorSpec.AZUL
vendor = JvmVendorSpec.ADOPTIUM
Comment thread
MartelliEnrico marked this conversation as resolved.
}

def jlink = tasks.register('jlink', JlinkTask) {
options = ['--strip-debug', '--no-header-files', '--no-man-pages']
modules = ['java.desktop', 'java.instrument', 'java.naming', 'java.sql', 'jdk.crypto.ec', 'jdk.unsupported']
includeModulePath = false

group = 'build'
description = 'Generates a minimal JRE for the project.'
Expand All @@ -72,7 +73,7 @@ test {
finalizedBy(jacocoTestReport)

testLogging {
events "passed"
events 'passed', 'failed', 'skipped'
}
}

Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ repositories {

java.toolchain {
languageVersion = JavaLanguageVersion.of(24)
vendor = JvmVendorSpec.AZUL
vendor = JvmVendorSpec.ADOPTIUM
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ public abstract class JlinkTask extends DefaultTask {
@Input
public abstract ListProperty<@NotNull String> getModules();

/**
* If the selected JVM is <a href="https://openjdk.org/jeps/493">JEP 493</a> compatible, then this should be set to false.
Comment thread
MartelliEnrico marked this conversation as resolved.
*/
@Input
public abstract Property<@NotNull Boolean> getIncludeModulePath();

@OutputDirectory
public abstract DirectoryProperty getOutputDirectory();

Expand All @@ -46,6 +52,7 @@ public abstract class JlinkTask extends DefaultTask {
public JlinkTask(ProjectLayout layout, JavaToolchainService javaToolchain) {
getOptions().convention(List.of());
getModules().convention(List.of("ALL-MODULE-PATH"));
getIncludeModulePath().convention(true);
getOutputDirectory().convention(layout.getBuildDirectory().dir("jlink"));

var toolchain = getProject().getExtensions().getByType(JavaPluginExtension.class).getToolchain();
Expand All @@ -71,8 +78,10 @@ public void createJre() {
var commandLine = new ArrayList<String>();
commandLine.add(jlink.toString());
commandLine.addAll(getOptions().get());
commandLine.add("--module-path");
commandLine.add(jmods.toString());
if (getIncludeModulePath().get()) {
commandLine.add("--module-path");
commandLine.add(jmods.toString());
}
Comment thread
MartelliEnrico marked this conversation as resolved.
commandLine.add("--add-modules");
commandLine.add(String.join(",", getModules().get()));
commandLine.add("--output");
Expand Down
20 changes: 10 additions & 10 deletions gradle/gradle-daemon-jvm.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#This file is generated by updateDaemonJvm
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/d898567da69cac7b9b75d8d74e577e7a/redirect
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/902ef81bafffcd1670604d74b6c7a6b0/redirect
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/d898567da69cac7b9b75d8d74e577e7a/redirect
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/902ef81bafffcd1670604d74b6c7a6b0/redirect
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/4175090548a4792cf1cef411becfba0f/redirect
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/50df1a9c218487a6519e22a0d29e6215/redirect
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/d898567da69cac7b9b75d8d74e577e7a/redirect
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/902ef81bafffcd1670604d74b6c7a6b0/redirect
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/f55af862790b0c395d3f70e23016df3d/redirect
toolchainVendor=AZUL
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/6d0adbce30460017fe61d2993dfa663e/redirect
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/50f16d2dc2bb80a421afc1af38fc92e3/redirect
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/6d0adbce30460017fe61d2993dfa663e/redirect
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/50f16d2dc2bb80a421afc1af38fc92e3/redirect
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/4f4ebe4f162f6deb29540c4ebe629d79/redirect
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/79d5995ef1c3e4df39a3b2f545cada5e/redirect
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/6d0adbce30460017fe61d2993dfa663e/redirect
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/50f16d2dc2bb80a421afc1af38fc92e3/redirect
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/61fdd87038cf8b094dadad8566609a29/redirect
toolchainVendor=ADOPTIUM
toolchainVersion=24
7 changes: 3 additions & 4 deletions hashupdate
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/bin/sh
set -euo
#!/usr/bin/env bash
set -euo pipefail

# Usage: hashupdate <FILE> <NAME> <VERSION>
URL_TEMPLATE=$(grep "$2_URL=" "$1" | sed -E 's/.*="(.*)"/\1/')
URL=$(echo "$URL_TEMPLATE" | sed "s/\$$2_VERSION/$3/g")
URL=$(grep "$2_URL=" "$1" | sed -E 's/.*="([^"]*)".*/\1/' | sed "s/\$$2_VERSION/$3/g")
Comment thread
MartelliEnrico marked this conversation as resolved.
SHA256=$(curl -sL "$URL" | sha256sum | sed -e 's/ -//g')
Comment thread
MartelliEnrico marked this conversation as resolved.
sed -i -E "s/$2_SHA256=.*/$2_SHA256=$SHA256/" "$1"
Comment thread
MartelliEnrico marked this conversation as resolved.
2 changes: 1 addition & 1 deletion qodana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ include:
- name: VulnerableLibrariesGlobal
# bump: qodana /qodana-jvm:([\d.]+)/ docker:jetbrains/qodana-jvm|/^[\d]{4}\.\d+$/|sort
linter: jetbrains/qodana-jvm:2025.2
projectJDK: zulu-24
projectJDK: temurin-24
Loading