diff options
author | Nikita Bobko <nikita.bobko@jetbrains.com> | 2020-07-15 15:36:32 +0300 |
---|---|---|
committer | kotlin-ide-monorepo-bot <kotlin-ide-monorepo-bot-no-reply@jetbrains.com> | 2020-07-15 13:30:58 +0000 |
commit | 3e3bc15ae076eeb1eb4df85771b70feaea4073e8 (patch) | |
tree | e5caea7299525d19407a53fb6c87cb5da158c645 /test-framework | |
parent | 3df7f1b8e77b269d624a45b47fa8da39a9243848 (diff) | |
download | intellij-kotlin-3e3bc15ae076eeb1eb4df85771b70feaea4073e8.tar.gz |
KotlinArtifacts: split to test and production artifacts
After discussion with Yan we decided that it's better to have Debug IDE
and Production IDE to be closer to each other. It's more important than
keeping debug IDE and tests be close to each other
GitOrigin-RevId: e6a34544bb1b6edc747fbe39d6f286c95c751465
Diffstat (limited to 'test-framework')
5 files changed, 15 insertions, 15 deletions
diff --git a/test-framework/test/org/jetbrains/kotlin/idea/test/ConfigLibraryUtil.kt b/test-framework/test/org/jetbrains/kotlin/idea/test/ConfigLibraryUtil.kt index 6dbad6a00f22..91430cc91a7f 100644 --- a/test-framework/test/org/jetbrains/kotlin/idea/test/ConfigLibraryUtil.kt +++ b/test-framework/test/org/jetbrains/kotlin/idea/test/ConfigLibraryUtil.kt @@ -56,7 +56,7 @@ object ConfigLibraryUtil { fun configureKotlinJsRuntimeAndSdk(module: Module, sdk: Sdk) { configureSdk(module, sdk) - addLibrary(getKotlinRuntimeLibEditor(LIB_NAME_KOTLIN_STDLIB_JS, KotlinArtifacts.kotlinStdlibJs), module, JSLibraryKind) + addLibrary(getKotlinRuntimeLibEditor(LIB_NAME_KOTLIN_STDLIB_JS, KotlinArtifacts.instance.kotlinStdlibJs), module, JSLibraryKind) } fun configureKotlinCommonRuntime(module: Module) { @@ -64,8 +64,8 @@ object ConfigLibraryUtil { } fun configureKotlinRuntime(module: Module) { - addLibrary(getKotlinRuntimeLibEditor(LIB_NAME_JAVA_RUNTIME, KotlinArtifacts.kotlinStdlib), module) - addLibrary(getKotlinRuntimeLibEditor(LIB_NAME_KOTLIN_TEST, KotlinArtifacts.kotlinTest), module) + addLibrary(getKotlinRuntimeLibEditor(LIB_NAME_JAVA_RUNTIME, KotlinArtifacts.instance.kotlinStdlib), module) + addLibrary(getKotlinRuntimeLibEditor(LIB_NAME_KOTLIN_TEST, KotlinArtifacts.instance.kotlinTest), module) } fun unConfigureKotlinRuntime(module: Module) { diff --git a/test-framework/test/org/jetbrains/kotlin/idea/test/KotlinJdkAndMultiplatformStdlibDescriptor.kt b/test-framework/test/org/jetbrains/kotlin/idea/test/KotlinJdkAndMultiplatformStdlibDescriptor.kt index 171fa3e641b5..75a581c0a815 100644 --- a/test-framework/test/org/jetbrains/kotlin/idea/test/KotlinJdkAndMultiplatformStdlibDescriptor.kt +++ b/test-framework/test/org/jetbrains/kotlin/idea/test/KotlinJdkAndMultiplatformStdlibDescriptor.kt @@ -30,8 +30,8 @@ class KotlinJdkAndMultiplatformStdlibDescriptor private constructor(private val model.addLib( STDLIB_LIB_NAME, withSources, - KotlinArtifacts.kotlinStdlib, - KotlinArtifacts.kotlinStdlibSources + KotlinArtifacts.instance.kotlinStdlib, + KotlinArtifacts.instance.kotlinStdlibSources ) } diff --git a/test-framework/test/org/jetbrains/kotlin/idea/test/KotlinWithJdkAndRuntimeLightProjectDescriptor.java b/test-framework/test/org/jetbrains/kotlin/idea/test/KotlinWithJdkAndRuntimeLightProjectDescriptor.java index 6466d9f017ac..f769fb3fc1b9 100644 --- a/test-framework/test/org/jetbrains/kotlin/idea/test/KotlinWithJdkAndRuntimeLightProjectDescriptor.java +++ b/test-framework/test/org/jetbrains/kotlin/idea/test/KotlinWithJdkAndRuntimeLightProjectDescriptor.java @@ -31,7 +31,7 @@ import java.util.List; public class KotlinWithJdkAndRuntimeLightProjectDescriptor extends KotlinJdkAndLibraryProjectDescriptor { protected KotlinWithJdkAndRuntimeLightProjectDescriptor() { - super(KotlinArtifacts.INSTANCE.getKotlinStdlib()); + super(KotlinArtifacts.getInstance().getKotlinStdlib()); } public KotlinWithJdkAndRuntimeLightProjectDescriptor(@NotNull List<? extends File> libraryFiles) { @@ -40,7 +40,7 @@ public class KotlinWithJdkAndRuntimeLightProjectDescriptor extends KotlinJdkAndL @NotNull public static final KotlinWithJdkAndRuntimeLightProjectDescriptor INSTANCE = new KotlinWithJdkAndRuntimeLightProjectDescriptor( - Arrays.asList(KotlinArtifacts.INSTANCE.getKotlinStdlib(), KotlinArtifacts.INSTANCE.getKotlinCoroutinesExperimentalCompat()) + Arrays.asList(KotlinArtifacts.getInstance().getKotlinStdlib(), KotlinArtifacts.getInstance().getKotlinCoroutinesExperimentalCompat()) ); public static KotlinWithJdkAndRuntimeLightProjectDescriptor getInstance(LanguageLevel level) { @@ -57,20 +57,20 @@ public class KotlinWithJdkAndRuntimeLightProjectDescriptor extends KotlinJdkAndL @NotNull public static final KotlinWithJdkAndRuntimeLightProjectDescriptor INSTANCE_WITH_KOTLIN_TEST = new KotlinWithJdkAndRuntimeLightProjectDescriptor( - Arrays.asList(KotlinArtifacts.INSTANCE.getKotlinStdlib(), - KotlinArtifacts.INSTANCE.getKotlinTest()) + Arrays.asList(KotlinArtifacts.getInstance().getKotlinStdlib(), + KotlinArtifacts.getInstance().getKotlinTest()) ); @NotNull public static final KotlinWithJdkAndRuntimeLightProjectDescriptor INSTANCE_WITH_SCRIPT_RUNTIME = new KotlinWithJdkAndRuntimeLightProjectDescriptor( - Arrays.asList(KotlinArtifacts.INSTANCE.getKotlinStdlib(), - KotlinArtifacts.INSTANCE.getKotlinScriptRuntime()) + Arrays.asList(KotlinArtifacts.getInstance().getKotlinStdlib(), + KotlinArtifacts.getInstance().getKotlinScriptRuntime()) ); @NotNull public static final KotlinWithJdkAndRuntimeLightProjectDescriptor INSTANCE_WITH_REFLECT = new KotlinWithJdkAndRuntimeLightProjectDescriptor( - Arrays.asList(KotlinArtifacts.INSTANCE.getKotlinStdlib(), - KotlinArtifacts.INSTANCE.getKotlinReflect()) + Arrays.asList(KotlinArtifacts.getInstance().getKotlinStdlib(), + KotlinArtifacts.getInstance().getKotlinReflect()) ); @NotNull diff --git a/test-framework/test/org/jetbrains/kotlin/idea/test/ProjectDescriptorWithStdlibSources.java b/test-framework/test/org/jetbrains/kotlin/idea/test/ProjectDescriptorWithStdlibSources.java index 8950528235e7..ca215db07d0f 100644 --- a/test-framework/test/org/jetbrains/kotlin/idea/test/ProjectDescriptorWithStdlibSources.java +++ b/test-framework/test/org/jetbrains/kotlin/idea/test/ProjectDescriptorWithStdlibSources.java @@ -35,7 +35,7 @@ public class ProjectDescriptorWithStdlibSources extends KotlinWithJdkAndRuntimeL Library library = model.getModuleLibraryTable().getLibraryByName(Companion.getLIBRARY_NAME()); assert library != null; Library.ModifiableModel modifiableModel = library.getModifiableModel(); - modifiableModel.addRoot(VfsUtil.getUrlForLibraryRoot(KotlinArtifacts.INSTANCE.getKotlinStdlibSources()), OrderRootType.SOURCES); + modifiableModel.addRoot(VfsUtil.getUrlForLibraryRoot(KotlinArtifacts.getInstance().getKotlinStdlibSources()), OrderRootType.SOURCES); modifiableModel.commit(); } } diff --git a/test-framework/test/org/jetbrains/kotlin/idea/test/SdkAndMockLibraryProjectDescriptor.java b/test-framework/test/org/jetbrains/kotlin/idea/test/SdkAndMockLibraryProjectDescriptor.java index b3bcc93d4605..70504ecb38bb 100644 --- a/test-framework/test/org/jetbrains/kotlin/idea/test/SdkAndMockLibraryProjectDescriptor.java +++ b/test-framework/test/org/jetbrains/kotlin/idea/test/SdkAndMockLibraryProjectDescriptor.java @@ -89,7 +89,7 @@ public class SdkAndMockLibraryProjectDescriptor extends KotlinLightProjectDescri mockLibraryModel.addRoot(jarUrl, OrderRootType.CLASSES); if (withRuntime && !isJsLibrary) { - mockLibraryModel.addRoot(getJarUrl(KotlinArtifacts.INSTANCE.getKotlinStdlib()), OrderRootType.CLASSES); + mockLibraryModel.addRoot(getJarUrl(KotlinArtifacts.getInstance().getKotlinStdlib()), OrderRootType.CLASSES); } if (isJsLibrary && mockLibraryModel instanceof LibraryEx.ModifiableModelEx) { |