From 674645ddf342958c462ecd2dcd774d5443e846f3 Mon Sep 17 00:00:00 2001 From: jilen Date: Mon, 11 Dec 2023 10:29:42 +0800 Subject: [PATCH 1/2] add mirror config doc --- .../scalamodule/11-repository-config/build.sc | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/example/scalamodule/11-repository-config/build.sc b/example/scalamodule/11-repository-config/build.sc index 965582996ba..d4a8514b69c 100644 --- a/example/scalamodule/11-repository-config/build.sc +++ b/example/scalamodule/11-repository-config/build.sc @@ -17,12 +17,26 @@ object foo extends ScalaModule { } } +// Mill will read [coursier](https://get-coursier.io/) config files automatically. +// +// It is possible to setup mirror with `mirror.properties` +// ``` +// central.from=https://repo1.maven.org/maven2 +// central.to=http://exmaple.com:8080/nexus/content/groups/public +// ``` +// Note the config file located in: +// + Windows: C:\Users\\AppData\Roaming\Coursier\config\mirror.properties +// + Linux: ~/.config/coursier/mirror.properties +// + MacOS: ~/Library/Preferences/Coursier/mirror.properties +// You can also set the environment variable `COURSIER_MIRRORS` or jvm property `coursier.mirrors` to specify config file location. + + // To add custom resolvers to the initial bootstrap of the build, you can create a // custom `ZincWorkerModule`, and override the `zincWorker` method in your // `ScalaModule` by pointing it to that custom object: object CustomZincWorkerModule extends ZincWorkerModule with CoursierModule { - def repositoriesTask() = T.task { super.repositoriesTask() ++ sonatypeReleases } + def repositoriesTask = T.task { super.repositoriesTask() ++ sonatypeReleases } } object bar extends ScalaModule { @@ -37,4 +51,4 @@ object bar extends ScalaModule { > ./mill bar.compile -*/ \ No newline at end of file +*/ From e0cabd6dbb4053341965d55e5dbef19bed3c7493 Mon Sep 17 00:00:00 2001 From: Tobias Roeser Date: Tue, 12 Dec 2023 18:00:11 +0100 Subject: [PATCH 2/2] Change markup to Asciidoc --- .../scalamodule/11-repository-config/build.sc | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/example/scalamodule/11-repository-config/build.sc b/example/scalamodule/11-repository-config/build.sc index d4a8514b69c..0968e56a130 100644 --- a/example/scalamodule/11-repository-config/build.sc +++ b/example/scalamodule/11-repository-config/build.sc @@ -17,18 +17,22 @@ object foo extends ScalaModule { } } -// Mill will read [coursier](https://get-coursier.io/) config files automatically. +// Mill read https://get-coursier.io/[coursier] config files automatically. // // It is possible to setup mirror with `mirror.properties` -// ``` +// [source,properties] +// ---- // central.from=https://repo1.maven.org/maven2 -// central.to=http://exmaple.com:8080/nexus/content/groups/public -// ``` -// Note the config file located in: -// + Windows: C:\Users\\AppData\Roaming\Coursier\config\mirror.properties -// + Linux: ~/.config/coursier/mirror.properties -// + MacOS: ~/Library/Preferences/Coursier/mirror.properties -// You can also set the environment variable `COURSIER_MIRRORS` or jvm property `coursier.mirrors` to specify config file location. +// central.to=http://example.com:8080/nexus/content/groups/public +// ---- +// +// Note theses default config file locatations: +// +// * Linux: `~/.config/coursier/mirror.properties` +// * MacOS: `~/Library/Preferences/Coursier/mirror.properties` +// * Windows: `C:\Users\\AppData\Roaming\Coursier\config\mirror.properties` +// +// You can also set the environment variable `COURSIER_MIRRORS` or the jvm property `coursier.mirrors` to specify config file location. // To add custom resolvers to the initial bootstrap of the build, you can create a