Fix NPE in KotlinJavaMPPSourceSetDataService.postProcess
This commit is contained in:
@@ -40,7 +40,7 @@ class KotlinJavaMPPSourceSetDataService : AbstractProjectDataService<GradleSourc
|
|||||||
val rootModel = modelsProvider.getModifiableRootModel(module)
|
val rootModel = modelsProvider.getModifiableRootModel(module)
|
||||||
val libraryEntries = rootModel.orderEntries.filterIsInstance<LibraryOrderEntry>()
|
val libraryEntries = rootModel.orderEntries.filterIsInstance<LibraryOrderEntry>()
|
||||||
libraryEntries.forEach { libraryEntry ->
|
libraryEntries.forEach { libraryEntry ->
|
||||||
val library = libraryEntry.library
|
val library = libraryEntry.library ?: return@forEach
|
||||||
val libraryModel = modelsProvider.getModifiableLibraryModel(library)
|
val libraryModel = modelsProvider.getModifiableLibraryModel(library)
|
||||||
val classesUrl = libraryModel.getUrls(OrderRootType.CLASSES).singleOrNull() ?: return@forEach
|
val classesUrl = libraryModel.getUrls(OrderRootType.CLASSES).singleOrNull() ?: return@forEach
|
||||||
val targetNode = targetsByUrl[classesUrl]?.singleOrNull() ?: return@forEach
|
val targetNode = targetsByUrl[classesUrl]?.singleOrNull() ?: return@forEach
|
||||||
|
|||||||
Reference in New Issue
Block a user