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