mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-04-03 08:31:29 +00:00
Do not fail on adding sources to libraries that can't be recognized (EA-73238)
It's valid situation when user in Gradle project had created ordinal Java module and wants to configure it with Kotlin. We should add Gradle library to dependency but there's no need to configure sources for it.
This commit is contained in:
@@ -139,7 +139,9 @@ public abstract class KotlinWithLibraryConfigurator implements KotlinProjectConf
|
||||
configureModuleWithLibraryClasses(module, libraryState, runtimeState, dirToCopyJar, collector);
|
||||
|
||||
Library library = getKotlinLibrary(project);
|
||||
assert library != null : "Kotlin library should exists when adding sources root";
|
||||
|
||||
if (library == null) return;
|
||||
|
||||
String dirToCopySourcesJar = getPathToCopyFileTo(project, OrderRootType.SOURCES, defaultPath, pathFromDialog);
|
||||
FileState sourcesState = getJarState(project, files.getRuntimeSourcesDestination(dirToCopySourcesJar), OrderRootType.SOURCES,
|
||||
pathFromDialog == null);
|
||||
|
||||
Reference in New Issue
Block a user