Liking cljdoc? Tell your friends :D

hive-build.api

The canonical hive release tasks, delivered as a library.

Point a repository's :build alias here and it inherits the whole release path — no build.clj to copy, and no build.clj to drift:

:build {:deps {io.github.hive-agi/hive-build {:mvn/version "0.1.0"}} :ns-default hive-build.api}

Coordinates come from ./version.edn, the version from ./VERSION:

{:lib io.github.hive-agi/hive-thing :minor 1 :license {:name "MIT" :url "https://opensource.org/licenses/MIT"} :scm-url "https://github.com/hive-agi/hive-thing" :src-dirs ["src"] :publish :clojars ; :clojars | :gitea | :gitea-source | :none :aot/java-opts [] ; optional, AOT compile only :aot/elide-meta [] ; optional, [] disables metadata elision :pom-exclude-deps []} ; optional, dropped from the published pom

An untracked ./local.deps.edn may supply a :provided alias (host sources that must be on the AOT compile classpath but must NOT enter the pom) and an :aot/preload namespace vector compiled ahead of this lib's own namespaces.

:publish is the ONLY thing that differs between packages — the task names are identical everywhere, so one CI workflow drives the whole fleet:

:clojars public source jar -> repo.clojars.org :gitea AOT no-source jar -> private Gitea Maven registry :gitea-source source jar -> private Gitea Maven registry :none builds, never ships

Tasks (invoke with clojure -T:build <task>): clean delete target/ jar source jar + pom jar-aot AOT no-source jar (own .class + resources only) install build + install to ~/.m2 (offline) kondo sync dependency-exported lint configs, then lint bump rewrite ./VERSION (:level :patch|:minor|:major) verify-license report LICENSE / version.edn / SPDX agreement (warns) deploy build + publish per :publish (no-op when :none)

Release flow (what CI runs on a push to main that touches src/deps): clojure -T:build bump :level :patch clojure -T:build deploy

The canonical hive release tasks, delivered as a library.

Point a repository's :build alias here and it inherits the whole release
path — no build.clj to copy, and no build.clj to drift:

  :build {:deps {io.github.hive-agi/hive-build {:mvn/version "0.1.0"}}
          :ns-default hive-build.api}

Coordinates come from ./version.edn, the version from ./VERSION:

  {:lib      io.github.hive-agi/hive-thing
   :minor    1
   :license  {:name "MIT" :url "https://opensource.org/licenses/MIT"}
   :scm-url  "https://github.com/hive-agi/hive-thing"
   :src-dirs ["src"]
   :publish  :clojars             ; :clojars | :gitea | :gitea-source | :none
   :aot/java-opts []              ; optional, AOT compile only
   :aot/elide-meta []             ; optional, [] disables metadata elision
   :pom-exclude-deps []}          ; optional, dropped from the published pom

An untracked ./local.deps.edn may supply a `:provided` alias (host sources
that must be on the AOT compile classpath but must NOT enter the pom) and an
`:aot/preload` namespace vector compiled ahead of this lib's own namespaces.

`:publish` is the ONLY thing that differs between packages — the task names
are identical everywhere, so one CI workflow drives the whole fleet:

  :clojars       public source jar   -> repo.clojars.org
  :gitea         AOT no-source jar   -> private Gitea Maven registry
  :gitea-source  source jar          -> private Gitea Maven registry
  :none          builds, never ships

Tasks (invoke with `clojure -T:build <task>`):
  clean           delete target/
  jar             source jar + pom
  jar-aot         AOT no-source jar (own .class + resources only)
  install         build + install to ~/.m2 (offline)
  kondo           sync dependency-exported lint configs, then lint
  bump            rewrite ./VERSION (:level :patch|:minor|:major)
  verify-license  report LICENSE / version.edn / SPDX agreement (warns)
  deploy          build + publish per :publish (no-op when :none)

Release flow (what CI runs on a push to main that touches src/deps):
  clojure -T:build bump :level :patch
  clojure -T:build deploy
raw docstring

bumpclj

(bump {:keys [level] :or {level :patch}})

Rewrite ./VERSION to the next semantic version and print it.

:level :patch (default) | :minor | :major VERSION is the single source of truth for both the git tag (v{VERSION}) and the Maven coordinate. Does not commit, tag, or deploy.

Rewrite ./VERSION to the next semantic version and print it.

:level :patch (default) | :minor | :major
VERSION is the single source of truth for both the git tag (v{VERSION}) and
the Maven coordinate. Does not commit, tag, or deploy.
sourceraw docstring

cleanclj

(clean _)

Delete target/.

Delete target/.
sourceraw docstring

deployclj

(deploy opts)

Build + publish according to version.edn :publish.

A coordinate already present in the registry is a no-op, not an error: both registries are immutable, so releasing again means bumping VERSION.

Build + publish according to version.edn :publish.

A coordinate already present in the registry is a no-op, not an error:
both registries are immutable, so releasing again means bumping VERSION.
sourceraw docstring

installclj

(install _)

Build + install to the local ~/.m2 repository (offline).

Build + install to the local ~/.m2 repository (offline).
sourceraw docstring

jarclj

(jar _)

Build the source jar (pom + copied sources) under target/.

Build the source jar (pom + copied sources) under target/.
sourceraw docstring

jar-aotclj

(jar-aot _)

Build the AOT no-source jar: this lib's own .class files + resources only.

Build the AOT no-source jar: this lib's own .class files + resources only.
sourceraw docstring

kondoclj

(kondo {:keys [aliases paths fail-level]
        :or {aliases [:test] fail-level :error}})

Sync clj-kondo configs exported by dependencies, then lint.

Any deps.edn or bb.edn dependency shipping resources/clj-kondo.exports/<group>/<artifact>/ has its config + hooks copied into ./.clj-kondo/imports/, which clj-kondo loads automatically. Macro awareness therefore arrives with the dependency instead of being re-authored per repo.

:aliases deps aliases whose classpath is scanned (default [:test]) :paths lint targets (default src + test) :fail-level :error (default) | :warning | nil to report only

Sync clj-kondo configs exported by dependencies, then lint.

Any deps.edn or bb.edn dependency shipping
resources/clj-kondo.exports/<group>/<artifact>/ has its config + hooks
copied into ./.clj-kondo/imports/, which clj-kondo loads automatically.
Macro awareness therefore arrives with the dependency instead of being
re-authored per repo.

:aliases    deps aliases whose classpath is scanned  (default [:test])
:paths      lint targets                             (default src + test)
:fail-level :error (default) | :warning | nil to report only
sourceraw docstring

verify-licenseclj

(verify-license _)

Report whether ./LICENSE, version.edn :license and the src SPDX headers agree. Advisory: prints and returns the report, never fails the build.

Report whether ./LICENSE, version.edn :license and the src SPDX headers
agree. Advisory: prints and returns the report, never fails the build.
sourceraw 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