[Test] Extract MockLibraryUtil to :compiler:tests-compiler-utils

Also provide MockLibraryUtilExt with bridges to MockLibraryUtil
  with JUnit4Assertions
This commit is contained in:
Dmitriy Novozhilov
2020-12-22 13:56:06 +03:00
committed by TeamCityServer
parent eadec08937
commit cb7b1652e7
26 changed files with 271 additions and 172 deletions
@@ -28,6 +28,7 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.kotlin.idea.framework.JSLibraryKind;
import org.jetbrains.kotlin.idea.framework.KotlinSdkType;
import org.jetbrains.kotlin.test.MockLibraryUtil;
import org.jetbrains.kotlin.test.MockLibraryUtilExt;
import org.jetbrains.kotlin.utils.PathUtil;
import java.io.File;
@@ -78,7 +79,7 @@ public class SdkAndMockLibraryProjectDescriptor extends KotlinLightProjectDescri
File libraryJar =
isJsLibrary
? MockLibraryUtil.compileJsLibraryToJar(sourcesPath, LIBRARY_NAME, withSources, Collections.emptyList())
: MockLibraryUtil.compileJvmLibraryToJar(sourcesPath, LIBRARY_NAME, withSources, true, extraOptions, classpath);
: MockLibraryUtilExt.compileJvmLibraryToJar(sourcesPath, LIBRARY_NAME, withSources, true, extraOptions, classpath);
String jarUrl = getJarUrl(libraryJar);
Library.ModifiableModel libraryModel =