Replace Ivy resolver with Maven resolver in all places

This commit is contained in:
Ilya Muradyan
2021-06-29 14:06:14 +03:00
committed by teamcityserver
parent 014765a302
commit 46bbe5b1cb
6 changed files with 35 additions and 202 deletions
@@ -21,8 +21,7 @@ dependencies {
testCompile(kotlinStdlib("jdk8"))
testCompile(project(":kotlin-scripting-ide-services-unshaded"))
testCompile(project(":kotlin-scripting-compiler"))
testCompile(project(":kotlin-scripting-dependencies"))
testCompile(project(":kotlin-main-kts"))
testCompile(project(":kotlin-scripting-dependencies-maven"))
testCompile(project(":compiler:cli"))
testRuntimeOnly(project(":kotlin-compiler"))
@@ -32,8 +31,7 @@ dependencies {
embeddableTestRuntime(project(":kotlin-scripting-ide-services", configuration="runtimeElements"))
embeddableTestRuntime(project(":kotlin-scripting-compiler-impl-embeddable", configuration="runtimeElements"))
embeddableTestRuntime(project(":kotlin-scripting-dependencies", configuration="runtimeElements"))
// For tests with IvyResolver
embeddableTestRuntime(project(":kotlin-main-kts"))
embeddableTestRuntime(project(":kotlin-scripting-dependencies-maven-all"))
embeddableTestRuntime(kotlinStdlib("jdk8"))
embeddableTestRuntime(testSourceSet.output)
}
@@ -6,11 +6,11 @@
package org.jetbrains.kotlin.scripting.ide_services.test_util
import kotlinx.coroutines.runBlocking
import org.jetbrains.kotlin.mainKts.impl.IvyResolver
import java.io.File
import kotlin.script.dependencies.ScriptContents
import kotlin.script.experimental.api.*
import kotlin.script.experimental.dependencies.*
import kotlin.script.experimental.dependencies.maven.MavenDependenciesResolver
import kotlin.script.experimental.jvm.withUpdatedClasspath
// in case of flat or direct resolvers the value should be a direct path or file name of a jar respectively
@@ -22,7 +22,7 @@ annotation class DependsOn(val value: String = "")
open class ScriptDependenciesResolver {
private val resolver = CompoundDependenciesResolver(FileSystemDependenciesResolver(), IvyResolver())
private val resolver = CompoundDependenciesResolver(FileSystemDependenciesResolver(), MavenDependenciesResolver())
private val addedClasspath = mutableListOf<File>()
fun resolveFromAnnotations(script: ScriptContents): ResultWithDiagnostics<List<File>> {