File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change 11(ns tools.build
22 (:refer-clojure :exclude [compile ])
3- (:require [babashka.fs :as fs]
4- [babashka.process :as p]
5- [clojure.tools.build.api :as b]
6- [selmer.parser :refer [render]]
7- [tools.version :as version :refer [read-edn-file]]))
3+ (:require
4+ [babashka.fs :as fs]
5+ [babashka.process :as p]
6+ [cheshire.core :as json]
7+ [clojure.tools.build.api :as b]
8+ [selmer.parser :refer [render]]
9+ [tools.version :as version :refer [read-edn-file]])
10+ (:import [java.nio.file NoSuchFileException]))
811
912(defn clean [{:keys [target-dir] :as _project-config}]
1013 (print (str " Cleaning up target directory '" target-dir " '..." ))
106109 " -J-Xmx5g" )
107110 (fs/delete-tree project-target-dir)
108111 (fs/create-dir project-target-dir)
109- (run! #(fs/move % project-target-dir)
110- (concat [" graal_isolate.h" " graal_isolate_dynamic.h" " build-artifacts.json" ]
111- (map (fn [ext] (str project-name ext))
112- [" .so" " .h" " _dynamic.h" ]))))
112+ (->> (slurp " build-artifacts.json" )
113+ (json/parse-string )
114+ vals
115+ (apply concat)
116+ (cons " build-artifacts.json" )
117+ (run! #(fs/move % project-target-dir))))
113118 (do (println " GRAALVM_HOME not set!" )
114119 (println " Please set GRAALVM_HOME to the root of the graalvm directory on your system." )
115120 (System/exit 1 ))))
You can’t perform that action at this time.
0 commit comments