Liking cljdoc? Tell your friends :D

leiningen.jank.build

Tools for building jank libraries which include native code.

Tools for building jank libraries which include native code.
raw docstring

*disable-sandbox*clj


*verbose-build*clj


base64clj

(base64 bs)

Modified base64 encoding which is safe for URLs/file paths.

Modified base64 encoding which is safe for URLs/file paths.
raw docstring

build-dep!clj

(build-dep! {:keys [src-dir out-dir] :as op})

Run a sandboxed (unless disable-sandbox is set) build on the dependency located at src-dir, and instruct the build script to place artifacts in the out-dir.

The src-dir is expected to contain a jank-build.bb file. This file is run in the sandbox by bb --stream jank-build.bb, and is passed the build metadata as EDN on stdin (automatically bound to input in the script).

The script is expected to output jank-build:: directives, and any other build output will be ignored.

The result will be a cached build result file located at out-dir/jank-build-cache.txt plus the artifacts of the build in out-dir.

Run a sandboxed (unless disable-sandbox is set) build on the dependency
located at `src-dir`, and instruct the build script to place artifacts in the
`out-dir`.

The `src-dir` is expected to contain a `jank-build.bb` file. This file is run
in the sandbox by `bb --stream jank-build.bb`, and is passed the build
metadata as EDN on stdin (automatically bound to *input* in the script).

The script is expected to output `jank-build::` directives, and any other
build output will be ignored.

The result will be a cached build result file located at
`out-dir/jank-build-cache.txt` plus the artifacts of the build in `out-dir`.
raw docstring

build-scoped?clj

(build-scoped? coord)

build-script-inputclj

(build-script-input build-op)

Filter the build operation keys which will be forwarded to the jank-build.bb script. This establishes the contract for the data shape which should be expected by a build script.

Filter the build operation keys which will be forwarded to the jank-build.bb
script. This establishes the contract for the data shape which should be
expected by a build script. 
raw docstring

collect-build-depsclj

(collect-build-deps tree)

Given a dependency tree, identify its jank-build scoped elements and resolve them.

Build dependencies are not transitive, so only the first layer of the tree is searched. Deeper build-scoped dependencies will be ignored.

Given a dependency tree, identify its jank-build scoped elements and resolve
them.

Build dependencies are not transitive, so only the first layer of the tree is
searched. Deeper build-scoped dependencies will be ignored.
raw docstring

collect-out-dirsclj

(collect-out-dirs plan-ops)

Collect the output directories from all build steps in the given operations list.

Collect the output directories from all build steps in the given operations
list.
raw docstring

default-build-optsclj


extract-jar!clj

(extract-jar! file out-dir)

Extract the jar file into out-dir, creating it if it does not exist.

Extract the jar file into `out-dir`, creating it if it does not exist.
raw docstring

fingerprintclj

(fingerprint data)

Compute a fingerprint of some printable data structure.

Compute a fingerprint of some printable data structure.
raw docstring

fingerprint-fileclj

(fingerprint-file f)

Like fingerprint but for the contents of a file.

Like `fingerprint` but for the contents of a file.
raw docstring

has-build-cache-file?clj

(has-build-cache-file? path)

Returns true if the given directory has a jank build cache file.

Returns true if the given directory has a jank build cache file.
raw docstring

has-build-file?clj

(has-build-file? path)

Returns true if the given directory or jar file has a jank-build.bb file in the root.

Returns true if the given directory or jar file has a `jank-build.bb` file in
the root.
raw docstring

jank-build-cache-fileclj


jank-build-fileclj


merge-native-flagsclj

(merge-native-flags)
(merge-native-flags & maps)

plan-buildclj

(plan-build project)

Compute a build plan, i.e. a linear sequence of operations, which will produce the final native build artifacts required by this project.

Returns a map, including the build operations and additional build metadata, which can be executed by run-build!.

Compute a build plan, i.e. a linear sequence of operations, which will
produce the final native build artifacts required by this project.

Returns a map, including the build operations and additional build metadata,
which can be executed by `run-build!`.
raw docstring

plan-subtree-buildclj

(plan-subtree-build build-opts target-dir [dep subtree])

process-build-directiveclj

(process-build-directive line)

Process an output line from a build script, parsing it if it begins with the jank-build:: prefix. Otherwise returns nil.

Process an output line from a build script, parsing it if it begins with the
jank-build:: prefix. Otherwise returns nil. 
raw docstring

run-build!clj

(run-build! plan)

Run the sequence of build steps planned by plan-build.

Run the sequence of build steps planned by `plan-build`.
raw docstring

run-build-op!cljmultimethod


target-subdirclj

(target-subdir base-dir type dep-name fprint)

Returns a path located in the target directory which is unique based on the type, the dependency's name, and the dependency's fingerprint.

Returns a path located in the target directory which is unique based on the
`type`, the dependency's name, and the dependency's fingerprint.
raw docstring

wrap-streamclj

(wrap-stream stream lines-atom echo? prefix)

Wrap an IO stream, redirecting the output to stdout with a prefix. Returns a vector of the recorded lines (without the prefix).

Wrap an IO stream, redirecting the output to stdout with a prefix. Returns a
vector of the recorded lines (without the prefix).
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close