Skip to content

Latest commit

 

History

History
82 lines (54 loc) · 1.92 KB

build-systems.md

File metadata and controls

82 lines (54 loc) · 1.92 KB

Build Systems

Key Points

  • Make - simple classic, battle tested for decades. Even if you don't code you should know this to make sysadmin stuff easier
  • Maven - used mainly by Java / JVM programmers, build file is XML showing its age
  • Gradle - modern replacement for Maven, used mainly by Java / JVM programmers
  • SBT - used mainly by Scala programmers - my least favourite of the 3 main JVM build tools
  • Bazel - incremental build system

Make

See make.md

Maven

See maven.md

Gradle

See gradle.md

Sbt

See sbt.md

Bazel

https://bazel.build/

  • fast incremental builds tracks changes to files and only rebuilds what is necessary

Install

On Mac you'll need XCode:

xcode-select --install
sudo xcodebuild -license accept

On Mac:

brew install bazel

Manual download:

export BAZEL_VERSION=3.2.0
curl -fLO "https:/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-darwin-x86_64.sh"
chmod +x "bazel-${BAZEL_VERSION}-installer-darwin-x86_64.sh"
./bazel-${BAZEL_VERSION}-installer-darwin-x86_64.sh --user  # --user installs to ~/bin and sets the .bazelrc path to ~/.bazelrc

In HariSekhon/DevOps-Bash-tools repo install/ directory you can just run this instead:

install_bazel.sh  # 3.2.0  # optional version number arg

Check installed:

bazel version

Ported from various private Knowledge Base pages 2010+ - not sure why I didn't have Makefile notes from years earlier - young guys don't document enough! Bazel notes from 2021