Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add mirror config doc #2917

Merged
merged 2 commits into from
Dec 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 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,30 @@ object foo extends ScalaModule {
}
}

// 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://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\<user_name>\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
// 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 +55,4 @@ object bar extends ScalaModule {

> ./mill bar.compile

*/
*/