Skip to content

leviysoft/hjk

Repository files navigation

hjk

hjk is a simple yet flexible build tool for Scala and virtually any other language.

hjk is designed with the following principles in mind:

  • Nothing is hardcoded - everything in hjk is configuration, built-in tasks are just statically served templates (we call them blueprints)
  • Nothing is special - every single bit of configuration can be overridden by the user, hjk is not opinionated about anything
  • Extensibility gives the power - hjk is designed to be extensible, you can add support for any reasonable tool with a few lines

Technically hjk is not a build tool, it's a, let's say, configurable launcher. For example, it leverages Coursier for resolving dependencies and running Scala compiler, but has no hardcoded knowledge about Scala or any other language.

hjk uses Dhall for configuration, which is a powerful typed configuration language.

Installation

Prerequisites

For building Scala (or other JVM languages) you need to install Coursier. Only the cs command is needed, scala, scalac, etc. are not required for installation.

Getting hjk

You can download a precompiled hjk binary from the releases page.

If you want to build hjk from sources, you need to install Stack. When you have stack installed, you can install hjk with stack install.

Dhall support in your editor

Since hjk uses Dhall for configuration, it might be a good idea to have Dhall support in your editor.

For VSCode there is a Dhall LSP Server extension. (you will need to install dhall-lsp-server to get it working).

For IntelliJ there is a Dhall plugin.

Usage

You can find an example project using hjk here.

Q&A

Q: Why write build tool for Scala in Haskell?

A: Dhall was chosen as configuration language because of it's features and out-of-the-box editor support, and Dhall is initially written in Haskell. You don't have to know Haskell to use hjk, even for extending built-in tasks or writing your own.

About

Build tool for those who doesn't need build tool

Resources

License

Stars

Watchers

Forks

Packages

No packages published