There's a new Java build system named Bld

What is Bld?

Want to write your software build logic entirely in Java?

There’s a new build tool out that does exactly that. It’s name? Bld.

It’s built by two heavyweights of the software engineering world: Geert Bevin and Erik Thauvin.

  • Geert Bevin is a Java Champion and the author of RIFE2, a full-stack, no-declaration framework to develop of web-based Java applications.
  • Erik Thauvin, who’s also involved with RIFE2, is a prolific software developer with over 86 GitHub repositories to his name.

Today, Bld is primarily targeted at RIFE2, but it can easily be used and integrated into other software development projects.

How Bld works

Bld is easily adopted and extended by any software developer familiar with basic Java programming concepts.

Bld is controlled by a Java class, which means that you literally write a build mechanism in Java.

The main entry point for Bld extends the Project class. This exposes to the developer attributes such as:

  • The root package name.
  • The name of the application.
  • A main class.
  • A list of dependencies.
  • Standard elements Java build projects would need.

The build class is quite literally Java, so you can create a full set of your own support classes to aid the build process if necessary.

Bld also exposes convenient extension points so you can add alternative compiler support for languages like Kotlin, Scala, Clojure or any other mechanism your project might need.

Maven vs Gradle vs Bld

From a 20,000-foot view, Bld looks like an interesting cross between an imperative build system like Gradle and a configurable build system like Maven.

In Maven, you describe a project and the program executes phases based on the configured elements of the project and the user’s command. You then configure your classpath and scope, and ask for a phase to run. Maven then runs everything it needs as dependent tasks of that phase.

In Gradle, you have a similar task-focused approach. However, Gradle exposes nearly everything to you as configurable code, so you can change a test task to generate a full data model for your project, for example. This is incredibly flexible, but also means that Gradle projects can be far more individually designed than Maven projects, all of which look vaguely the same (and should).

Bld builds on lessons learned

Bld provides a good mix between the two.

Bld has a very simple structure, and it’s written in Java, so there’s no XML or Groovy or Kotlin DSL to learn. That’s a massive advantage for Bld.

Furthermore, Bld executes tasks in a predetermined order, and also enables tasks to be tuned specifically for a given build.

It’s a very raw project so far, but it’s already functional, and shows great promise for the future.

Installation, configuration and advanced usage instructions can be found on the Bld project’s GitHub page.