Tools for building jank libraries which include native code.
Tools for building jank libraries which include native code.
(build-dep! src-dir out-dir subtree-meta)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`.
(build-scoped? coord)(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.
(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.
(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.
(fingerprint data)Compute a fingerprint of the dependency. When the fingerprint changes (due to some change in the descendant dependencies or environment) the dependency needs to be recompiled.
Compute a fingerprint of the dependency. When the fingerprint changes (due to some change in the descendant dependencies or environment) the dependency needs to be recompiled.
(fingerprint-file f)(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.
(is-already-built? out-dir)Returns true if the given directory has a jank build cache file.
Returns true if the given directory has a jank build cache file.
(merge-native-flags)(merge-native-flags & maps)(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!`.
(plan-subtree-build build-opts target-dir [dep subtree])(process-build-directives lines)Process a sequence of output lines from a build script, parsing those that begin with the jank-build:: prefix and discarding all others.
Process a sequence of output lines from a build script, parsing those that begin with the jank-build:: prefix and discarding all others.
(run-build! plan)Run the sequence of build steps planned by plan-build.
Run the sequence of build steps planned by `plan-build`.
(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.
(wrap-stream stream lines-atom {:keys [prefix echo]})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).
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |