Introduce and use KotlinPaths.getStdlibPath()
Also support renaming .jar file when updating an existing library
This commit is contained in:
@@ -66,7 +66,7 @@ public class ConfigLibraryUtil {
|
||||
}
|
||||
|
||||
public static void configureKotlinRuntime(Module module) {
|
||||
addLibrary(getKotlinRuntimeLibEditor(DEFAULT_JAVA_RUNTIME_LIB_NAME, PathUtil.getKotlinPathsForDistDirectory().getRuntimePath()),
|
||||
addLibrary(getKotlinRuntimeLibEditor(DEFAULT_JAVA_RUNTIME_LIB_NAME, PathUtil.getKotlinPathsForDistDirectory().getStdlibPath()),
|
||||
module);
|
||||
addLibrary(getKotlinRuntimeLibEditor(DEFAULT_KOTLIN_TEST_LIB_NAME, PathUtil.getKotlinPathsForDistDirectory().getKotlinTestPath()),
|
||||
module);
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ public class JdkAndMockLibraryProjectDescriptor extends KotlinLightProjectDescri
|
||||
Library.ModifiableModel libraryModel = model.getModuleLibraryTable().getModifiableModel().createLibrary(LIBRARY_NAME).getModifiableModel();
|
||||
libraryModel.addRoot(jarUrl, OrderRootType.CLASSES);
|
||||
if (withRuntime) {
|
||||
libraryModel.addRoot(getJarUrl(PathUtil.getKotlinPathsForDistDirectory().getRuntimePath()), OrderRootType.CLASSES);
|
||||
libraryModel.addRoot(getJarUrl(PathUtil.getKotlinPathsForDistDirectory().getStdlibPath()), OrderRootType.CLASSES);
|
||||
}
|
||||
if (withSources) {
|
||||
libraryModel.addRoot(jarUrl + "src/", OrderRootType.SOURCES);
|
||||
|
||||
Reference in New Issue
Block a user