From 39dc48b9e9bb82b4186de9d5ac699e5a36594307 Mon Sep 17 00:00:00 2001 From: Joshua Suskalo Date: Fri, 18 Oct 2024 11:24:36 -0400 Subject: [PATCH] Use the `--release` flag for java compilation This gets around the documented issue from java 9 and later where simply using -source and -target might result in newer APIs still getting used anyway. This version will ensure the compiled classes work on the intended version. This also fixes a warning that javac printed. --- build.clj | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build.clj b/build.clj index e8ac05e..76f9400 100644 --- a/build.clj +++ b/build.clj @@ -53,8 +53,7 @@ (b/process {:command-args ["javac" "src/java/coffi/ffi/Loader.java" "-d" class-dir - "-target" "22" - "-source" "22"]})] + "--release" "22"]})] (when-not (zero? (:exit compilation-result)) (b/delete {:path class-dir}))) opts)