“The tools we use have a profound (and devious!) influence on our thinking habits, and, therefore, on our thinking abilities.”
Bach is a lightweight Java build tool that orchestrates JDK tools for building modular Java projects.
By default, it tries its best to call the right tool at the right time with the right arguments. Bach encourages developers to explore, learn, and master these foundation tools with their options; in order to allow a good understanding of what is really going on when building a Java project. Pass those learnings and optimizations as fine-grained tweaks in a declarative manner back to Bach using pure Java syntax.
Install JDK 16 or later.
> java .bach/src/bootstrap.java > .bach/bin/bach build
The JDK contains a set of foundation tools but none of them guides developers from processing Java source files into shippable products: be it a reusable modular JAR file with its API documentation or an entire custom runtime image. There exists however an implicit workflow encoded in the available tools and their options. The (binary) output of one tool is the input of one or more other tools. With the introduction of modules in Java 9 some structural parts of that workflow got promoted into the language itself and resulted in explicit module-related tool options.
These structural information, encoded explicitly by developers in Java’s module descriptors (
serves as basic building blocks for Bach’s project model. Their location within the file tree, their module name, and
requires directives are examples of such information. In addition, Bach defines an API in order to let
developers define extra configuration information. Included are project-specific values such as a short name, a version
that is applied to all modules of the project, a path matcher defining where to find modules, and a lot more. Most of
these project-specific values have pre-defined default values; some of these values provide an auto-configuration
junittool by the project).
Bach will not support “all features known from other build tools”.
If a feature F is not provided by an underlying tool, Bach will not support F.
Bach will not…