mirror of
https://github.com/LamGC/ScalaBot.git
synced 2025-04-30 06:37:29 +00:00
feat: 可以覆盖 Maven 中央仓库配置.
原本设计是无论配置文件中是否带有 Maven 中央仓库, 都会添加 Maven 中央仓库进去, 这样可能会覆盖用户的仓库配置. 新改动将检查配置中是否添加了 Maven 中央仓库配置来决定是否补充 Maven 中央仓库.
This commit is contained in:
parent
1f2ab0f9b1
commit
f11290c73d
@ -122,7 +122,12 @@ internal class Launcher : AutoCloseable {
|
|||||||
val remoteRepositories = Const.config.mavenRepositories
|
val remoteRepositories = Const.config.mavenRepositories
|
||||||
.map(MavenRepositoryConfig::toRemoteRepository)
|
.map(MavenRepositoryConfig::toRemoteRepository)
|
||||||
.toMutableList().apply {
|
.toMutableList().apply {
|
||||||
|
if (this.none {
|
||||||
|
it.url == MavenRepositoryExtensionFinder.MAVEN_CENTRAL_URL
|
||||||
|
|| it.url == MavenRepositoryExtensionFinder.MAVEN_CENTRAL_URL.trimEnd('/')
|
||||||
|
}) {
|
||||||
add(MavenRepositoryExtensionFinder.getMavenCentralRepository(proxy = Const.config.proxy.toAetherProxy()))
|
add(MavenRepositoryExtensionFinder.getMavenCentralRepository(proxy = Const.config.proxy.toAetherProxy()))
|
||||||
|
}
|
||||||
}.toList()
|
}.toList()
|
||||||
val extensionPackageFinders = setOf(
|
val extensionPackageFinders = setOf(
|
||||||
MavenRepositoryExtensionFinder(
|
MavenRepositoryExtensionFinder(
|
||||||
|
Loading…
Reference in New Issue
Block a user