Remove or replace deprecated kotlin-runtime artifact usages

This commit is contained in:
Ilya Gorbunov
2018-08-12 04:33:24 +03:00
parent c8becbd335
commit 16148a30c1
13 changed files with 13 additions and 19 deletions
@@ -47,7 +47,7 @@ class CodegenTestsOnAndroidGenerator private constructor(private val pathManager
}
private fun prepareAndroidModule() {
println("Copying kotlin-runtime.jar and kotlin-reflect.jar in android module...")
println("Copying kotlin-stdlib.jar and kotlin-reflect.jar in android module...")
copyKotlinRuntimeJars()
println("Check 'libs' folder in tested android module...")
@@ -60,7 +60,7 @@ class CodegenTestsOnAndroidGenerator private constructor(private val pathManager
private fun copyKotlinRuntimeJars() {
FileUtil.copy(
ForTestCompileRuntime.runtimeJarForTests(),
File(pathManager.libsFolderInAndroidTmpFolder + "/kotlin-runtime.jar")
File(pathManager.libsFolderInAndroidTmpFolder + "/kotlin-stdlib.jar")
)
FileUtil.copy(
ForTestCompileRuntime.reflectJarForTests(),
@@ -3,7 +3,7 @@
<java dir="${temp}" fork="true" classname="org.jetbrains.kotlin.cli.js.K2JSCompiler">
<classpath>
<pathelement location="${kotlin.lib}/kotlin-compiler.jar"/>
<pathelement location="${kotlin.lib}/kotlin-runtime.jar"/>
<pathelement location="${kotlin.lib}/kotlin-stdlib.jar"/>
</classpath>
<arg value="${test.data}/root1/foo.kt"/>
<arg value="-output"/>
@@ -174,7 +174,7 @@ class GenericReplTest : KtUsefulTestCase() {
internal class TestRepl(
templateClasspath: List<File> = listOf(File(KotlinIntegrationTestBase.getCompilerLib(), "kotlin-runtime.jar")),
templateClasspath: List<File> = listOf(File(KotlinIntegrationTestBase.getCompilerLib(), "kotlin-stdlib.jar")),
templateClassName: String = "kotlin.script.templates.standard.ScriptTemplateWithArgs",
repeatingMode: ReplRepeatingMode = ReplRepeatingMode.NONE
) : Closeable {
@@ -42,7 +42,7 @@ class BuiltInsInitializer<out T : KotlinBuiltIns>(
}
catch (e: Throwable) {
initializationFailed = e
throw IllegalStateException("Built-in library initialization failed. " + "Please ensure you have kotlin-runtime.jar in the classpath: " + e, e)
throw IllegalStateException("Built-in library initialization failed. " + "Please ensure you have kotlin-stdlib.jar in the classpath: " + e, e)
}
finally {
initializing = false
@@ -55,7 +55,7 @@ import java.util.concurrent.TimeUnit;
public class ConfigureDialogWithModulesAndVersion extends DialogWrapper {
private static final String VERSIONS_LIST_URL =
"http://search.maven.org/solrsearch/select?q=g:%22org.jetbrains.kotlin%22+AND+a:%22kotlin-runtime%22&core=gav&rows=20&wt=json";
"http://search.maven.org/solrsearch/select?q=g:%22org.jetbrains.kotlin%22+AND+a:%22kotlin-stdlib%22&core=gav&rows=20&wt=json";
@NotNull private final String minimumVersion;
@@ -119,7 +119,8 @@ fun unInvalidateBuiltinsAndStdLib(project: Project, runnable: () -> Unit) {
}
}
private val VirtualFile.isStdLibFile: Boolean get() = presentableUrl.contains("kotlin-runtime.jar")
// looks like the entire uninvalidation is a dead code now
private val VirtualFile.isStdLibFile: Boolean get() = false // presentableUrl.contains("kotlin-runtime.jar")
fun invalidateLibraryCache(project: Project) {
LibraryModificationTracker.getInstance(project).incModificationCount()
@@ -114,8 +114,8 @@ public class ConfigureKotlinTest extends AbstractConfigureKotlinTest {
// Move fake runtime jar to default library path to pretend library is already configured
FileUtil.copy(
new File(getProject().getBasePath() + "/lib/kotlin-runtime.jar"),
new File(Companion.getJAVA_CONFIGURATOR().getDefaultPathToJarFile(getProject()) + "/kotlin-runtime.jar"));
new File(getProject().getBasePath() + "/lib/kotlin-stdlib.jar"),
new File(Companion.getJAVA_CONFIGURATOR().getDefaultPathToJarFile(getProject()) + "/kotlin-stdlib.jar"));
Companion.assertNotConfigured(module, Companion.getJAVA_CONFIGURATOR());
Companion.getJAVA_CONFIGURATOR().configure(myProject, Collections.<Module>emptyList());
@@ -16,7 +16,7 @@ repositories {
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-runtime:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
task exit << {
@@ -1,5 +1,5 @@
apply plugin: 'kotlin'
dependencies {
compile "org.jetbrains.kotlin:kotlin-runtime:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
@@ -16,5 +16,5 @@ repositories {
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-runtime:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
@@ -124,7 +124,6 @@
<artifact>org.jetbrains.kotlin:kotlin-maven-noarg:${project.version}</artifact>
<artifact>org.jetbrains.kotlin:kotlin-maven-sam-with-receiver:${project.version}</artifact>
<artifact>org.jetbrains.kotlin:kotlin-annotation-processing-maven:${project.version}</artifact>
<artifact>org.jetbrains.kotlin:kotlin-runtime:${project.version}</artifact>
<artifact>org.jetbrains.kotlin:kotlin-script-runtime:${project.version}</artifact>
<artifact>org.jetbrains.kotlin:kotlin-stdlib:${project.version}</artifact>
<artifact>org.jetbrains.kotlin:kotlin-stdlib-common:${project.version}</artifact>
@@ -19,11 +19,6 @@
<artifactId>kotlin-reflect</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-runtime</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
@@ -21,7 +21,6 @@ import java.util.jar.Attributes
import java.util.jar.Manifest
val LIBRARIES = listOf(
"kotlin-runtime",
"kotlin-stdlib",
"kotlin-stdlib-common",
"kotlin-stdlib-jre7",