Skip to content

Commit

Permalink
update changelog for 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi committed Apr 10, 2018
1 parent 0b11197 commit b41a094
Show file tree
Hide file tree
Showing 8 changed files with 126 additions and 24 deletions.
58 changes: 51 additions & 7 deletions docs/pages/1 - Intro to Mill.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Mill](https://github.com/lihaoyi/mill) is your shiny new Scala build tool!
[Mill](https://github.com/lihaoyi/mill) is your shiny new Java/Scala build tool!
[Scared of SBT](http://www.lihaoyi.com/post/SowhatswrongwithSBT.html)?
Melancholy over Maven? Grumbling about Gradle? Baffled by Bazel? Give Mill a
try!
Expand Down Expand Up @@ -33,6 +33,28 @@ Arch Linux has an [AUR package for mill](https://aur.archlinux.org/packages/mill
pacaur -S mill
```

### Windows

To get started, download Mill from: https://github.com/lihaoyi/mill/releases/download/0.1.8/0.1.8,
and save it as `mill.bat`.

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

* In some environments (such as WSL), mill has be run using interactive mode (`-i`)

* Git-Bash: run the instruciton in administrator mode instead of `sudo`

* Cygwin: run the following after downloading mill:

```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
```

### Manual

To get started, download Mill and install it into your system via the following
Expand All @@ -54,6 +76,17 @@ questions or say hi!

## Getting Started

The simplest Mill build for a Java project looks as follows:

```scala
// build.sc
import mill._, mill.scalalib._
object foo extends JavaModule {
}
```

The simplest Mill build for a Scala project looks as follows:

```scala
Expand All @@ -66,13 +99,14 @@ object foo extends ScalaModule {
}
```

This would build a project laid out as follows:
Both of these would build a project laid out as follows:

```
build.sc
foo/
src/
Main.scala
FileA.java
FileB.scala
resources/
...
out/
Expand Down Expand Up @@ -100,7 +134,7 @@ $ mill foo.launcher # prepares a foo/launcher/dest/run you can ru
$ mill foo.jar # bundle the classfiles into a jar
$ mill foo.assembly # bundle classfiles and all dependencies into a jar
$ mill -i foo.console # start a Scala console within your project (in interactive mode: "-i")
$ mill -i foo.repl # start an Ammonite REPL within your project (in interactive mode: "-i")
Expand Down Expand Up @@ -141,10 +175,20 @@ respective `out/foo/bar/` folder.

## Multiple Modules

### Java Example
```scala
// build.sc
import mill._
import mill.scalalib._
import mill._, mill.scalalib._
object foo extends ScalaModule
object bar extends ScalaModule {
def moduleDeps = Seq(foo)
}
```

### Scala Example
```scala
// build.sc
import mill._, mill.scalalib._
object foo extends ScalaModule {
def scalaVersion = "2.12.4"
}
Expand All @@ -155,7 +199,7 @@ object bar extends ScalaModule {
```

You can define multiple modules the same way you define a single module, using
`def moduleDeps` to define the relationship between them. The above build
`def moduleDeps` to define the relationship between them. The above builds
expects the following project layout:

```
Expand Down
44 changes: 44 additions & 0 deletions docs/pages/3 - Common Project Layouts.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,50 @@ Earlier, we have shown how to work with the Mill default Scala module layout.
Here we will explore some other common project layouts that you may want in your
Scala build:

### Java Project with Test Suite

```scala
trait JUnitTests extends TestModule{
def testFrameworks = Seq("com.novocode.junit.JUnitFramework")
def ivyDeps = Agg(ivy"com.novocode:junit-interface:0.11")
}

object core extends JavaModule{
object test extends Tests with JUnitTests
}
object app extends JavaModule{
def moduleDeps = Seq(core)
object test extends Tests with JUnitTests
}
```

This build is a two-module Java project with junit test suites. It expects the
following filesystem layout:

```text
build.sc
app/
src/hello/
Main.java
test/src/hello/
MyAppTests.java
core/
src/hello/
Core.java
test/src/hello/
MyCoreTests.java
```

You can then run the junit tests using `mill app.test` or `mill core.test`, and
configure which exact tests you want to run using the flags defined on the
[JUnit Test Interface](https://github.com/sbt/junit-interface#junit-interface).

For a more more complex, real-world example of a Java build, check out our
example build for the popular [Caffeine](https://github.com/ben-manes/caffeine)
project:

- [Example Build](https://github.com/lihaoyi/mill/blob/master/integration/test/resources/caffeine/build.sc)

### Cross Scala-Version Modules

```scala
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
48 changes: 31 additions & 17 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,30 +328,44 @@ rm -rf out/

## Changelog

### Master
### 0.2.0

- Universal (combined batch/sh) script generation for launcher, assembly, and release
- Universal (combined batch/sh) script generation for launcher, assembly, and
release

For some shell (e.g., `ksh` or `fish`), a shebang line should be added, e.g., using GNU sed:

```bash
sed -i '1s;^;#!/usr/bin/env sh\n;' <mill-path>
```

Or download directly with shebang added as follows:

```bash
sudo sh -c '(echo "#!/usr/bin/env sh" && curl -L <mill-url>) > /usr/local/bin/mill && chmod +x /usr/local/bin/mill'
```

On Windows, save `<mill-url>` as `mill.bat`

- Windows client/server improvements

- Windows repl support (note: MSYS2 subsystem/shell will be supported when jline3 v3.6.3 is released)
- Windows repl support (note: MSYS2 subsystem/shell will be supported when jline3
v3.6.3 is released)

- Fixed Java 9 support

- Remove need for running `publishAll` using `--interactive` when on OSX and
your GPG key has a passphrase

- First-class support for `JavaModule`s

- Properly pass compiler plugins to Scaladoc ([#282](https://github.com/lihaoyi/mill/issues/282))

- Support for ivy version-pinning via `ivy"...".forceVersion()`

- Support for ivy excludes via `ivy"...".exclude()` ([#254](https://github.com/lihaoyi/mill/pull/254))

- Make `ivyDepsTree` properly handle transitive dependencies ([#226](https://github.com/lihaoyi/mill/issues/226))

- Fix handling of `runtime`-scoped ivy dependencies ([#173](https://github.com/lihaoyi/mill/issues/173))

- Make environment variables available to Mill builds ([#257](https://github.com/lihaoyi/mill/issues/257))

- Support ScalaCheck test runner ([#286](https://github.com/lihaoyi/mill/issues/286))

- Support for using Typelevel Scala ([#275](https://github.com/lihaoyi/mill/issues/275))

- If a module depends on multiple submodules with different versions of an
ivy dependency, only one version is resolved ([#273](https://github.com/lihaoyi/mill/issues/273))



### 0.1.7

- Windows batch (.bat) generation for launcher, assembly, and release
Expand Down

0 comments on commit b41a094

Please sign in to comment.