mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[IJPL-174685] Do not continue processing if kotlin data node is null
the search for the dataNode uses a name comparison, and for the case of Android for example, the names won't match and we will end up finding nothing. The function should not continue processing data if the dataNode is null because it will just use fallbacks instead of configuring the right way. For the NAdroid case, we even have our own data service that actually passes the right name in this case. closes https://github.com/JetBrains/intellij-community/pull/2898 GitOrigin-RevId: 96428ded562d3ff92e2de915e5afc4ae92384cd7
This commit is contained in:
committed by
intellij-monorepo-bot
parent
617b47e26e
commit
08e60ab334
+2
-2
@@ -256,9 +256,9 @@ fun configureFacetByGradleModule(
|
||||
|
||||
val platformKind = detectPlatformKindByPlugin(moduleNode) ?: detectPlatformByLibrary(moduleNode)
|
||||
val kotlinGradleSourceSetDataNode = kotlinGradleProjectDataNode.findAll(KotlinGradleSourceSetData.KEY)
|
||||
.firstOrNull { it.data.sourceSetName == sourceSetName }
|
||||
.firstOrNull { it.data.sourceSetName == sourceSetName } ?: return null
|
||||
|
||||
val compilerVersion = kotlinGradleSourceSetDataNode?.data?.kotlinPluginVersion?.let(IdeKotlinVersion::opt)
|
||||
val compilerVersion = kotlinGradleSourceSetDataNode.data?.kotlinPluginVersion?.let(IdeKotlinVersion::opt)
|
||||
// required for GradleFacetImportTest.{testCommonImportByPlatformPlugin, testKotlinAndroidPluginDetection}
|
||||
?: KotlinGradleFacade.getInstance()?.findKotlinPluginVersion(moduleNode)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user