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.
This commit is contained in:
parent
50dca53b7d
commit
39dc48b9e9
1 changed files with 1 additions and 2 deletions
|
|
@ -53,8 +53,7 @@
|
||||||
(b/process {:command-args ["javac"
|
(b/process {:command-args ["javac"
|
||||||
"src/java/coffi/ffi/Loader.java"
|
"src/java/coffi/ffi/Loader.java"
|
||||||
"-d" class-dir
|
"-d" class-dir
|
||||||
"-target" "22"
|
"--release" "22"]})]
|
||||||
"-source" "22"]})]
|
|
||||||
(when-not (zero? (:exit compilation-result))
|
(when-not (zero? (:exit compilation-result))
|
||||||
(b/delete {:path class-dir})))
|
(b/delete {:path class-dir})))
|
||||||
opts)
|
opts)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue