What is bld?
bld
is a new build system that allows you to write your build logic in pure Java.
bld
was created because we're not really interested in build tools. We use them because we have to, but we'd rather just get on with coding the real stuff.
bld
is designed with the following principles in mind:
- tasks don't happen without you telling them to happen
- no auto-magical behavior, task behavior is explicit and API-defined
- managing libs yourself is fine, having that automated also, or mix and match
- build logic is written in Java, with all the advantages of Java
- standard collection of Java-centric tasks for common operations
bld
is distributed in a single jar, if you have the jar, you have the build system
Join the Community Forums Chat on Discord
Designed for modern Java
bld relies on Java 17 and leverages many of the features that this version of Java provides. Thanks to the modern language constructs, your Java build logic ends up looking very concise, is easily readable and understood by any IDE. You automatically get support for auto-completion and javadoc documentation, and you can split your build logic into multiple files and classes when you outgrow a single file.
Here is a complete bld file for a Java application using JUnit 5 for its tests. Nothing else is needed to be able to run it, test it and distribute it:
Where does bld fit?
From a very high level, build tools can be organized in a matrix:
- either your tool is declarative or in code
- either your tool first describes a plan or immediately executes a plan
Declarative | Code | Describes | Immediate | |
---|---|---|---|---|
Maven | ✔︎ | ✔︎ | ||
Gradle | ✔︎ | ✔︎ | ||
bld | ✔︎ | ✔︎ |
Writing your build logic in the same language as your application (Java), significantly reduces the cognitive load, and taking actions immediately without having to mentally construct a described plan, makes it easier to reason about your build.
IDE support
Since version 2.0, bld comes with its own IntelliJ IDEA plugin:
- detect bld projects and find their main Java class
- quick access to open and edit the main Java class and wrapper properties of bld projects
- list all the commands in bld projects in a side panel
- execute one or multiple commands in the order they were selected
- reload the commands in the bld project
- terminate currently running bld commands
- bld console panel for command output with source code hyperlinking
- display the bld dependency tree
- toggle to run bld in offline or online mode
- auto-save all open files before executing a bld command
- convenient bld one-click cache invalidation
- set bld commands to run before or after IDEA compilation
- create custom bld command run configuration
- assign keyboard shortcuts to bld commands
Find out more
bld
lets your build logic get out of the way so that you can focus on writing applications.