This is fooheads build.clj, used in our libs and projects.
To use it, first create a file in you librarys root called lib.edn.
{:name com.fooheads/example-lib
:version "1.3.2"
If you are to deploy it to clojars, the namespace of the symbol id should be your clojars group-id
(com.fooheads in this example).
Then add this alias to your deps.edn:
:build
{:deps
{com.fooheads/build-clj {:mvn/version "1.1.0"}}
:ns-default fooheads.build}
If you want to deploy to a private maven repository, you can att a
:respository key to lib.edn with the URL of the repository:
{:name com.fooheads/example-lib
:version "1.3.2"
:repository "https://maven.pkg.github.com/OWNER/REPOSITORY"}
or to an S3 bucket:
{:name com.fooheads/example-lib
:version "1.3.2"
:repository "s3p://some-s3-bucket/releases""}
That's it. Now you can do the following:
Cleans the target folder.
clojure -T:build clean
Calls clean and then builds a jar file with name (excluding namespace/group) and
version from lib.edn
clojure -T:build jar
Example output:
Build folder "target" removed
Jar file created: "target/stdlib-0.1.12.jar"
Deploys the lib to clojars. You need CLOJARS_USERNAME and CLOJARS_PASSWORD as environment variables.
clojure -T:build deploy
Can you improve this documentation?Edit on GitHub
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 |