Context
Repositories are currently configured per-project only, in module.yaml repositories:. To use a mirror (e.g. for mainland China, where maven.google.com and repo1.maven.org are unreachable) every project must repeat the block:
repositories:
- id: mavenGoogle
url: https://cache-redirector.jetbrains.com/maven.google.com
- id: mavenCentral
url: https://cache-redirector.jetbrains.com/kotlin/repo1.maven.org/maven2
There is no user-level or global default for repositories (no env var, no config file under ~/.config or the toolchain cache dir - verified in the source). Mirror settings therefore drift across projects and must be re-declared on every machine.
What is needed
A user/global default repositories configuration, e.g.:
- a config file (e.g. ~/.config/kotlin-toolchain/repositories.yaml or similar), and/or
- an environment variable listing default repository URLs.
Project-level module.yaml repositories should still override or extend the global defaults (the existing dedup-by-id behavior makes this easy: global defaults first, project entries win).
Expected behavior
Set mirrors once per machine (or in CI env), and every kotlin project resolves through them without repeating the repositories block.
Context
Repositories are currently configured per-project only, in module.yaml repositories:. To use a mirror (e.g. for mainland China, where maven.google.com and repo1.maven.org are unreachable) every project must repeat the block:
repositories:
- id: mavenGoogle
url: https://cache-redirector.jetbrains.com/maven.google.com
- id: mavenCentral
url: https://cache-redirector.jetbrains.com/kotlin/repo1.maven.org/maven2
There is no user-level or global default for repositories (no env var, no config file under ~/.config or the toolchain cache dir - verified in the source). Mirror settings therefore drift across projects and must be re-declared on every machine.
What is needed
A user/global default repositories configuration, e.g.:
Project-level module.yaml repositories should still override or extend the global defaults (the existing dedup-by-id behavior makes this easy: global defaults first, project entries win).
Expected behavior
Set mirrors once per machine (or in CI env), and every kotlin project resolves through them without repeating the repositories block.