Skip to content

Commit

Permalink
More Documentation Review Updates (#3854)
Browse files Browse the repository at this point in the history
* Broke out a new top-level section `The Mill CLI` for what was
previously `Installation & IDE Support`
* Broke out `Mill Command-Line Flags` and `Other installation methods`
into their own sections
* Moved documentation for `--interactive`/`--watch`/`--jobs` into `Mill
Command-Line Flags`
* Moved the `Realistic {language} Example Project` from `build-examples`
to `{language}lib/intro.adoc`
* This helps make a clearer separation between the "tutorial
read-from-top-to-bottom" `intro.adoc` and the rest of the stuff in each
language-specific section which is more "look up stuff as necessary"
* Deleted the `nested-modules` example. Probably not important enough to
deserve a full example/doc on its own
* `build-examples.adoc` now only contains `Example builds for real
projects` and `Real World Mill Builds`
* Add a reference to mill-mima under the Linting pages for Java and
Scala (not sure if it works well with Kotlin so left that out)
* Add the missing kotlin web examples to the kotlin doc pages
  • Loading branch information
lihaoyi authored Oct 28, 2024
1 parent c2e743d commit d8bbe52
Show file tree
Hide file tree
Showing 80 changed files with 453 additions and 849 deletions.
2 changes: 1 addition & 1 deletion ci/test-mill-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -eux

EXAMPLE=example/scalalib/builds/4-realistic
EXAMPLE=example/scalalib/basic/6-realistic

rm -rf $EXAMPLE/out

Expand Down
2 changes: 1 addition & 1 deletion ci/test-mill-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -eux
# Build Mill
./mill -i dist.assembly

EXAMPLE=example/scalalib/builds/4-realistic
EXAMPLE=example/scalalib/basic/6-realistic

rm -rf $EXAMPLE/out

Expand Down
10 changes: 6 additions & 4 deletions docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
.xref:index.adoc[]

.xref:javalib/intro.adoc[]
* xref:javalib/installation-ide.adoc[]
* xref:javalib/builtin-commands.adoc[]
* xref:javalib/module-config.adoc[]
* xref:javalib/dependencies.adoc[]
Expand All @@ -18,7 +17,6 @@
* xref:javalib/android-examples.adoc[]
.xref:scalalib/intro.adoc[]
* xref:scalalib/installation-ide.adoc[]
* xref:scalalib/builtin-commands.adoc[]
* xref:scalalib/module-config.adoc[]
* xref:scalalib/dependencies.adoc[]
Expand All @@ -29,14 +27,13 @@
* xref:scalalib/web-examples.adoc[]
.xref:kotlinlib/intro.adoc[]
* xref:kotlinlib/installation-ide.adoc[]
* xref:kotlinlib/builtin-commands.adoc[]
* xref:kotlinlib/module-config.adoc[]
* xref:kotlinlib/dependencies.adoc[]
* xref:kotlinlib/testing.adoc[]
* xref:kotlinlib/linting.adoc[]
* xref:kotlinlib/publishing.adoc[]
* xref:kotlinlib/build-examples.adoc[]
// * xref:kotlinlib/build-examples.adoc[]
* xref:kotlinlib/web-examples.adoc[]
* xref:kotlinlib/android-examples.adoc[]
Expand All @@ -45,6 +42,11 @@
* xref:comparisons/gradle.adoc[]
* xref:comparisons/sbt.adoc[]
.The Mill CLI
* xref:cli/installation-ide.adoc[]
* xref:cli/flags.adoc[]
* xref:cli/alternate-installation.adoc[]
// This section gives a tour of the various user-facing features of Mill:
// library deps, out folder, queries, tasks, etc.. These are things that
// every Mill user will likely encounter, and are touched upon in the various
Expand Down
120 changes: 120 additions & 0 deletions docs/modules/ROOT/pages/cli/alternate-installation.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
= Other installation methods

CAUTION: The installation methods listed below are maintained outside of Mill and may not have
the same features as the xref:cli/installation-ide.adoc#_bootstrap_scripts[bootstrap scripts]. You can try using them,
but the officially supported way to use Mill is via the bootstrap script above, so the Mill
maintainers may be unable to help you if you have issues with some alternate installation method.

CAUTION: Some of the installations via package managers install a fixed version of Mill and
do not support project-specific selection of the preferred Mill version. If you want to use
the `MILL_VERSION` environment variable or need support for `.mill-version` or
`.config/mill-version` files to control the actual used Mill version, please use
a xref:cli/installation-ide.adoc#_bootstrap_scripts[bootstrap script] instead.

== OS X

Installation via https://github.com/Homebrew/homebrew-core/blob/master/Formula/m/mill.rb[homebrew]:

[source,sh]
----
brew install mill
----


== Arch Linux

Arch Linux has an https://archlinux.org/packages/extra/any/mill/[Extra package for mill]:

[source,bash]
----
pacman -S mill
----

== FreeBSD

Installation via http://man.freebsd.org/pkg/8[pkg(8)]:

[source,sh]
----
pkg install mill
----

== Gentoo Linux

[source,sh]
----
emerge dev-java/mill-bin
----

== Windows

To get started, download Mill from
{mill-github-url}/releases/download/{mill-last-tag}/{mill-last-tag}-assembly[Github releases], and save it as `mill.bat`.

If you're using https://scoop.sh[Scoop] you can install Mill via

[source,bash]
----
scoop install mill
----

== WSL / MSYS2 / Cycgin / Git-Bash

Mill also works on "sh" environments on Windows (e.g.,
https://www.msys2.org[MSYS2],
https://www.cygwin.com[Cygwin],
https://gitforwindows.org[Git-Bash],
https://docs.microsoft.com/en-us/windows/wsl[WSL]); to get started, follow the instructions in the <<_manual>>
section. Note that:

* In some environments (such as WSL), Mill might have to be run without a server (using `-i`, `--interactive`, or `--no-server`.)

* On Cygwin, run the following after downloading mill:

[source,bash]
----
sed -i '0,/-cp "\$0"/{s/-cp "\$0"/-cp `cygpath -w "\$0"`/}; 0,/-cp "\$0"/{s/-cp "\$0"/-cp `cygpath -w "\$0"`/}' /usr/local/bin/mill
----

== Docker

You can download and run
a https://hub.docker.com/r/nightscape/scala-mill/["Docker image containing OpenJDK, Scala and Mill"] using

[source,bash]
----
docker pull nightscape/scala-mill
docker run -it nightscape/scala-mill
----

== Manual

To get started, download Mill and install it into your HOME ".local/bin" via the following
`curl`/`chmod` command:

[source,bash,subs="verbatim,attributes"]
----
sh -c "curl -L {mill-github-url}/releases/download/{mill-last-tag}/{mill-last-tag} > ~/.local/bin/mill && chmod +x ~/.local/bin/mill"
----

== Coursier (unsupported)

Installing mill via `coursier` or `cs` is currently not officially supported.
There are various issues, especially with interactive mode.

== Asdf (unsupported)

You can install and manage Mill via the Multiple Runtime Version Manager - https://asdf-vm.com/[`asdf`].

Support by `asdf` is currently possible by using the https://github.com/asdf-community/asdf-mill[`asdf-mill` plugin]:

.Steps to install the `mill` plugin and Mill with `asdf`
[source,bash]
---
asdf plugin add mill
asdf install mill latest
asdf global mill latest
---
Loading

0 comments on commit d8bbe52

Please sign in to comment.