diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/K2JVMCompiler.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/K2JVMCompiler.kt index ffa3e1775d3..415b0ef82cb 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/K2JVMCompiler.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/K2JVMCompiler.kt @@ -62,7 +62,7 @@ class K2JVMCompiler : CLICompiler() { val paths = if (arguments.kotlinHome != null) KotlinPathsFromHomeDir(File(arguments.kotlinHome)) else - PathUtil.getKotlinPathsForCompiler() + PathUtil.kotlinPathsForCompiler messageCollector.report(LOGGING, "Using Kotlin home directory ${paths.homePath}") PerformanceCounter.setTimeCounterEnabled(arguments.reportPerf) diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinCoreEnvironment.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinCoreEnvironment.kt index 0f410194262..d0b476abf08 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinCoreEnvironment.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinCoreEnvironment.kt @@ -477,7 +477,7 @@ class KotlinCoreEnvironment private constructor( var pluginRoot = configuration.get(CLIConfigurationKeys.INTELLIJ_PLUGIN_ROOT)?.let(::File) ?: configuration.get(CLIConfigurationKeys.COMPILER_JAR_LOCATOR)?.compilerJar - ?: PathUtil.getPathUtilJar() + ?: PathUtil.pathUtilJar val app = ApplicationManager.getApplication() val parentFile = pluginRoot.parentFile diff --git a/compiler/daemon/src/org/jetbrains/kotlin/daemon/KotlinRemoteReplService.kt b/compiler/daemon/src/org/jetbrains/kotlin/daemon/KotlinRemoteReplService.kt index e7a8c827a72..00e6bda7f99 100644 --- a/compiler/daemon/src/org/jetbrains/kotlin/daemon/KotlinRemoteReplService.kt +++ b/compiler/daemon/src/org/jetbrains/kotlin/daemon/KotlinRemoteReplService.kt @@ -51,7 +51,7 @@ open class KotlinJvmReplService( protected val configuration = CompilerConfiguration().apply { addJvmClasspathRoots(PathUtil.getJdkClassesRootsFromCurrentJre()) - addJvmClasspathRoots(PathUtil.getKotlinPathsForCompiler().let { listOf(it.stdlibPath, it.reflectPath, it.scriptRuntimePath) }) + addJvmClasspathRoots(PathUtil.kotlinPathsForCompiler.let { listOf(it.stdlibPath, it.reflectPath, it.scriptRuntimePath) }) addJvmClasspathRoots(templateClasspath) put(CommonConfigurationKeys.MODULE_NAME, "kotlin-script") languageVersionSettings = LanguageVersionSettingsImpl( diff --git a/compiler/tests-common/org/jetbrains/kotlin/test/MockLibraryUtil.kt b/compiler/tests-common/org/jetbrains/kotlin/test/MockLibraryUtil.kt index 307abeed096..faf1cb36fda 100644 --- a/compiler/tests-common/org/jetbrains/kotlin/test/MockLibraryUtil.kt +++ b/compiler/tests-common/org/jetbrains/kotlin/test/MockLibraryUtil.kt @@ -214,7 +214,7 @@ object MockLibraryUtil { @Synchronized private fun createCompilerClassLoader(): ClassLoader { return ClassPreloadingUtils.preloadClasses( - listOf(PathUtil.getKotlinPathsForDistDirectory().compilerPath), + listOf(PathUtil.kotlinPathsForDistDirectory.compilerPath), Preloader.DEFAULT_CLASS_NUMBER_ESTIMATE, null, null ) } diff --git a/compiler/tests/org/jetbrains/kotlin/cli/LauncherScriptTest.kt b/compiler/tests/org/jetbrains/kotlin/cli/LauncherScriptTest.kt index 5bde2c33e5a..a9acea66644 100644 --- a/compiler/tests/org/jetbrains/kotlin/cli/LauncherScriptTest.kt +++ b/compiler/tests/org/jetbrains/kotlin/cli/LauncherScriptTest.kt @@ -20,7 +20,6 @@ import com.intellij.execution.configurations.GeneralCommandLine import com.intellij.execution.util.ExecUtil import com.intellij.openapi.util.SystemInfo import com.intellij.openapi.util.text.StringUtil -import org.jetbrains.kotlin.cli.common.ExitCode import org.jetbrains.kotlin.test.KotlinTestUtils import org.jetbrains.kotlin.test.TestCaseWithTmpdir import org.jetbrains.kotlin.utils.PathUtil @@ -36,7 +35,7 @@ class LauncherScriptTest : TestCaseWithTmpdir() { workDirectory: File? = null ) { val executableFileName = if (SystemInfo.isWindows) "$executableName.bat" else executableName - val launcherFile = File(PathUtil.getKotlinPathsForDistDirectory().homePath, "bin/$executableFileName") + val launcherFile = File(PathUtil.kotlinPathsForDistDirectory.homePath, "bin/$executableFileName") assertTrue("Launcher script not found, run 'ant dist': ${launcherFile.absolutePath}", launcherFile.exists()) val cmd = GeneralCommandLine(launcherFile.absolutePath, *args) diff --git a/compiler/tests/org/jetbrains/kotlin/scripts/ScriptTemplateTest.kt b/compiler/tests/org/jetbrains/kotlin/scripts/ScriptTemplateTest.kt index ef8c6a5cf2e..936bb82c2c5 100644 --- a/compiler/tests/org/jetbrains/kotlin/scripts/ScriptTemplateTest.kt +++ b/compiler/tests/org/jetbrains/kotlin/scripts/ScriptTemplateTest.kt @@ -398,7 +398,7 @@ private fun classpathFromClassloader(): List = open class TestKotlinScriptDependenciesResolver : TestKotlinScriptDummyDependenciesResolver() { - private val kotlinPaths by lazy { PathUtil.getKotlinPathsForCompiler() } + private val kotlinPaths by lazy { PathUtil.kotlinPathsForCompiler } @AcceptedAnnotations(DependsOn::class, DependsOnTwo::class) override fun resolve(scriptContents: ScriptContents, diff --git a/compiler/util/src/org/jetbrains/kotlin/utils/PathUtil.kt b/compiler/util/src/org/jetbrains/kotlin/utils/PathUtil.kt index 2d9b0c60780..1de36544a15 100644 --- a/compiler/util/src/org/jetbrains/kotlin/utils/PathUtil.kt +++ b/compiler/util/src/org/jetbrains/kotlin/utils/PathUtil.kt @@ -14,163 +14,144 @@ * limitations under the License. */ -package org.jetbrains.kotlin.utils; +package org.jetbrains.kotlin.utils -import com.intellij.openapi.application.ApplicationManager; -import com.intellij.openapi.application.PathManager; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.jps.model.java.impl.JavaSdkUtil; +import com.intellij.openapi.application.ApplicationManager +import com.intellij.openapi.application.PathManager +import org.jetbrains.jps.model.java.impl.JavaSdkUtil -import java.io.File; -import java.util.List; -import java.util.regex.Pattern; +import java.io.File +import java.util.regex.Pattern -public class PathUtil { +object PathUtil { + const val JPS_KOTLIN_HOME_PROPERTY = "jps.kotlin.home" - public static final String JPS_KOTLIN_HOME_PROPERTY = "jps.kotlin.home"; + const val JS_LIB_JAR_NAME = "kotlin-stdlib-js.jar" + const val JS_LIB_10_JAR_NAME = "kotlin-jslib.jar" + const val ALLOPEN_PLUGIN_JAR_NAME = "allopen-compiler-plugin.jar" + const val NOARG_PLUGIN_JAR_NAME = "noarg-compiler-plugin.jar" + const val SAM_WITH_RECEIVER_PLUGIN_JAR_NAME = "sam-with-receiver-compiler-plugin.jar" + const val JS_LIB_SRC_JAR_NAME = "kotlin-stdlib-js-sources.jar" + const val KOTLIN_JAVA_RUNTIME_JAR = "kotlin-runtime.jar" + const val KOTLIN_JAVA_RUNTIME_JRE7_JAR = "kotlin-stdlib-jre7.jar" + const val KOTLIN_JAVA_RUNTIME_JRE8_JAR = "kotlin-stdlib-jre8.jar" + const val KOTLIN_JAVA_RUNTIME_JRE7_SRC_JAR = "kotlin-stdlib-jre7-sources.jar" + const val KOTLIN_JAVA_RUNTIME_JRE8_SRC_JAR = "kotlin-stdlib-jre8-sources.jar" + const val KOTLIN_JAVA_STDLIB_JAR = "kotlin-stdlib.jar" + const val KOTLIN_JAVA_REFLECT_JAR = "kotlin-reflect.jar" + const val KOTLIN_JAVA_SCRIPT_RUNTIME_JAR = "kotlin-script-runtime.jar" + const val KOTLIN_TEST_JAR = "kotlin-test.jar" + const val KOTLIN_TEST_JS_JAR = "kotlin-test-js.jar" + const val KOTLIN_JAVA_STDLIB_SRC_JAR = "kotlin-stdlib-sources.jar" + const val KOTLIN_JAVA_STDLIB_SRC_JAR_OLD = "kotlin-runtime-sources.jar" + const val KOTLIN_REFLECT_SRC_JAR = "kotlin-reflect-sources.jar" + const val KOTLIN_TEST_SRC_JAR = "kotlin-test-sources.jar" + const val KOTLIN_COMPILER_JAR = "kotlin-compiler.jar" - public static final String JS_LIB_JAR_NAME = "kotlin-stdlib-js.jar"; - public static final String JS_LIB_10_JAR_NAME = "kotlin-jslib.jar"; - public static final String ALLOPEN_PLUGIN_JAR_NAME = "allopen-compiler-plugin.jar"; - public static final String NOARG_PLUGIN_JAR_NAME = "noarg-compiler-plugin.jar"; - public static final String SAM_WITH_RECEIVER_PLUGIN_JAR_NAME = "sam-with-receiver-compiler-plugin.jar"; - public static final String JS_LIB_SRC_JAR_NAME = "kotlin-stdlib-js-sources.jar"; - public static final String KOTLIN_JAVA_RUNTIME_JAR = "kotlin-runtime.jar"; - public static final String KOTLIN_JAVA_RUNTIME_JRE7_JAR = "kotlin-stdlib-jre7.jar"; - public static final String KOTLIN_JAVA_RUNTIME_JRE8_JAR = "kotlin-stdlib-jre8.jar"; - public static final String KOTLIN_JAVA_RUNTIME_JRE7_SRC_JAR = "kotlin-stdlib-jre7-sources.jar"; - public static final String KOTLIN_JAVA_RUNTIME_JRE8_SRC_JAR = "kotlin-stdlib-jre8-sources.jar"; - public static final String KOTLIN_JAVA_STDLIB_JAR = "kotlin-stdlib.jar"; - public static final String KOTLIN_JAVA_REFLECT_JAR = "kotlin-reflect.jar"; - public static final String KOTLIN_JAVA_SCRIPT_RUNTIME_JAR = "kotlin-script-runtime.jar"; - public static final String KOTLIN_TEST_JAR = "kotlin-test.jar"; - public static final String KOTLIN_TEST_JS_JAR = "kotlin-test-js.jar"; - public static final String KOTLIN_JAVA_STDLIB_SRC_JAR = "kotlin-stdlib-sources.jar"; - public static final String KOTLIN_JAVA_STDLIB_SRC_JAR_OLD = "kotlin-runtime-sources.jar"; - public static final String KOTLIN_REFLECT_SRC_JAR = "kotlin-reflect-sources.jar"; - public static final String KOTLIN_TEST_SRC_JAR = "kotlin-test-sources.jar"; - public static final String KOTLIN_COMPILER_JAR = "kotlin-compiler.jar"; + @JvmField + val KOTLIN_RUNTIME_JAR_PATTERN: Pattern = Pattern.compile("kotlin-(stdlib|runtime)(-\\d[\\d.]+(-.+)?)?\\.jar") + val KOTLIN_STDLIB_JS_JAR_PATTERN: Pattern = Pattern.compile("kotlin-stdlib-js.*\\.jar") + val KOTLIN_JS_LIBRARY_JAR_PATTERN: Pattern = Pattern.compile("kotlin-js-library.*\\.jar") - public static final Pattern KOTLIN_RUNTIME_JAR_PATTERN = Pattern.compile("kotlin-(stdlib|runtime)(-\\d[\\d.]+(-.+)?)?\\.jar"); - public static final Pattern KOTLIN_STDLIB_JS_JAR_PATTERN = Pattern.compile("kotlin-stdlib-js.*\\.jar"); - public static final Pattern KOTLIN_JS_LIBRARY_JAR_PATTERN = Pattern.compile("kotlin-js-library.*\\.jar"); + private const val HOME_FOLDER_NAME = "kotlinc" + private val NO_PATH = File("") - public static final String HOME_FOLDER_NAME = "kotlinc"; - private static final File NO_PATH = new File(""); + @JvmStatic + val kotlinPathsForIdeaPlugin: KotlinPaths + get() = if (ApplicationManager.getApplication().isUnitTestMode) + kotlinPathsForDistDirectory + else + KotlinPathsFromHomeDir(compilerPathForIdeaPlugin) - private PathUtil() {} - - @NotNull - public static KotlinPaths getKotlinPathsForIdeaPlugin() { - return ApplicationManager.getApplication().isUnitTestMode() - ? getKotlinPathsForDistDirectory() - : new KotlinPathsFromHomeDir(getCompilerPathForIdeaPlugin()); - } - - @NotNull - public static KotlinPaths getKotlinPathsForJpsPlugin() { - // When JPS is run on TeamCity, it can not rely on Kotlin plugin layout, - // so the path to Kotlin is specified in a system property - String jpsKotlinHome = System.getProperty(JPS_KOTLIN_HOME_PROPERTY); - if (jpsKotlinHome != null) { - return new KotlinPathsFromHomeDir(new File(jpsKotlinHome)); + // When JPS is run on TeamCity, it can not rely on Kotlin plugin layout, + // so the path to Kotlin is specified in a system property + private val kotlinPathsForJpsPlugin: KotlinPaths + get() { + val jpsKotlinHome = System.getProperty(JPS_KOTLIN_HOME_PROPERTY) + return if (jpsKotlinHome != null) { + KotlinPathsFromHomeDir(File(jpsKotlinHome)) + } + else KotlinPathsFromHomeDir(compilerPathForJpsPlugin) } - return new KotlinPathsFromHomeDir(getCompilerPathForJpsPlugin()); - } - @NotNull - public static KotlinPaths getKotlinPathsForJpsPluginOrJpsTests() { - if ("true".equalsIgnoreCase(System.getProperty("kotlin.jps.tests"))) { - return getKotlinPathsForDistDirectory(); + val kotlinPathsForJpsPluginOrJpsTests: KotlinPaths + get() = if ("true".equals(System.getProperty("kotlin.jps.tests"), ignoreCase = true)) { + kotlinPathsForDistDirectory } - return getKotlinPathsForJpsPlugin(); - } + else kotlinPathsForJpsPlugin - @NotNull - public static KotlinPaths getKotlinPathsForCompiler() { - if (!getPathUtilJar().isFile()) { + @JvmStatic + val kotlinPathsForCompiler: KotlinPaths + get() = if (!pathUtilJar.isFile) { // Not running from a jar, i.e. it is it must be a unit test - return getKotlinPathsForDistDirectory(); + kotlinPathsForDistDirectory } - return new KotlinPathsFromHomeDir(getCompilerPathForCompilerJar()); - } + else KotlinPathsFromHomeDir(compilerPathForCompilerJar) - @NotNull - public static KotlinPaths getKotlinPathsForDistDirectory() { - return new KotlinPathsFromHomeDir(new File("dist", HOME_FOLDER_NAME)); - } + @JvmStatic + val kotlinPathsForDistDirectory: KotlinPaths + get() = KotlinPathsFromHomeDir(File("dist", HOME_FOLDER_NAME)) - @NotNull - private static File getCompilerPathForCompilerJar() { - File jar = getPathUtilJar(); + private val compilerPathForCompilerJar: File + get() { + val jar = pathUtilJar + if (!jar.exists()) return NO_PATH - if (!jar.exists()) return NO_PATH; + if (jar.name == KOTLIN_COMPILER_JAR) { + val lib = jar.parentFile + return lib.parentFile + } - if (jar.getName().equals(KOTLIN_COMPILER_JAR)) { - File lib = jar.getParentFile(); - return lib.getParentFile(); + return NO_PATH } - return NO_PATH; - } + private val compilerPathForJpsPlugin: File + get() { + val jar = pathUtilJar + if (!jar.exists()) return NO_PATH - @NotNull - private static File getCompilerPathForJpsPlugin() { - File jar = getPathUtilJar(); + if (jar.name == "kotlin-jps-plugin.jar") { + val pluginHome = jar.parentFile.parentFile.parentFile + return File(pluginHome, HOME_FOLDER_NAME) + } - if (!jar.exists()) return NO_PATH; - - if (jar.getName().equals("kotlin-jps-plugin.jar")) { - File pluginHome = jar.getParentFile().getParentFile().getParentFile(); - return new File(pluginHome, HOME_FOLDER_NAME); + return NO_PATH } - return NO_PATH; - } + private val compilerPathForIdeaPlugin: File + get() { + val jar = pathUtilJar + if (!jar.exists()) return NO_PATH - @NotNull - private static File getCompilerPathForIdeaPlugin() { - File jar = getPathUtilJar(); + if (jar.name == "kotlin-plugin.jar") { + val lib = jar.parentFile + val pluginHome = lib.parentFile - if (!jar.exists()) return NO_PATH; + return File(pluginHome, HOME_FOLDER_NAME) + } - if (jar.getName().equals("kotlin-plugin.jar")) { - File lib = jar.getParentFile(); - File pluginHome = lib.getParentFile(); - - return new File(pluginHome, HOME_FOLDER_NAME); + return NO_PATH } - return NO_PATH; + val pathUtilJar: File + get() = getResourcePathForClass(PathUtil::class.java) + + @JvmStatic + fun getResourcePathForClass(aClass: Class<*>): File { + val path = "/" + aClass.name.replace('.', '/') + ".class" + val resourceRoot = PathManager.getResourceRoot(aClass, path) ?: throw IllegalStateException("Resource not found: $path") + return File(resourceRoot).absoluteFile } - @NotNull - public static File getPathUtilJar() { - return getResourcePathForClass(PathUtil.class); - } + @JvmStatic + fun getJdkClassesRootsFromCurrentJre(): List = + getJdkClassesRootsFromJre(System.getProperty("java.home")) - @NotNull - public static File getResourcePathForClass(@NotNull Class aClass) { - String path = "/" + aClass.getName().replace('.', '/') + ".class"; - String resourceRoot = PathManager.getResourceRoot(aClass, path); - if (resourceRoot == null) { - throw new IllegalStateException("Resource not found: " + path); - } - return new File(resourceRoot).getAbsoluteFile(); - } + @JvmStatic + fun getJdkClassesRootsFromJre(javaHome: String): List = + JavaSdkUtil.getJdkClassesRoots(File(javaHome), true) - @NotNull - public static List getJdkClassesRootsFromCurrentJre() { - return getJdkClassesRootsFromJre(System.getProperty("java.home")); - } - - @NotNull - public static List getJdkClassesRootsFromJre(@NotNull String javaHome) { - return JavaSdkUtil.getJdkClassesRoots(new File(javaHome), true); - } - - @NotNull - public static List getJdkClassesRoots(@NotNull File jdkHome) { - return JavaSdkUtil.getJdkClassesRoots(jdkHome, false); - } + @JvmStatic + fun getJdkClassesRoots(jdkHome: File): List = + JavaSdkUtil.getJdkClassesRoots(jdkHome, false) } diff --git a/idea/idea-repl/src/org/jetbrains/kotlin/console/KotlinConsoleKeeper.kt b/idea/idea-repl/src/org/jetbrains/kotlin/console/KotlinConsoleKeeper.kt index 35cade089f6..fa61393051d 100644 --- a/idea/idea-repl/src/org/jetbrains/kotlin/console/KotlinConsoleKeeper.kt +++ b/idea/idea-repl/src/org/jetbrains/kotlin/console/KotlinConsoleKeeper.kt @@ -24,7 +24,6 @@ import com.intellij.openapi.components.ServiceManager import com.intellij.openapi.module.Module import com.intellij.openapi.project.Project import com.intellij.openapi.projectRoots.JavaSdkType -import com.intellij.openapi.projectRoots.JdkUtil import com.intellij.openapi.projectRoots.SimpleJavaSdkType import com.intellij.openapi.roots.ModuleRootManager import com.intellij.openapi.roots.OrderEnumerator @@ -68,7 +67,7 @@ class KotlinConsoleKeeper(val project: Project) { // use to debug repl process //paramList.add("-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005") - val kotlinPaths = PathUtil.getKotlinPathsForIdeaPlugin() + val kotlinPaths = PathUtil.kotlinPathsForIdeaPlugin val replClassPath = listOf(kotlinPaths.compilerPath, kotlinPaths.reflectPath, kotlinPaths.stdlibPath, kotlinPaths.scriptRuntimePath) .joinToString(File.pathSeparator) { it.absolutePath } @@ -112,4 +111,4 @@ class KotlinConsoleKeeper(val project: Project) { companion object { @JvmStatic fun getInstance(project: Project) = ServiceManager.getService(project, KotlinConsoleKeeper::class.java) } -} \ No newline at end of file +} diff --git a/idea/idea-repl/src/org/jetbrains/kotlin/jsr223/KotlinJsr223JvmScriptEngine4Idea.kt b/idea/idea-repl/src/org/jetbrains/kotlin/jsr223/KotlinJsr223JvmScriptEngine4Idea.kt index a84ca68a65f..61d8f3129d6 100644 --- a/idea/idea-repl/src/org/jetbrains/kotlin/jsr223/KotlinJsr223JvmScriptEngine4Idea.kt +++ b/idea/idea-repl/src/org/jetbrains/kotlin/jsr223/KotlinJsr223JvmScriptEngine4Idea.kt @@ -44,7 +44,7 @@ class KotlinJsr223JvmScriptEngine4Idea( ) : KotlinJsr223JvmScriptEngineBase(factory) { private val daemon by lazy { - val path = PathUtil.getKotlinPathsForIdeaPlugin().compilerPath + val path = PathUtil.kotlinPathsForIdeaPlugin.compilerPath assert(path.exists()) val compilerId = CompilerId.makeCompilerId(path) val daemonOptions = configureDaemonOptions() diff --git a/idea/idea-repl/src/org/jetbrains/kotlin/jsr223/KotlinJsr223StandardScriptEngineFactory4Idea.kt b/idea/idea-repl/src/org/jetbrains/kotlin/jsr223/KotlinJsr223StandardScriptEngineFactory4Idea.kt index 899734fa6c5..4ce2ab0ff8c 100644 --- a/idea/idea-repl/src/org/jetbrains/kotlin/jsr223/KotlinJsr223StandardScriptEngineFactory4Idea.kt +++ b/idea/idea-repl/src/org/jetbrains/kotlin/jsr223/KotlinJsr223StandardScriptEngineFactory4Idea.kt @@ -58,7 +58,7 @@ fun classpathFromClassloader(classLoader: ClassLoader): List? = private val kotlinCompilerJar: File by lazy { // highest prio - explicit property System.getProperty("kotlin.compiler.jar")?.let(::File)?.takeIf(File::exists) - ?: PathUtil.getKotlinPathsForIdeaPlugin().compilerPath + ?: PathUtil.kotlinPathsForIdeaPlugin.compilerPath ?: throw FileNotFoundException("Cannot find kotlin compiler jar, set kotlin.compiler.jar property to proper location") } @@ -83,4 +83,4 @@ private val kotlinScriptRuntimeJar: File? by lazy { ?: File(kotlinCompilerJar.parentFile, KOTLIN_JAVA_SCRIPT_RUNTIME_JAR).takeIf(File::exists) } -private val kotlinScriptStandardJars by lazy { listOf(kotlinStdlibJar, kotlinScriptRuntimeJar) } \ No newline at end of file +private val kotlinScriptStandardJars by lazy { listOf(kotlinStdlibJar, kotlinScriptRuntimeJar) } diff --git a/idea/idea-test-framework/src/org/jetbrains/kotlin/idea/test/ConfigLibraryUtil.kt b/idea/idea-test-framework/src/org/jetbrains/kotlin/idea/test/ConfigLibraryUtil.kt index 5cdc9460430..d3e326e0f07 100644 --- a/idea/idea-test-framework/src/org/jetbrains/kotlin/idea/test/ConfigLibraryUtil.kt +++ b/idea/idea-test-framework/src/org/jetbrains/kotlin/idea/test/ConfigLibraryUtil.kt @@ -59,15 +59,13 @@ object ConfigLibraryUtil { fun configureKotlinJsRuntimeAndSdk(module: Module, sdk: Sdk) { configureSdk(module, sdk) addLibrary(getKotlinRuntimeLibEditor(DEFAULT_KOTLIN_JS_STDLIB_NAME, - PathUtil.getKotlinPathsForDistDirectory().jsStdLibJarPath), module, + PathUtil.kotlinPathsForDistDirectory.jsStdLibJarPath), module, JSLibraryKind) } fun configureKotlinRuntime(module: Module) { - addLibrary(getKotlinRuntimeLibEditor(DEFAULT_JAVA_RUNTIME_LIB_NAME, PathUtil.getKotlinPathsForDistDirectory().stdlibPath), - module) - addLibrary(getKotlinRuntimeLibEditor(DEFAULT_KOTLIN_TEST_LIB_NAME, PathUtil.getKotlinPathsForDistDirectory().kotlinTestPath), - module) + addLibrary(getKotlinRuntimeLibEditor(DEFAULT_JAVA_RUNTIME_LIB_NAME, PathUtil.kotlinPathsForDistDirectory.stdlibPath), module) + addLibrary(getKotlinRuntimeLibEditor(DEFAULT_KOTLIN_TEST_LIB_NAME, PathUtil.kotlinPathsForDistDirectory.kotlinTestPath), module) } fun unConfigureKotlinRuntime(module: Module) { diff --git a/idea/src/org/jetbrains/kotlin/idea/run/script/standalone/KotlinStandaloneScriptRunConfiguration.kt b/idea/src/org/jetbrains/kotlin/idea/run/script/standalone/KotlinStandaloneScriptRunConfiguration.kt index 463727528b1..f4e68994226 100644 --- a/idea/src/org/jetbrains/kotlin/idea/run/script/standalone/KotlinStandaloneScriptRunConfiguration.kt +++ b/idea/src/org/jetbrains/kotlin/idea/run/script/standalone/KotlinStandaloneScriptRunConfiguration.kt @@ -191,7 +191,7 @@ private class ScriptCommandLineState( val scriptVFile = LocalFileSystem.getInstance().findFileByIoFile(File(filePath)) ?: throw CantRunException("Script file was not found in project") - params.classPath.add(PathUtil.getKotlinPathsForIdeaPlugin().compilerPath) + params.classPath.add(PathUtil.kotlinPathsForIdeaPlugin.compilerPath) val scriptClasspath = ScriptDependenciesManager.getInstance(environment.project).getScriptClasspath(scriptVFile) scriptClasspath.forEach { diff --git a/idea/src/org/jetbrains/kotlin/idea/script/StandardKotlinScriptTemplateProvider.kt b/idea/src/org/jetbrains/kotlin/idea/script/StandardKotlinScriptTemplateProvider.kt index cb88e8cb613..12c3fe6dfd6 100644 --- a/idea/src/org/jetbrains/kotlin/idea/script/StandardKotlinScriptTemplateProvider.kt +++ b/idea/src/org/jetbrains/kotlin/idea/script/StandardKotlinScriptTemplateProvider.kt @@ -60,7 +60,7 @@ class BundledKotlinScriptDependenciesResolver : DependenciesResolver { val javaHome = environment.get("sdk") as String? val dependencies = ScriptDependencies( javaHome = javaHome?.let(::File), - classpath = with(PathUtil.getKotlinPathsForIdeaPlugin()) { + classpath = with(PathUtil.kotlinPathsForIdeaPlugin) { listOf( reflectPath, stdlibPath, diff --git a/idea/src/org/jetbrains/kotlin/idea/versions/KotlinRuntimeLibraryUtil.kt b/idea/src/org/jetbrains/kotlin/idea/versions/KotlinRuntimeLibraryUtil.kt index ae605dc3ce0..5395b945d05 100644 --- a/idea/src/org/jetbrains/kotlin/idea/versions/KotlinRuntimeLibraryUtil.kt +++ b/idea/src/org/jetbrains/kotlin/idea/versions/KotlinRuntimeLibraryUtil.kt @@ -198,7 +198,7 @@ enum class LibraryJarDescriptor(val jarName: String, return LibraryUtils.getJarFile(Arrays.asList(*library.getFiles(orderRootType)), jarName) } - fun getPathInPlugin() = getPath(PathUtil.getKotlinPathsForIdeaPlugin()) + fun getPathInPlugin() = getPath(PathUtil.kotlinPathsForIdeaPlugin) } fun bundledRuntimeVersion(): String { @@ -206,7 +206,7 @@ fun bundledRuntimeVersion(): String { } private val bundledRuntimeBuildNumber: String? by lazy { - val file = PathUtil.getKotlinPathsForIdeaPlugin().buildNumberFile + val file = PathUtil.kotlinPathsForIdeaPlugin.buildNumberFile if (file.exists()) file.readText().trim() else null } diff --git a/idea/tests/org/jetbrains/kotlin/idea/configuration/AbstractConfigureKotlinTest.kt b/idea/tests/org/jetbrains/kotlin/idea/configuration/AbstractConfigureKotlinTest.kt index a7267881f9c..dafc8e5d280 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/configuration/AbstractConfigureKotlinTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/configuration/AbstractConfigureKotlinTest.kt @@ -190,10 +190,10 @@ abstract class AbstractConfigureKotlinTest : PlatformTestCase() { } private val pathToExistentRuntimeJar: String - get() = PathUtil.getKotlinPathsForDistDirectory().stdlibPath.parent + get() = PathUtil.kotlinPathsForDistDirectory.stdlibPath.parent private val pathToExistentJsJar: String - get() = PathUtil.getKotlinPathsForDistDirectory().jsStdLibJarPath.parent + get() = PathUtil.kotlinPathsForDistDirectory.jsStdLibJarPath.parent protected fun assertNotConfigured(module: Module, configurator: KotlinWithLibraryConfigurator) { TestCase.assertFalse( diff --git a/idea/tests/org/jetbrains/kotlin/idea/script/AbstractScriptConfigurationTest.kt b/idea/tests/org/jetbrains/kotlin/idea/script/AbstractScriptConfigurationTest.kt index cec03bd1acb..9367b857e4a 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/script/AbstractScriptConfigurationTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/script/AbstractScriptConfigurationTest.kt @@ -73,7 +73,7 @@ abstract class AbstractScriptConfigurationTest : AbstractPsiCheckerTest() { protected fun configureScriptEnvironment(path: String) { val templateOutDir = compileLibToDir( File("${path}template"), - PathUtil.getKotlinPathsForDistDirectory().scriptRuntimePath.path + PathUtil.kotlinPathsForDistDirectory.scriptRuntimePath.path ) val libSrcDir = File("${path}lib") diff --git a/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/KotlinJpsBuildTest.kt b/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/KotlinJpsBuildTest.kt index b360bd55057..468a554ef80 100644 --- a/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/KotlinJpsBuildTest.kt +++ b/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/KotlinJpsBuildTest.kt @@ -333,7 +333,7 @@ class KotlinJpsBuildTest : AbstractKotlinJpsBuildTestCase() { fun testKotlinJavaScriptProjectWithDirectoryAsStdlib() { initProject() - val jslibJar = PathUtil.getKotlinPathsForDistDirectory().jsStdLibJarPath + val jslibJar = PathUtil.kotlinPathsForDistDirectory.jsStdLibJarPath val jslibDir = File(workDir, "KotlinJavaScript") try { ZipUtil.extract(jslibJar, jslibDir, null) diff --git a/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jvm/compiler/ClasspathOrderTest.kt b/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jvm/compiler/ClasspathOrderTest.kt index baea25e041b..f5d416aae90 100644 --- a/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jvm/compiler/ClasspathOrderTest.kt +++ b/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jvm/compiler/ClasspathOrderTest.kt @@ -45,7 +45,7 @@ class ClasspathOrderTest : TestCaseWithTmpdir() { File(tmpdir, "output").absolutePath, listOf(sourceDir), listOf(JvmSourceRoot(sourceDir)), - listOf(PathUtil.getKotlinPathsForDistDirectory().runtimePath), + listOf(PathUtil.kotlinPathsForDistDirectory.runtimePath), null, JavaModuleBuildTargetType.PRODUCTION.typeId, JavaModuleBuildTargetType.PRODUCTION.isTests, @@ -58,4 +58,4 @@ class ClasspathOrderTest : TestCaseWithTmpdir() { MockLibraryUtil.compileKotlinModule(xml.absolutePath) } -} \ No newline at end of file +} diff --git a/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinBuilder.kt b/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinBuilder.kt index eec33685141..3cfc091740a 100644 --- a/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinBuilder.kt +++ b/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinBuilder.kt @@ -51,8 +51,11 @@ import org.jetbrains.kotlin.compilerRunner.JpsCompilerEnvironment import org.jetbrains.kotlin.compilerRunner.JpsKotlinCompilerRunner import org.jetbrains.kotlin.compilerRunner.OutputItemsCollector import org.jetbrains.kotlin.compilerRunner.OutputItemsCollectorImpl -import org.jetbrains.kotlin.config.* +import org.jetbrains.kotlin.config.CompilerRunnerConstants import org.jetbrains.kotlin.config.CompilerRunnerConstants.INTERNAL_ERROR_PREFIX +import org.jetbrains.kotlin.config.IncrementalCompilation +import org.jetbrains.kotlin.config.LanguageVersion +import org.jetbrains.kotlin.config.Services import org.jetbrains.kotlin.daemon.common.isDaemonEnabled import org.jetbrains.kotlin.incremental.* import org.jetbrains.kotlin.incremental.components.LookupTracker @@ -469,7 +472,7 @@ class KotlinBuilder : ModuleLevelBuilder(BuilderCategory.SOURCE_PROCESSOR) { } return JpsCompilerEnvironment( - PathUtil.getKotlinPathsForJpsPluginOrJpsTests(), + PathUtil.kotlinPathsForJpsPluginOrJpsTests, compilerServices, ClassCondition { className -> className.startsWith("org.jetbrains.kotlin.load.kotlin.incremental.components.") diff --git a/plugins/allopen/allopen-ide/src/AllOpenGradleProjectImportHandler.kt b/plugins/allopen/allopen-ide/src/AllOpenGradleProjectImportHandler.kt index 9c5a752776d..9d26c684cd9 100644 --- a/plugins/allopen/allopen-ide/src/AllOpenGradleProjectImportHandler.kt +++ b/plugins/allopen/allopen-ide/src/AllOpenGradleProjectImportHandler.kt @@ -25,7 +25,7 @@ class AllOpenGradleProjectImportHandler : AbstractGradleImportHandler() { override val pluginName = "allopen" override val annotationOptionName = AllOpenCommandLineProcessor.ANNOTATION_OPTION.name override val dataStorageTaskName = "allOpenDataStorageTask" - override val pluginJarFileFromIdea = PathUtil.getKotlinPathsForIdeaPlugin().allOpenPluginJarPath + override val pluginJarFileFromIdea = PathUtil.kotlinPathsForIdeaPlugin.allOpenPluginJarPath override fun getAnnotationsForPreset(presetName: String): List { for ((name, annotations) in AllOpenCommandLineProcessor.SUPPORTED_PRESETS.entries) { @@ -36,4 +36,4 @@ class AllOpenGradleProjectImportHandler : AbstractGradleImportHandler() { return super.getAnnotationsForPreset(presetName) } -} \ No newline at end of file +} diff --git a/plugins/allopen/allopen-ide/src/AllOpenMavenProjectImportHandler.kt b/plugins/allopen/allopen-ide/src/AllOpenMavenProjectImportHandler.kt index c552274ea2c..1c8b82db04d 100644 --- a/plugins/allopen/allopen-ide/src/AllOpenMavenProjectImportHandler.kt +++ b/plugins/allopen/allopen-ide/src/AllOpenMavenProjectImportHandler.kt @@ -29,7 +29,7 @@ class AllOpenMavenProjectImportHandler : AbstractMavenImportHandler() { override val pluginName = "allopen" override val annotationOptionName = AllOpenCommandLineProcessor.ANNOTATION_OPTION.name override val mavenPluginArtifactName = "kotlin-maven-allopen" - override val pluginJarFileFromIdea = PathUtil.getKotlinPathsForIdeaPlugin().allOpenPluginJarPath + override val pluginJarFileFromIdea = PathUtil.kotlinPathsForIdeaPlugin.allOpenPluginJarPath override fun getAnnotations(enabledCompilerPlugins: List, compilerPluginOptions: List): List? { if ("all-open" !in enabledCompilerPlugins && "spring" !in enabledCompilerPlugins) { @@ -51,4 +51,4 @@ class AllOpenMavenProjectImportHandler : AbstractMavenImportHandler() { return annotations } -} \ No newline at end of file +} diff --git a/plugins/kapt3/test/org/jetbrains/kotlin/kapt3/test/AbstractKotlinKapt3IntegrationTest.kt b/plugins/kapt3/test/org/jetbrains/kotlin/kapt3/test/AbstractKotlinKapt3IntegrationTest.kt index fe6cbebc38c..f55082db57b 100644 --- a/plugins/kapt3/test/org/jetbrains/kotlin/kapt3/test/AbstractKotlinKapt3IntegrationTest.kt +++ b/plugins/kapt3/test/org/jetbrains/kotlin/kapt3/test/AbstractKotlinKapt3IntegrationTest.kt @@ -151,7 +151,7 @@ abstract class AbstractKotlinKapt3IntegrationTest : CodegenTestCase() { options: Map, stubsOutputDir: File, incrementalDataOutputDir: File - ) : AbstractKapt3Extension(PathUtil.getJdkClassesRootsFromCurrentJre() + PathUtil.getKotlinPathsForIdeaPlugin().stdlibPath, + ) : AbstractKapt3Extension(PathUtil.getJdkClassesRootsFromCurrentJre() + PathUtil.kotlinPathsForIdeaPlugin.stdlibPath, emptyList(), javaSourceRoots, outputDir, outputDir, stubsOutputDir, incrementalDataOutputDir, options, emptyMap(), "", STUBS_AND_APT, System.currentTimeMillis(), KaptLogger(true), correctErrorTypes = true, compilerConfiguration = CompilerConfiguration.EMPTY @@ -188,4 +188,4 @@ abstract class AbstractKotlinKapt3IntegrationTest : CodegenTestCase() { super.saveIncrementalData(kaptContext, messageCollector, converter) } } -} \ No newline at end of file +} diff --git a/plugins/kapt3/test/org/jetbrains/kotlin/kapt3/test/AbstractKotlinKapt3Test.kt b/plugins/kapt3/test/org/jetbrains/kotlin/kapt3/test/AbstractKotlinKapt3Test.kt index 7ea07f5dbdb..953c7857463 100644 --- a/plugins/kapt3/test/org/jetbrains/kotlin/kapt3/test/AbstractKotlinKapt3Test.kt +++ b/plugins/kapt3/test/org/jetbrains/kotlin/kapt3/test/AbstractKotlinKapt3Test.kt @@ -124,10 +124,10 @@ abstract class AbstractKotlinKaptContextTest : AbstractKotlinKapt3Test() { val sourceOutputDir = Files.createTempDirectory("kaptRunner").toFile() try { kaptContext.doAnnotationProcessing(emptyList(), listOf(JavaKaptContextTest.simpleProcessor()), - compileClasspath = PathUtil.getJdkClassesRootsFromCurrentJre() + PathUtil.getKotlinPathsForIdeaPlugin().stdlibPath, - annotationProcessingClasspath = emptyList(), annotationProcessors = "", - sourcesOutputDir = sourceOutputDir, classesOutputDir = sourceOutputDir, - additionalSources = compilationUnits, withJdk = true) + compileClasspath = PathUtil.getJdkClassesRootsFromCurrentJre() + PathUtil.kotlinPathsForIdeaPlugin.stdlibPath, + annotationProcessingClasspath = emptyList(), annotationProcessors = "", + sourcesOutputDir = sourceOutputDir, classesOutputDir = sourceOutputDir, + additionalSources = compilationUnits, withJdk = true) val javaFiles = sourceOutputDir.walkTopDown().filter { it.isFile && it.extension == "java" } val actualRaw = javaFiles.sortedBy { it.name }.joinToString(FILE_SEPARATOR) { it.name + ":\n\n" + it.readText() } @@ -137,4 +137,4 @@ abstract class AbstractKotlinKaptContextTest : AbstractKotlinKapt3Test() { sourceOutputDir.deleteRecursively() } } -} \ No newline at end of file +} diff --git a/plugins/noarg/noarg-ide/src/NoArgGradleProjectImportHandler.kt b/plugins/noarg/noarg-ide/src/NoArgGradleProjectImportHandler.kt index 1a820204fd3..6d06e39396f 100644 --- a/plugins/noarg/noarg-ide/src/NoArgGradleProjectImportHandler.kt +++ b/plugins/noarg/noarg-ide/src/NoArgGradleProjectImportHandler.kt @@ -16,8 +16,8 @@ package org.jetbrains.kotlin.noarg.ide -import org.jetbrains.kotlin.noarg.NoArgCommandLineProcessor import org.jetbrains.kotlin.annotation.plugin.ide.AbstractGradleImportHandler +import org.jetbrains.kotlin.noarg.NoArgCommandLineProcessor import org.jetbrains.kotlin.utils.PathUtil class NoArgGradleProjectImportHandler : AbstractGradleImportHandler() { @@ -25,7 +25,7 @@ class NoArgGradleProjectImportHandler : AbstractGradleImportHandler() { override val pluginName = "noarg" override val annotationOptionName = NoArgCommandLineProcessor.ANNOTATION_OPTION.name override val dataStorageTaskName = "noArgDataStorageTask" - override val pluginJarFileFromIdea = PathUtil.getKotlinPathsForIdeaPlugin().noArgPluginJarPath + override val pluginJarFileFromIdea = PathUtil.kotlinPathsForIdeaPlugin.noArgPluginJarPath override fun getAnnotationsForPreset(presetName: String): List { for ((name, annotations) in NoArgCommandLineProcessor.SUPPORTED_PRESETS.entries) { @@ -36,4 +36,4 @@ class NoArgGradleProjectImportHandler : AbstractGradleImportHandler() { return super.getAnnotationsForPreset(presetName) } -} \ No newline at end of file +} diff --git a/plugins/noarg/noarg-ide/src/NoArgMavenProjectImportHandler.kt b/plugins/noarg/noarg-ide/src/NoArgMavenProjectImportHandler.kt index 4a2fb1f436a..7ede4ef6eed 100644 --- a/plugins/noarg/noarg-ide/src/NoArgMavenProjectImportHandler.kt +++ b/plugins/noarg/noarg-ide/src/NoArgMavenProjectImportHandler.kt @@ -16,8 +16,8 @@ package org.jetbrains.kotlin.noarg.ide -import org.jetbrains.kotlin.noarg.NoArgCommandLineProcessor import org.jetbrains.kotlin.annotation.plugin.ide.AbstractMavenImportHandler +import org.jetbrains.kotlin.noarg.NoArgCommandLineProcessor import org.jetbrains.kotlin.utils.PathUtil class NoArgMavenProjectImportHandler : AbstractMavenImportHandler() { @@ -29,7 +29,7 @@ class NoArgMavenProjectImportHandler : AbstractMavenImportHandler() { override val pluginName = "noarg" override val annotationOptionName = NoArgCommandLineProcessor.ANNOTATION_OPTION.name override val mavenPluginArtifactName = "kotlin-maven-noarg" - override val pluginJarFileFromIdea = PathUtil.getKotlinPathsForIdeaPlugin().noArgPluginJarPath + override val pluginJarFileFromIdea = PathUtil.kotlinPathsForIdeaPlugin.noArgPluginJarPath override fun getAnnotations(enabledCompilerPlugins: List, compilerPluginOptions: List): List? { if ("no-arg" !in enabledCompilerPlugins && "jpa" !in enabledCompilerPlugins) { @@ -50,4 +50,4 @@ class NoArgMavenProjectImportHandler : AbstractMavenImportHandler() { return annotations } -} \ No newline at end of file +} diff --git a/plugins/sam-with-receiver/sam-with-receiver-ide/src/SamWithReceiverGradleProjectImportHandler.kt b/plugins/sam-with-receiver/sam-with-receiver-ide/src/SamWithReceiverGradleProjectImportHandler.kt index 6d2014f60ba..cd7ef97454d 100644 --- a/plugins/sam-with-receiver/sam-with-receiver-ide/src/SamWithReceiverGradleProjectImportHandler.kt +++ b/plugins/sam-with-receiver/sam-with-receiver-ide/src/SamWithReceiverGradleProjectImportHandler.kt @@ -25,7 +25,7 @@ class SamWithReceiverGradleProjectImportHandler : AbstractGradleImportHandler() override val pluginName = "sam-with-receiver" override val annotationOptionName = SamWithReceiverCommandLineProcessor.ANNOTATION_OPTION.name override val dataStorageTaskName = "samWithReceiverDataStorageTask" - override val pluginJarFileFromIdea = PathUtil.getKotlinPathsForIdeaPlugin().allOpenPluginJarPath + override val pluginJarFileFromIdea = PathUtil.kotlinPathsForIdeaPlugin.allOpenPluginJarPath override fun getAnnotationsForPreset(presetName: String): List { for ((name, annotations) in SamWithReceiverCommandLineProcessor.SUPPORTED_PRESETS.entries) { @@ -36,4 +36,4 @@ class SamWithReceiverGradleProjectImportHandler : AbstractGradleImportHandler() return super.getAnnotationsForPreset(presetName) } -} \ No newline at end of file +} diff --git a/plugins/sam-with-receiver/sam-with-receiver-ide/src/SamWithReceiverMavenProjectImportHandler.kt b/plugins/sam-with-receiver/sam-with-receiver-ide/src/SamWithReceiverMavenProjectImportHandler.kt index 67f45c8ed6c..b838214383d 100644 --- a/plugins/sam-with-receiver/sam-with-receiver-ide/src/SamWithReceiverMavenProjectImportHandler.kt +++ b/plugins/sam-with-receiver/sam-with-receiver-ide/src/SamWithReceiverMavenProjectImportHandler.kt @@ -29,7 +29,7 @@ class SamWithReceiverMavenProjectImportHandler : AbstractMavenImportHandler() { override val pluginName = "samWithReceiver" override val annotationOptionName = SamWithReceiverCommandLineProcessor.ANNOTATION_OPTION.name override val mavenPluginArtifactName = "kotlin-maven-sam-with-receiver" - override val pluginJarFileFromIdea = PathUtil.getKotlinPathsForIdeaPlugin().allOpenPluginJarPath + override val pluginJarFileFromIdea = PathUtil.kotlinPathsForIdeaPlugin.allOpenPluginJarPath override fun getAnnotations(enabledCompilerPlugins: List, compilerPluginOptions: List): List? { if ("sam-with-receiver" !in enabledCompilerPlugins) { @@ -51,4 +51,4 @@ class SamWithReceiverMavenProjectImportHandler : AbstractMavenImportHandler() { return annotations } -} \ No newline at end of file +} diff --git a/plugins/source-sections/source-sections-compiler/tests/org/jetbrains/kotlin/sourceSections/SourceSectionsTest.kt b/plugins/source-sections/source-sections-compiler/tests/org/jetbrains/kotlin/sourceSections/SourceSectionsTest.kt index ddfb1f5f0ed..988f751e458 100644 --- a/plugins/source-sections/source-sections-compiler/tests/org/jetbrains/kotlin/sourceSections/SourceSectionsTest.kt +++ b/plugins/source-sections/source-sections-compiler/tests/org/jetbrains/kotlin/sourceSections/SourceSectionsTest.kt @@ -53,7 +53,7 @@ class SourceSectionsTest : TestCaseWithTmpdir() { } private val kotlinPaths: KotlinPaths by lazy { - val paths = PathUtil.getKotlinPathsForDistDirectory() + val paths = PathUtil.kotlinPathsForDistDirectory TestCase.assertTrue("Lib directory doesn't exist. Run 'ant dist'", paths.libPath.absoluteFile.isDirectory) paths }