Skip to content

Commit

Permalink
add mirror config doc
Browse files Browse the repository at this point in the history
  • Loading branch information
jilen committed Dec 11, 2023
1 parent ea367c0 commit 60ba61b
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions example/scalamodule/11-repository-config/build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -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
// ```
// Mirror config file located in:
// + Windows: C:\Users\<user_name>\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 `mirror` 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 {
Expand All @@ -37,4 +51,4 @@ object bar extends ScalaModule {
> ./mill bar.compile
*/
*/

0 comments on commit 60ba61b

Please sign in to comment.