From fdf1a3db7fccd3266a65194e5db46827f7882140 Mon Sep 17 00:00:00 2001 From: Anatoly Nikitin Date: Mon, 18 Nov 2019 02:48:25 +0300 Subject: [PATCH] Remove RepositoriesPresetDependenciesResolver --- .../kotlin/org/jetbrains/kotlin/jupyter/resolver.kt | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/main/kotlin/org/jetbrains/kotlin/jupyter/resolver.kt b/src/main/kotlin/org/jetbrains/kotlin/jupyter/resolver.kt index d4591589f..aa32eecd4 100644 --- a/src/main/kotlin/org/jetbrains/kotlin/jupyter/resolver.kt +++ b/src/main/kotlin/org/jetbrains/kotlin/jupyter/resolver.kt @@ -27,24 +27,14 @@ class AliasDependenciesResolver(private val baseResolver: ExternalDependenciesRe artifactsMapping.containsKey(artifactCoordinates) || baseResolver.acceptsArtifact(artifactCoordinates) } -class RepositoriesPresetDependenciesResolver(private val baseResolver: ExternalDependenciesResolver, repositories: Iterable) - : ExternalDependenciesResolver by baseResolver { - - init { - repositories.forEach { - baseResolver.tryAddRepository(it) - } - } -} - open class JupyterScriptDependenciesResolver(val resolverConfig: ResolverConfig?) { private val resolver: ExternalDependenciesResolver init { var r: ExternalDependenciesResolver = CompoundDependenciesResolver(FileSystemDependenciesResolver(), MavenDependenciesResolver()) if (resolverConfig != null) { - if (resolverConfig.repositories.isNotEmpty()) r = RepositoriesPresetDependenciesResolver(r, resolverConfig.repositories) if (resolverConfig.libraries.isNotEmpty()) r = AliasDependenciesResolver(r, resolverConfig.libraries.mapValues { it.value.artifacts }) + resolverConfig.repositories.forEach { r.tryAddRepository(it) } } resolver = r }