From f98a139c3eea9e70c5ffc7d4fb42fb68ecf98a07 Mon Sep 17 00:00:00 2001 From: Alex Abashev Date: Sat, 28 Nov 2026 19:56:34 +0300 Subject: [PATCH] Offer scoop install on the Command line page and list the Scoop bucket The bucket openjavaformat/scoop-bucket installs the Windows x64 binary of the latest release, and an hourly workflow there moves it to each new release once it has installed and tested it on Windows x64 and Windows 11 on ARM. The Command line page gets a Scoop section and says that Windows 11 on ARM runs the x64 binary under emulation; About lists the bucket; the home page has the scoop commands next to brew. --- docs/about.md | 6 ++++-- docs/get-started/command-line.md | 30 ++++++++++++++++++++++++------ docs/index.md | 9 +++++++-- 3 files changed, 35 insertions(+), 10 deletions(-) diff --git a/docs/about.md b/docs/about.md index 8f52b99..cbf47ed 100644 --- a/docs/about.md +++ b/docs/about.md @@ -14,13 +14,15 @@ project exists is in the [manifesto](manifesto.md). | [JetBrains Marketplace](https://plugins.jetbrains.com/plugin/34359-open-java-format) | the IntelliJ IDEA plugin | | [GitHub Releases](https://github.com/openjavaformat/open-java-format/releases/latest) | native binaries, the runnable jar, the Gradle, IntelliJ IDEA and Eclipse plugins | | [Homebrew tap](https://github.com/openjavaformat/homebrew-tap) | `openjavaformat/tap/open-java-format`, the native binary for macOS and Linux | +| [Scoop bucket](https://github.com/openjavaformat/scoop-bucket) | `openjavaformat/open-java-format`, the native binary for Windows | The Maven Central artifacts, the Gradle plugins and the files of a GitHub release are built by the [release workflow](https://github.com/openjavaformat/open-java-format/blob/main/.github/workflows/release.yml) from the tag of the version. The Maven plugin has a repository and a release workflow of its own, [openjavaformat/fmt-maven-plugin](https://github.com/openjavaformat/fmt-maven-plugin). The Homebrew -formula installs the native binaries of the GitHub release: a workflow in the tap moves it to each -new release within the hour, once it has installed and tested it on every platform. +formula and the Scoop manifest install the native binaries of the GitHub release. A workflow in the +tap and one in the bucket move them to each new release within the hour, once they have installed +and tested that release on every platform. ## Versions diff --git a/docs/get-started/command-line.md b/docs/get-started/command-line.md index 60ccca8..db84885 100644 --- a/docs/get-started/command-line.md +++ b/docs/get-started/command-line.md @@ -1,8 +1,8 @@ # Command line The formatter comes as a native binary that needs no Java, and as a runnable jar for every platform -the binaries do not cover. On macOS and Linux, Homebrew installs the binary and keeps it current; -mise installs it on Windows too, and pins its version per project. +the binaries do not cover. Homebrew on macOS and Linux and Scoop on Windows install the binary and +keep it current; mise installs it on all three and pins its version per project. ## Homebrew @@ -14,13 +14,30 @@ open-java-format --version The formula comes from our tap, [openjavaformat/homebrew-tap](https://github.com/openjavaformat/homebrew-tap). It downloads the native binary of the latest release from GitHub, checks it against the release's checksums and puts `open-java-format` on your `PATH`. It covers macOS on Apple silicon and Intel and -Linux on x86-64 and AArch64; on Windows, run it in WSL or download the binary below. Homebrew fetches -the file with `curl`, so macOS does not quarantine it. +Linux on x86-64 and AArch64; on Windows, use [Scoop](#scoop) or [mise](#mise). Homebrew fetches the +file with `curl`, so macOS does not quarantine it. `brew upgrade` takes each new release, at the latest an hour after it is published. A new minor version can change the output (see [Versions](../about.md#versions)): `brew pin open-java-format` holds the installed one. +## Scoop + +``` powershell +scoop bucket add openjavaformat https://github.com/openjavaformat/scoop-bucket +scoop install openjavaformat/open-java-format +open-java-format --version +``` + +The manifest comes from our bucket, [openjavaformat/scoop-bucket](https://github.com/openjavaformat/scoop-bucket). +It downloads the Windows x64 binary of the latest release from GitHub, checks it against the release's +checksums and puts `open-java-format` on your `PATH`, for your user and without administrator rights. +Scoop needs Git to add a bucket: run `scoop install git` first if you have none. On Windows 11 on +ARM, Scoop installs the same x64 binary, and Windows runs it under emulation. + +`scoop update` fetches the bucket, and `scoop update open-java-format` then takes the new release, at +the latest an hour after it is published. `scoop hold open-java-format` holds the installed version. + ## mise ``` sh @@ -60,8 +77,9 @@ Pick the file for your platform from the | Windows, x86-64 | `open-java-format-windows_x86-64.exe` | | Anything else with Java 21 or later | `open-java-format-{{ ojf_version }}-all.jar` | -The Linux binaries need glibc 2.34 or later. There is no native binary for Windows on ARM or for -musl-based Linux such as Alpine. Use the jar there. +The Linux binaries need glibc 2.34 or later. There is no native binary for Windows on ARM, but +Windows 11 runs the x64 one under emulation. For musl-based Linux such as Alpine there is none: use +the jar there. ``` sh title="Native binary, here for Apple silicon" curl -LO https://github.com/openjavaformat/open-java-format/releases/download/{{ ojf_version }}/open-java-format-macos_aarch64 diff --git a/docs/index.md b/docs/index.md index 41a1c2f..6162e93 100644 --- a/docs/index.md +++ b/docs/index.md @@ -155,13 +155,18 @@ on the [Maven plugin](get-started/maven.md) page. ### On the command line Every [release](https://github.com/openjavaformat/open-java-format/releases/latest) carries native -binaries for Linux, macOS and Windows, and a runnable jar for Java 21 or later. On macOS and Linux, -Homebrew installs the binary. +binaries for Linux, macOS and Windows, and a runnable jar for Java 21 or later. Homebrew installs +the binary on macOS and Linux, and Scoop on Windows. ``` sh title="Install with Homebrew" brew install openjavaformat/tap/open-java-format ``` +``` powershell title="Install with Scoop" +scoop bucket add openjavaformat https://github.com/openjavaformat/scoop-bucket +scoop install openjavaformat/open-java-format +``` + ``` sh title="Format files in place" open-java-format --replace src/main/java/com/example/Hello.java ```