-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the project a simple library (#1)
Earlier versions of that code in the Scala CLI build relied on Mill tasks working directory, but it doesn't any more, so we don't need to use the Mill task system here
- Loading branch information
1 parent
5cab7d2
commit 1268264
Showing
9 changed files
with
64 additions
and
552 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
out/ | ||
.scala-build/ | ||
.bsp/ | ||
.metals/ | ||
.vscode/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,18 @@ | ||
# mill-cs | ||
# get-cs | ||
|
||
A Mill plugin to fetch a [coursier](https://github.com/coursier/coursier) from Mill | ||
A library to fetch a [coursier](https://github.com/coursier/coursier) from Scala code | ||
|
||
This plugin fetches native coursier launcher, depending on your OS (Linux / macOS / | ||
This library fetches a native coursier launcher, depending on your OS (Linux / macOS / | ||
Windows) and architecture (x86-64 / ARM64), and falls back to any launcher | ||
available in the `PATH` in unsupported OSes or architectures. | ||
|
||
Use like | ||
```scala | ||
import $ivy.`io.get-coursier.mill::mill-cs::0.1.0` | ||
import coursier.mill.MillCs | ||
//> using lib "io.get-coursier.util:get-cs::0.1.0" | ||
import coursier.getcs.GetCs | ||
|
||
object cs extends MillCs { | ||
// override these to hard-code the coursier version you'd like to use | ||
// def csVersion = MillCs.defaultVersion | ||
// def csArmVersion = MillCs.defaultArmVersion | ||
} | ||
``` | ||
val csCommand = GetCs.cs() // optionally pass a coursier version to hard-code the version you're using | ||
|
||
You can then get the command to run coursier with `cs.cs()` (typed as a `String`). | ||
new ProcessBuilder(csCommand, "fetch", "org:name:ver") | ||
.start() | ||
``` |
Oops, something went wrong.