aboutsummaryrefslogtreecommitdiff
path: root/src/lux/packager/program.clj
diff options
context:
space:
mode:
Diffstat (limited to 'src/lux/packager/program.clj')
-rw-r--r--src/lux/packager/program.clj9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lux/packager/program.clj b/src/lux/packager/program.clj
index e1d9a1d2f..0079f72d3 100644
--- a/src/lux/packager/program.clj
+++ b/src/lux/packager/program.clj
@@ -24,6 +24,7 @@
;; [Utils]
(def ^:private kilobyte 1024)
+(def ^:private buffer-size (* 10 kilobyte))
(defn ^:private manifest [^String module]
"(-> Text Manifest)"
@@ -34,7 +35,7 @@
(defn ^:private write-class! [^String path ^File file ^JarOutputStream out]
"(-> Text File JarOutputStream Unit)"
(with-open [in (new BufferedInputStream (new FileInputStream file))]
- (let [buffer (byte-array (* 10 kilobyte))]
+ (let [buffer (byte-array buffer-size)]
(doto out
(.putNextEntry (new JarEntry (str path "/" (.getName file))))
(-> (.write buffer 0 bytes-read)
@@ -105,9 +106,9 @@
(doseq [$group (.listFiles (new File &&/output-dir))]
(write-module! $group out))
(->> (fetch-available-jars)
- (filter #(and (not (.endsWith % "luxc.jar"))
- (not (.endsWith % "tools.nrepl-0.2.3.jar"))
- (not (.endsWith % "clojure-complete-0.2.3.jar"))))
+ (filter #(and (not (.endsWith ^String % "luxc.jar"))
+ (not (.endsWith ^String % "tools.nrepl-0.2.3.jar"))
+ (not (.endsWith ^String % "clojure-complete-0.2.3.jar"))))
(reduce (fn [s ^String j] (add-jar! (new File ^String j) s out))
#{}))
))