com.github.jlangch.venice.qrbill-install.venice Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of venice Show documentation
Show all versions of venice Show documentation
Venice, a sandboxed Lisp implemented in Java.
;;;; __ __ _
;;;; \ \ / /__ _ __ (_) ___ ___
;;;; \ \/ / _ \ '_ \| |/ __/ _ \
;;;; \ / __/ | | | | (_| __/
;;;; \/ \___|_| |_|_|\___\___|
;;;;
;;;;
;;;; Copyright 2017-2024 Venice
;;;;
;;;; Licensed under the Apache License, Version 2.0 (the "License");
;;;; you may not use this file except in compliance with the License.
;;;; You may obtain a copy of the License at
;;;;
;;;; http://www.apache.org/licenses/LICENSE-2.0
;;;;
;;;; Unless required by applicable law or agreed to in writing, software
;;;; distributed under the License is distributed on an "AS IS" BASIS,
;;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;;;; See the License for the specific language governing permissions and
;;;; limitations under the License.
;;;; Install QR Bill 3rd party libraries:
;;;;
;;;; (load-module :qrbill-install)
;;;; (qrbill-install/install :dir (repl/libs-dir) :silent false)
;;;;
;;;; Note: This not a package manager. The module provides functions to
;;;; download Java libraries to a directory.
(ns qrbill-install)
(load-module :installer)
(defn libraries []
[ "net.codecrete.qrbill:qrbill-generator:3.2.0"
"org.apache.pdfbox:jbig2-imageio:3.0.4"
"com.googlecode.java-diff-utils:diffutils:1.3.0"
"com.github.jai-imageio:jai-imageio-core:1.4.0"
"com.github.jai-imageio:jai-imageio-jpeg2000:1.4.0" ] )
(defn dependencies []
(maven/dependencies (libraries) :scope :runtime))
(defn
^{ :arglists '("(install options*)")
:doc
"""
Install the Java 3rd party libraries for the QR-Bill module.
Options:
| :dir path | download dir, defaults to "." |
| :silent {true,false} | if silent is true does not show a progress \
bar, defaults to true |
"""
:examples '(
"""
(do
(load-module :qrbill-install)
(qrbill-install/install :dir (repl/libs-dir) :silent false))
""") }
install [ & options]
(load-module :pdf-install) ;; install pdf as dependency
(load-module :bouncycastle-install) ;; install bouncy castle as dependency
(let [libs (concat (qrbill-install/libraries)
(pdf-install/libraries)
(bouncycastle-install/libraries))]
(apply installer/install libs options)))