Tools for building jank libraries which include native code.
Tools for building jank libraries which include native code.
(base64 bs)Modified base64 encoding which is safe for URLs/file paths.
Modified base64 encoding which is safe for URLs/file paths.
(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`.
(build-scoped? coord)(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.
(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 some printable data structure.
Compute a fingerprint of some printable data structure.
(fingerprint-file f)Like fingerprint but for the contents of a file.
Like `fingerprint` but for the contents of a file.
(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.
(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.
(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-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.
(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 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).
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 |